[BioC] rtracklayer issue (getTable)
Mark Robinson
mrobinson at wehi.EDU.AU
Mon Oct 5 00:41:24 CEST 2009
Hi Michael.
It looks like I'm still getting some unusual behaviour with 1.5.19
(2.10) ... and am unsuccessful with the mrna table on 1.4.1 (2.9).
I'm sending the output for both versions below. It seems 1.5.19 is
only gathering results for a small region on chrX and 1.4.1 doesn't
accept the "all_mrna" table. I'm using fairly old versions of R 2.9
and 2.10, but I'd guess that that is not the issue.
Any suggestions?
Thanks,
Mark
[1.4.1 -- 2.9]
---------------------------------
> library(rtracklayer)
Loading required package: RCurl
Loading required package: bitops
> session <- browserSession("UCSC")
> genome(session) <- "hg18"
> q1 <- ucscTableQuery(session, "refGene")
> q1
Get track 'refGene' within hg18:*:*-*
> refGene <- getTable(q1)
> q2 <- ucscTableQuery(session, "all_mrna")
Error in normArgTrack(x, track) : Unknown track: all_mrna
> sessionInfo()
R version 2.9.1 (2009-06-26)
i386-apple-darwin8.11.1
locale:
en_CA.UTF-8/en_CA.UTF-8/C/C/en_CA.UTF-8/en_CA.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] rtracklayer_1.4.1 RCurl_0.98-1 bitops_1.0-4.1
loaded via a namespace (and not attached):
[1] Biobase_2.4.1 Biostrings_2.12.9 BSgenome_1.12.3 IRanges_1.2.3
[5] XML_2.6-0
---------------------------------
[1.5.19 -- 2.10]
---------------------------------
> library(rtracklayer)
Loading required package: RCurl
Loading required package: bitops
> session <- browserSession("UCSC")
> genome(session) <- "hg18"
> q1 <- ucscTableQuery(session, "refGene")
> q1
Get track 'refGene' within hg18:chrX:151073054-151383976
> refGene <- getTable(q1)
> q2 <- ucscTableQuery(session, "all_mrna")
> q2
Get track 'all_mrna' within hg18:chrX:151073054-151383976
> mrna <- getTable(q2)
> sessionInfo()
R version 2.10.0 Under development (unstable) (2009-05-22 r48594)
i386-apple-darwin8.11.1
locale:
[1] en_CA.UTF-8/en_CA.UTF-8/C/C/en_CA.UTF-8/en_CA.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] rtracklayer_1.5.19 RCurl_0.98-1 bitops_1.0-4.1
loaded via a namespace (and not attached):
[1] Biobase_2.5.8 Biostrings_2.13.48 BSgenome_1.13.16
IRanges_1.3.87
[5] XML_2.6-0
---------------------------------
On 3-Oct-09, at 11:10 AM, Michael Lawrence wrote:
>
>
> On Thu, Oct 1, 2009 at 11:47 PM, Mark Robinson
> <mrobinson at wehi.edu.au> wrote:
> Hello BioC list.
>
> I've encountered a small problem when trying to download some tracks
> from UCSC with rtracklayer. Specifically, I'm trying to get the
> "mrna" table. The example below works great for the "refGene"
> table, but gives an error for the "mrna" table.
>
> Any suggestions?
>
>
> Looked into this and found that the table browser has a slightly
> different set of tracks from the browser itself. I added a
> trackNames method (version 1.5.19) on the UCSCTableQuery, so that
> it's possible to know which tracks are available.
>
> From that, you'll see that 'mrna' needs to be 'all_mrna'.
>
> Michael
>
> Thanks,
> Mark
>
> > library(rtracklayer)
> Loading required package: RCurl
> Loading required package: bitops
> > session <- browserSession("UCSC")
> > genome(session) <- "hg18"
> > options(stringsAsFactors=FALSE)
> > q1 <- ucscTableQuery(session, "refGene",GenomicRanges(197848272,
> 198064461, "chr3"))
> > tab1 <- getTable(q1)
> > head(tab1[,1:5])
> bin name chrom strand txStart
> 1 2094 NM_198565 chr3 + 197851052
> 2 261 NM_032898 chr3 - 197917544
> 3 2095 NM_017861 chr3 + 197923642
> 4 2095 NM_002577 chr3 + 197951124
> > q2 <- ucscTableQuery(session, "mrna",GenomicRanges(197848272,
> 198064461, "chr3"))
> > tab2 <- getTable(q2)
> Error in scan(file, what, nmax, sep, dec, quote, skip, nlines,
> na.strings, :
> line 1 did not have 2 elements
> > traceback()
> 5: scan(file = file, what = what, sep = sep, quote = quote, dec = dec,
> nmax = nrows, skip = 0, na.strings = na.strings, quiet = TRUE,
> fill = fill, strip.white = strip.white, blank.lines.skip =
> blank.lines.skip,
> multi.line = FALSE, comment.char = comment.char, allowEscapes
> = allowEscapes,
> flush = flush, encoding = encoding)
> 4: read.table(f, sep = "\t", header = TRUE)
> 3: .local(object, ...)
> 2: getTable(q2)
> 1: getTable(q2)
> > sessionInfo()
> R version 2.9.1 (2009-06-26)
> i386-apple-darwin8.11.1
>
> locale:
> en_CA.UTF-8/en_CA.UTF-8/C/C/en_CA.UTF-8/en_CA.UTF-8
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> other attached packages:
> [1] rtracklayer_1.4.1 RCurl_0.98-1 bitops_1.0-4.1
>
> loaded via a namespace (and not attached):
> [1] Biobase_2.4.1 Biostrings_2.12.8 BSgenome_1.12.3
> IRanges_1.2.3
> [5] XML_2.6-0
>
>
>
>
>
> ---------
> library(rtracklayer)
> session <- browserSession("UCSC")
> genome(session) <- "hg18"
> options(stringsAsFactors=FALSE)
> qry1 <- ucscTableQuery(session, "refGene",GenomicRanges(197848272,
> 198064461, "chr3"))
> tab1 <- getTable(qry1)
> head(tab1[,1:5])
> qry2 <- ucscTableQuery(session, "mrna",GenomicRanges(197848272,
> 198064461, "chr3"))
> tab2 <- getTable(qry2)
> traceback()
> sessionInfo()
> ---------
>
>
> ------------------------------
> Mark Robinson, PhD (Melb)
> Epigenetics Laboratory, Garvan
> Bioinformatics Division, WEHI
> e: m.robinson at garvan.org.au
> e: mrobinson at wehi.edu.au
> p: +61 (0)3 9345 2628
> f: +61 (0)3 9347 0852
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>
------------------------------
Mark Robinson, PhD (Melb)
Epigenetics Laboratory, Garvan
Bioinformatics Division, WEHI
e: m.robinson at garvan.org.au
e: mrobinson at wehi.edu.au
p: +61 (0)3 9345 2628
f: +61 (0)3 9347 0852
More information about the Bioconductor
mailing list