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

James W. MacDonald jmacdon at med.umich.edu
Tue Apr 13 16:24:47 CEST 2010


Has this been fixed in svn?

Michael Lawrence wrote:
> On Tue, Apr 13, 2010 at 2:38 AM, Robert Castelo <robert.castelo at upf.edu>wrote:
> 
>> 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..)
>>
>>
> It's a bug. Dimensions got switched around in RangesMatching, which confused
> RangesMatchingList. It's been broken since 2/26/10, in case anyone wants to
> re-run their scripts.
> 
> Thanks a lot for catching this,
> 
> Michael
> 
> 
>> 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
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at 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]]
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

-- 
James W. MacDonald, M.S.
Biostatistician
Douglas Lab
University of Michigan
Department of Human Genetics
5912 Buhl
1241 E. Catherine St.
Ann Arbor MI 48109-5618
734-615-7826
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues 



More information about the Bioconductor mailing list