On Thu, Jun 4, 2009 at 7:03 AM, James W. MacDonald <jmacdon@med.umich.edu>wrote:

> Hi Michael,
>
> I get the same results as Simon. In fact, if I source() the vignette code
> and then run some of the chunks that are set to eval=false, I get errors:
>
> > source("c:/R-2.9.0/library/rtracklayer/doc/rtracklayer.R")
> Loading required package: hgu133plus2.db
> Loading required package: AnnotationDbi
> Loading required package: DBI
> Loading required package: Biostrings
> Loading required package: IRanges
> [snip]
>
> > session <- browserSession("UCSC")
> > track(session, "targets") <- targetTrack
> > targetTrack
> RangedData: 3063 ranges by 3 columns
> columns(3): strand name target
> sequences(23): chr1 chr10 chr11 chr12 chr13 ... chr7 chr8 chr9 chrX
> > view <- browserView(session, range(targetTrack)*-10, pack="targets")
> Error in validObject(x) :
>  invalid class "IRanges" object: the widths must be non-NA integers
> In addition: Warning message:
> In numeric2integer(value) : NAs introduced by coercion
> Error in ucscForm(range) :
>  error in evaluating the argument 'object' in selecting a method for
> function 'ucscForm'
> > view <- browserView(session, range(subTargetTrack) * -10,pack =
> "targets")
> Error in resolveTrackIndex(x, i) : Unknown tracks:targets
>
> If I export targetTrack as a bedfile and upload to UCSC I get no errors and
> can view the track without problems.
>

I'm kind of at a loss here. I have your same sessionInfo on my machine
(fresh R install, everything via biocLite) and yet it seems to work just
fine. What's your curl version? Mine is 7.19.4.

Michael


>
> On another subject, you might consider replacing the plot of the cpneTrack
> in the vignette with a .png rather than a .pdf. Trying to scroll through the
> vignette is a real drag when you get to that plot.
>

Yes, good idea.


