Entering edit mode
I want to retrieve the gene names for multiple genomic ranges using
rtracklayer. This is what I tried:
library("rtracklayer")
session <- browserSession("UCSC")
genome(session) <- "hg17"
gr1 = GenomicRanges(start=26970000, end=26980000, chr=7,
genome="hg17")
gr2 = GenomicRanges(start=156295000, end=156305000, chr=7,
genome="hg17")
gr3 = GenomicRanges(start=c(26970000, 156295000), end=c(26980000,
156305000), chr=c(7, 7), genome="hg17")
gr4 = GenomicRanges(start=c(156295000, 26970000), end=c(156305000,
26980000), chr=c(7, 7), genome="hg17")
tq = ucscTableQuery(session, track="knownGene", table="knownGene",
range=gr1)
getTable(tq)
For gr1 and gr2 the result is as expected, the genes HXA9 and HLXB9,
but
for gr3 and gr4 only the first one (by genomic position) is returned.
Is
this kind of query possible with rtracklayer in general?
> sessionInfo()
R version 2.10.0 RC (2009-10-18 r50160)
x86_64-pc-linux-gnu
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] rtracklayer_1.6.0 RCurl_1.3-1 bitops_1.0-4.1 affy_1.24.2
[5] Biobase_2.6.1
loaded via a namespace (and not attached):
[1] BSgenome_1.14.2 Biostrings_2.14.10 IRanges_1.4.9
[4] XML_2.6-0 affyio_1.14.0 preprocessCore_1.8.0
[7] tools_2.10.0
Thanks in advance,
Christian