[BioC] rtracklayer issue (getTable)

Mark Robinson mrobinson at wehi.EDU.AU
Fri Oct 2 08:47:41 CEST 2009


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?

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



More information about the Bioconductor mailing list