[BioC] rtracklayer mystery with ucscTableQuery
Sigal Blay
sblay at sfu.ca
Fri Jun 4 01:19:19 CEST 2010
library(rtracklayer)
genes <- c("uc003wgi.1", "uc010lpn.2", "uc010lpm.1")
session <- browserSession()
# Search only for the first gene - failed with a warning message
> query1 <- ucscTableQuery(session, "knownGene", table="kgXref", names=genes[1])
> t1 <- getTable(query1)
Warning message:
In read.table(f, sep = "\t", header = TRUE) :
incomplete final line found by readTableHeader on ''
# If I don't specify the genes, the first one is found
> query2 <- ucscTableQuery(session, "knownGene", table="kgXref")
> t2<-getTable(query2)
> t2[t2[,"kgID"]==genes[1],] # 1st gene found
> t2[t2[,"kgID"]==genes[2],] # 2nd gene not found
> t2[t2[,"kgID"]==genes[3],] # 3rd gene not found
# if I specify the genes, first and second are found, but not the third
> query3 <- ucscTableQuery(session, "knownGene", table="kgXref", names = genes)
> t3 <- getTable(query3)
> t3[t3[,"kgID"]==genes[1],] # 1st gene found
> t3[t3[,"kgID"]==genes[2],] # 2nd gene found
> t3[t3[,"kgID"]==genes[3],] # 3rd gene not found
> sessionInfo()
R version 2.10.1 (2009-12-14)
i386-pc-mingw32
locale:
[1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252
[3] LC_MONETARY=English_Canada.1252 LC_NUMERIC=C
[5] LC_TIME=English_Canada.1252
attached base packages:
[1] grid stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] rtracklayer_1.6.0 RCurl_1.3-1 bitops_1.0-4.1
loaded via a namespace (and not attached):
[1] Biobase_2.6.1 Biostrings_2.14.12 BSgenome_1.14.2 IRanges_1.4.14
[5] XML_2.6-0
More information about the Bioconductor
mailing list