[BioC] Bug in set operations over IRanges objects with non-NULL elementMetadata()

Steve Lianoglou mailinglist.honeypot at gmail.com
Fri Oct 15 03:55:24 CEST 2010


Hi,

Subject says it all. Here's an example:

R> library(IRanges)
R> i1 <- IRanges(1, 10)
R> i2 <- IRanges(c(1, 15), width=5)
R> i3 <- i2
R> values(i3) <- DataFrame(score=1:2)

R> union(i1, i2)
IRanges of length 2
    start end width
[1]     1  10    10
[2]    15  19     5

R> union(i1, i3)
Error in reduce(c(x0, y), drop.empty.ranges = TRUE) :
  error in evaluating the argument 'x' in selecting a method for
function 'reduce'

R> setdiff(i1, i2)
IRanges of length 1
    start end width
[1]     6  10     5

R> setdiff(i1, i3)
Error in gaps(union(gaps(x, start = start, end = end), y), start = start,  :
  error in evaluating the argument 'x' in selecting a method for function 'gaps'

R> sessionInfo()
R version 2.12.0 beta (2010-09-30 r53084)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
[1] GenomicRanges_1.1.36 IRanges_1.7.39

-steve

-- 
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



More information about the Bioconductor mailing list