rtracklayer and multiple ranges
1
0
Entering edit mode
@christian-ruckert-3294
Last seen 4.9 years ago
Germany
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
rtracklayer rtracklayer • 912 views
ADD COMMENT
0
Entering edit mode
@michael-lawrence-3846
Last seen 2.4 years ago
United States
On Tue, Feb 9, 2010 at 7:35 AM, Christian Ruckert <cruckert@uni-muenster.de>wrote: > 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? > > > No, but it's on the TODO list. Still reverse engineering that table browser. Btw, if all you need are the UCSC genes, try the GenomicFeatures suite of packages. Sorry, Michael > > 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 > > _______________________________________________ > 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 > [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

Traffic: 1058 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6