[BioC] query and subject hits in findOverlaps through different space names

Robert Castelo robert.castelo at upf.edu
Tue Apr 13 11:38:54 CEST 2010


dear list and, particularly, IRanges developers,

i've noticed a change shown below in the functionality of the
findOverlap function from the IRanges package from the current BioC
release version 2.10 to the current BioC devel (about to become release)
version 2.11 (i've checked-out the latest IRanges version at the svn
repository).

this change seems to alter the way in which findOverlaps() return the
hits. in the current release findOverlaps() was returning the index of
the hits with respect to the entire RangedData object while in the
current devel version it does it with respect to the corresponding
space. is this an intended change or is it a bug? (i was happier with
the behavior of the release..)


thanks!
robert.

=========================current release 2.10==================
suppressPackageStartupMessages(library(IRanges))

x <- RangedData(IRanges(start=c(1,6), end=c(5,10)),
                        space=c("chr1","chr2"))
x
RangedData with 2 rows and 0 value columns across 2 spaces
        space    ranges |
  <character> <IRanges> |
1        chr1   [1,  5] |
2        chr2   [6, 10] |

y <- RangedData(IRanges(start=8, end=10),
                        space="chr2")
y
RangedData with 1 row and 0 value columns across 1 space
        space    ranges |
  <character> <IRanges> |
1        chr2   [8, 10] |

as.matrix(findOverlaps(x, y))
     query subject
[1,]     2       1
sessionInfo()
R version 2.10.1 (2009-12-14) 
x86_64-unknown-linux-gnu 

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods
base     

other attached packages:
[1] IRanges_1.4.14
===============================================================

========================current devel 2.11=====================
suppressPackageStartupMessages(library(IRanges))

x <- RangedData(IRanges(start=c(1,6), end=c(5,10)),
                        space=c("chr1","chr2"))
x
RangedData with 2 rows and 0 value columns across 2 spaces
        space    ranges |
  <character> <IRanges> |
1        chr1   [1,  5] |
2        chr2   [6, 10] |
y <- RangedData(IRanges(start=8, end=10),
                        space="chr2")
y
RangedData with 1 row and 0 value columns across 1 space
        space    ranges |
  <character> <IRanges> |
1        chr2   [8, 10] |
as.matrix(findOverlaps(x, y))
     query subject
[1,]     1       1
R version 2.11.0 Under development (unstable) (2010-02-25 r51180) 
x86_64-unknown-linux-gnu 

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods
base     

other attached packages:
[1] IRanges_1.5.76



More information about the Bioconductor mailing list