[BioC] meet problem when use rtracklayer

Vincent Carey stvjc at channing.harvard.edu
Sat Jun 11 13:29:40 CEST 2011


sorry for delay in responding.  geo is down at the moment so i can't
reproduce your code exactly.
but see below

On Thu, Jun 9, 2011 at 10:22 AM, Yanchun Bao <Yanchun.Bao at brunel.ac.uk> wrote:
>>library(rtracklayer)
>>library(IRanges)
>>library(GenomicRanges)
>>GSMCBPT0<-import.wig("GSM525265_CBP_T0.wig")
>> head(GSMCBPT0)
> UCSCData with 6 rows and 1 value column across 24 spaces
>     space           ranges |     score
>  <factor>        <IRanges> | <integer>
> 1    chr11 [165900, 165900] |         2
> 2    chr11 [165901, 165901] |         2
> 3    chr11 [165902, 165902] |         2
> 4    chr11 [165903, 165903] |         2
> 5    chr11 [165904, 165904] |         2
> 6    chr11 [165905, 165905] |         2
>>targetTrack<-with(GSMCBPT0, GSMCBPT0$scores) ## Not sure if I use it correct

above cannot be as intended because "scores" is not an element of
GSMCBPT0.  anyway,
the example involving "with()" in the paper is converting a _data
frame_ instance to a
RangedData.  you already have, as a result of the import, a UCSCData
instance GSMCBPT0,
which inherits from RangedData

>> session <- browserSession("UCSC")
>> session$targets<-targetTrack

at this point in principle you could use

session$targets = GSMCBPT0

> Error in FUN(X[[1L]], ...) : Invalid chromosomes for hg19: 1

what is the result of table(space(GSMCBPT0))

you did not give sessionInfo() so I am not clear on
>> export(targetTrack, "tragets.wig") Error in export.ucsc(object, con,
> subformat, append, ...) : Track not compatible with WIG/bedGraph: Overlapping
> features must be on separate strands and every feature width must be positive

it is not clear how you got here.  when geo is back up i will try to
have a look at this
specific wig file.

please read the posting guide, try to give full unedited transcript of
your commands, and
give sessionInfo() result

>
>
>     I have a wig file data and I read it by import, then I want to use GCSC
> Genome Browser, I have meet some problems in track and export (follow the
> example of paper Bioinformatics 2009 1841-1842). I am wondering if I use the
> wrong 'with' command? I have no idea, could anybody help me? Thank you very
> much.
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>



More information about the Bioconductor mailing list