>
>
> > sessionInfo()
> R version 2.9.0 (2009-04-17)
> i386-pc-mingw32
>
> locale:
> LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
> States.1252;LC_MONETARY=English_United
> States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
>
> attached base packages:
> [1] stats     graphics  grDevices datasets  utils     methods
> [7] base
>
> other attached packages:
>  [1] BSgenome.Hsapiens.UCSC.hg18_1.3.11
>  [2] BSgenome_1.12.2
>  [3] rtracklayer_1.4.0
>  [4] RCurl_0.97-3
>  [5] bitops_1.0-4.1
>  [6] org.Hs.eg.db_2.2.11
>  [7] microRNA_1.2.0
>  [8] Rlibstree_0.3-2
>  [9] Biostrings_2.12.4
> [10] IRanges_1.2.2
> [11] genefilter_1.24.2
> [12] humanStemCell_0.2.0
> [13] hgu133plus2.db_2.2.11
> [14] RSQLite_0.7-1
> [15] DBI_0.2-4
> [16] AnnotationDbi_1.6.0
> [17] affy_1.22.0
> [18] Biobase_2.4.1
> [19] limma_2.18.1
> [20] biomaRt_2.0.0
>
> loaded via a namespace (and not attached):
> [1] affyio_1.12.0        annotate_1.22.0      preprocessCore_1.6.0
> [4] splines_2.9.0        survival_2.35-4      tools_2.9.0
> [7] XML_2.3-0            xtable_1.5-5
>
> Best,
>
> Jim
>
>
>
> Michael Lawrence wrote:
>
>> On Wed, Jun 3, 2009 at 3:22 AM, Simon Anders <anders@ebi.ac.uk> wrote:
>>
>>  Hi Michael,
>>>
>>> I've just tried to use rtracklayer, following your vignette, and ran into
>>> two problems.
>>>
>>>
>>> 1. I cannot add any tracks to a session.
>>>
>>> I entered the code in the vignette to produce the "targets" track and
>>> exported it as "targets.bed". To make things easier to follow, let's say,
>>> I
>>> start from there with a fresh R session:
>>>
>>>  library(rtracklayer)
>>>
>>>  # Import the data
>>>  targets <- import("targets.bed")
>>>  # targets is now a RangedData object with 3052 ranges and
>>>  # sequence names chr1 chr10 chr11 chr12 ...
>>>
>>>  # Create a session
>>>  session <- browserSession("UCSC")
>>>
>>>  # Add the 'targets' track to the session:
>>>  track(session, "MYTRACK") <- targets
>>>
>>> Is this last command correct? It does not produce an error, but it does
>>> not
>>> seem to do anything, either. If I list all the tracks in the session with
>>>  trackNames(session)
>>> I get a list of 196 UCSC standard tracks, but "MYTRACK" is not mentioned.
>>>
>>> How do I correctly add a track?
>>>
>>>
>> Well, I can say that this works for me. I need to look into parsing the
>> error messages returned by UCSC.  You can always try uploading to UCSC
>> manually to see what went wrong. I know that back in December the BED
>> output
>> was mishandling the score values.
>>
>>
>>
>>> 2. There is some mangling happening with the chromosome names.
>>>
>>> The man page for 'browserView' suggests to try:
>>>
>>>  browserView(session, GenomicRanges(20000, 50000, "chr2"))
>>>
>>> Doing this asks my web browser to open the following URL:
>>>
>>>
>>>
>>> http://genome.ucsc.edu/cgi-bin/hgTracks?position=chrchr2%3a20000-50000&hgsid=133834314
>>>
>>> Note that it says "chrchr2", i.e., a superfluous "chr" got prefixed to
>>> the
>>> sequence name. Obviously, the UCSC page cannot deal with this and one
>>> gets
>>> an error message displayed by JavaScript that "chrchr2" is not known.
>>>
>>> I run into the same problem if I follow the vignette's code to
>>> demonstrate
>>> 'browserView'.
>>>
>>> If I try
>>>  browserView(session, GenomicRanges(20000, 50000, "2"))
>>> I get the range chr2:20000-50000 correctly displayed in my web browser.
>>> There is, however, still now sight of "MYTRACK".
>>>
>>> What's going wrong here?
>>>
>>>
>> Thanks for pointing this out. I've fixed this for version 1.5.3.
>>
>> Michael
>>
>>
>>
>>>  sessionInfo()
>>>>
>>> R version 2.9.0 (2009-04-17)
>>> x86_64-unknown-linux-gnu
>>>
>>> locale:
>>>
>>>
>>> LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8;LC_COLLATE=en_GB.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_GB.UTF-8;LC_PAPER=en_GB.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_GB.UTF-8;LC_IDENTIFICATION=C
>>>
>>> attached base packages:
>>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>>
>>> other attached packages:
>>> [1] rtracklayer_1.4.0 RCurl_0.94-1
>>>
>>> loaded via a namespace (and not attached):
>>> [1] Biobase_2.4.0     Biostrings_2.12.0 BSgenome_1.12.0   IRanges_1.2.0
>>> [5] XML_2.3-0
>>>
>>>
>>> Cheers
>>>  Simon
>>>
>>>
>>> +---
>>> | Dr. Simon Anders, Dipl. Phys.
>>> | European Bioinformatics Institute, Hinxton, Cambridgeshire, UK
>>> | office phone +44-1223-492680, mobile phone +44-7505-841692
>>> | preferred (permanent) e-mail: sanders@fs.tum.de
>>>
>>>
>>>
>>>
>>>
>>        [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor@stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives:
>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>>
>
> --
> James W. MacDonald, M.S.
> Biostatistician
> Douglas Lab
> University of Michigan
> Department of Human Genetics
> 5912 Buhl
> 1241 E. Catherine St.
> Ann Arbor MI 48109-5618
> 734-615-7826
>

	[[alternative HTML version deleted]]

