Bug (?) in IRanges::findOverlaps(self, ignoreSelf=TRUE, ignoreRedundat=TRUE)
1
0
Entering edit mode
@steve-lianoglou-2771
Last seen 13 months ago
United States
Hi, I think I've found a corner case in the findOverlaps function when you are: (i) omitting the subject arg (ii) both ignoreSelf and ignoreRedundant areTRUE (iii) and only 1 overlap should be returned(?) <-- not sure about this one Example: R> x <- IRanges(c(1, 10, 20), width=c(5, 11, 5)) R> findOverlaps(x, ignoreSelf=TRUE, ignoreRedundant=TRUE) Error in checkSlotAssignment(object, name, value) : assignment of an object of class "integer" is not valid for slot "matchMatrix" in an object of class "RangesMatching"; is(value, "matrix") is not TRUE It works, however, when ignoreSelf && ignoreReduncant == FALSE R> findOverlaps(x, ignoreRedundant=TRUE) ## this is fine R> findOverlaps(x, ignoreSelf=TRUE) ## also fine sessionInfo() R version 2.11.0 Patched (2010-05-05 r51909) x86_64-apple-darwin9.8.0 locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] grid stats graphics grDevices utils datasets methods base other attached packages: [1] GenomeGraphs_1.8.0 biomaRt_2.4.0 bitops_1.0-4.1 Rsamtools_1.0.1 [5] BSgenome.Hsapiens.UCSC.hg18_1.3.16 BSgenome_1.16.1 GenomicRanges_1.0.1 RSQLite_0.8-4 [9] DBI_0.2-5 Biostrings_2.16.0 IRanges_1.6.1 loaded via a namespace (and not attached): [1] Biobase_2.8.0 GenomeAnnotations_0.1.1 RCurl_1.3-1 tools_2.11.0 XML_2.8-1 -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact
Cancer BSgenome BSgenome Cancer BSgenome BSgenome • 1.4k views
ADD COMMENT
0
Entering edit mode
@steve-lianoglou-2771
Last seen 13 months ago
United States
Hi, On Wed, May 12, 2010 at 3:35 PM, Steve Lianoglou <mailinglist.honeypot at="" gmail.com=""> wrote: > Hi, > > I think I've found a corner case in the findOverlaps function when you are: > > (i) omitting the subject arg > (ii) both ignoreSelf and ignoreRedundant areTRUE > (iii) and only 1 overlap should be returned(?) <-- not sure about this one I think adding a judicious ",drop=FALSE]" in line112 IntervalTree-utils.R (rev 46808) would solve the problem, ie: mat <- mat[!duplicated(norm_mat),,drop=FALSE] -steve > > Example: > > R> x <- IRanges(c(1, 10, 20), width=c(5, 11, 5)) > R> findOverlaps(x, ignoreSelf=TRUE, ignoreRedundant=TRUE) > Error in checkSlotAssignment(object, name, value) : > ?assignment of an object of class "integer" is not valid for slot > "matchMatrix" in an object of class "RangesMatching"; is(value, > "matrix") is not TRUE > > It works, however, when ignoreSelf && ignoreReduncant == FALSE > > R> findOverlaps(x, ignoreRedundant=TRUE) ?## this is fine > R> findOverlaps(x, ignoreSelf=TRUE) ?## also fine > > sessionInfo() > R version 2.11.0 Patched (2010-05-05 r51909) > x86_64-apple-darwin9.8.0 > > locale: > [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 > > attached base packages: > [1] grid ? ? ?stats ? ? graphics ?grDevices utils ? ? datasets > methods ? base > > other attached packages: > ?[1] GenomeGraphs_1.8.0 ? ? ? ? ? ? ? ? biomaRt_2.4.0 > ? ?bitops_1.0-4.1 ? ? ? ? ? ? ? ? ? ? Rsamtools_1.0.1 > ?[5] BSgenome.Hsapiens.UCSC.hg18_1.3.16 BSgenome_1.16.1 > ? ?GenomicRanges_1.0.1 ? ? ? ? ? ? ? ?RSQLite_0.8-4 > ?[9] DBI_0.2-5 ? ? ? ? ? ? ? ? ? ? ? ? ?Biostrings_2.16.0 > ? ?IRanges_1.6.1 > > loaded via a namespace (and not attached): > [1] Biobase_2.8.0 ? ? ? ? ? GenomeAnnotations_0.1.1 RCurl_1.3-1 > ? ? tools_2.11.0 ? ? ? ? ? ?XML_2.8-1 > > -- > Steve Lianoglou > Graduate Student: Computational Systems Biology > ?| Memorial Sloan-Kettering Cancer Center > ?| Weill Medical College of Cornell University > Contact Info: http://cbio.mskcc.org/~lianos/contact > -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact
ADD COMMENT
0
Entering edit mode
One more : sorry for the spam: On Wed, May 12, 2010 at 3:54 PM, Steve Lianoglou <mailinglist.honeypot at="" gmail.com=""> wrote: > Hi, > > On Wed, May 12, 2010 at 3:35 PM, Steve Lianoglou > <mailinglist.honeypot at="" gmail.com=""> wrote: >> Hi, >> >> I think I've found a corner case in the findOverlaps function when you are: >> >> (i) omitting the subject arg >> (ii) both ignoreSelf and ignoreRedundant areTRUE >> (iii) and only 1 overlap should be returned(?) <-- not sure about this one > > I think adding a judicious ",drop=FALSE]" in line112 > IntervalTree-utils.R (rev 46808) would solve the problem, ie: > > mat <- mat[!duplicated(norm_mat),,drop=FALSE] I guess doing the same on line 108 might be prudent as well. -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact
ADD REPLY
0
Entering edit mode
Thanks -- fixed in 1.7.2. On Wed, May 12, 2010 at 12:55 PM, Steve Lianoglou < mailinglist.honeypot@gmail.com> wrote: > One more : sorry for the spam: > > On Wed, May 12, 2010 at 3:54 PM, Steve Lianoglou > <mailinglist.honeypot@gmail.com> wrote: > > Hi, > > > > On Wed, May 12, 2010 at 3:35 PM, Steve Lianoglou > > <mailinglist.honeypot@gmail.com> wrote: > >> Hi, > >> > >> I think I've found a corner case in the findOverlaps function when you > are: > >> > >> (i) omitting the subject arg > >> (ii) both ignoreSelf and ignoreRedundant areTRUE > >> (iii) and only 1 overlap should be returned(?) <-- not sure about this > one > > > > I think adding a judicious ",drop=FALSE]" in line112 > > IntervalTree-utils.R (rev 46808) would solve the problem, ie: > > > > mat <- mat[!duplicated(norm_mat),,drop=FALSE] > > I guess doing the same on line 108 might be prudent as well. > > -- > Steve Lianoglou > Graduate Student: Computational Systems Biology > | Memorial Sloan-Kettering Cancer Center > | Weill Medical College of Cornell University > Contact Info: http://cbio.mskcc.org/~lianos/contact<http: cbio.mskc="" c.org="" %7elianos="" contact=""> > > _______________________________________________ > 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 REPLY

Login before adding your answer.

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