Bug in GenomicRanges precede/follow
1
0
Entering edit mode
@aaron-statham-4434
Last seen 9.6 years ago
Hi, I just ran into this bug using the GRanges method of nearest (which calls precede & follow) with ignore.strand=TRUE > nearest(GRanges("chr1", IRanges(1, width=1)), GRanges("chr1", IRanges(10, width=1)), ignore.strand=TRUE) Error in strand(x) <- strand(subject) <- "+" : object 'x' not found And tracked it down to here > GenomicRanges:::.findPrecedeFollow_GRanges function (query, subject, select, ignore.strand, where = c("precede", "follow")) { leftOf <- "precede" == match.arg(where) if (ignore.strand) strand(x) <- strand(subject) <- "+" strand(x) should be strand(query) > sessionInfo() R version 2.15.0 (2012-03-30) Platform: x86_64-unknown-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_AU.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_AU.UTF-8 LC_COLLATE=en_AU.UTF-8 [5] LC_MONETARY=en_AU.UTF-8 LC_MESSAGES=en_AU.UTF-8 [7] LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] xtable_1.7-0 BSgenome.Hsapiens.UCSC.hg19_1.3.17 [3] BSgenome_1.24.0 Biostrings_2.24.1 [5] multicore_0.1-7 rtracklayer_1.16.3 [7] Repitools_1.2.0 GenomicRanges_1.8.7 [9] IRanges_1.14.4 BiocGenerics_0.2.0 [11] limma_3.12.1 loaded via a namespace (and not attached): [1] bitops_1.0-4.1 RCurl_1.91-1 Rsamtools_1.8.5 stats4_2.15.0 [5] tcltk_2.15.0 tools_2.15.0 XML_3.9-4 zlibbioc_1.2.0 Thanks, Aaron --- Aaron Statham Postgraduate Scholar, Cancer Epigenetics Garvan Institute of Medical Research Tel: (02) 9295 8386 384 Victoria St Darlinghurst 2010 Fax: (02) 9825 8316 NSW Australia email: a.statham at garvan.org.au
Cancer Cancer • 1.1k views
ADD COMMENT
0
Entering edit mode
@valerie-obenchain-4275
Last seen 2.3 years ago
United States
Hi Aaron, Thanks for catching this. Now fixed in GenomicRanges 1.8.8 in release and 1.9.35 in devel. Valerie On 07/18/2012 10:17 PM, a.statham at garvan.org.au wrote: > Hi, > > I just ran into this bug using the GRanges method of nearest > (which calls precede& follow) with ignore.strand=TRUE > >> nearest(GRanges("chr1", IRanges(1, width=1)), > GRanges("chr1", IRanges(10, width=1)), ignore.strand=TRUE) > Error in strand(x)<- strand(subject)<- "+" : object 'x' not > found > > > And tracked it down to here > >> GenomicRanges:::.findPrecedeFollow_GRanges > function (query, subject, select, ignore.strand, where = > c("precede", > "follow")) > { > leftOf<- "precede" == match.arg(where) > if (ignore.strand) > strand(x)<- strand(subject)<- "+" > > strand(x) should be strand(query) > >> sessionInfo() > R version 2.15.0 (2012-03-30) > Platform: x86_64-unknown-linux-gnu (64-bit) > > locale: > [1] LC_CTYPE=en_AU.UTF-8 LC_NUMERIC=C > [3] LC_TIME=en_AU.UTF-8 LC_COLLATE=en_AU.UTF-8 > [5] LC_MONETARY=en_AU.UTF-8 LC_MESSAGES=en_AU.UTF-8 > [7] LC_PAPER=C LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C > > attached base packages: > [1] stats graphics grDevices utils datasets methods > base > > other attached packages: > [1] xtable_1.7-0 > BSgenome.Hsapiens.UCSC.hg19_1.3.17 > [3] BSgenome_1.24.0 Biostrings_2.24.1 > [5] multicore_0.1-7 rtracklayer_1.16.3 > [7] Repitools_1.2.0 GenomicRanges_1.8.7 > [9] IRanges_1.14.4 BiocGenerics_0.2.0 > [11] limma_3.12.1 > > loaded via a namespace (and not attached): > [1] bitops_1.0-4.1 RCurl_1.91-1 Rsamtools_1.8.5 > stats4_2.15.0 > [5] tcltk_2.15.0 tools_2.15.0 XML_3.9-4 > zlibbioc_1.2.0 > > > Thanks, > Aaron > > --- > Aaron Statham > Postgraduate Scholar, Cancer Epigenetics > Garvan Institute of Medical Research Tel: (02) 9295 8386 > 384 Victoria St Darlinghurst 2010 Fax: (02) 9825 8316 > NSW Australia email: a.statham at garvan.org.au > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT

Login before adding your answer.

Traffic: 892 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