[BioC] Recycling vars with IRanges::reflect

Steve Lianoglou mailinglist.honeypot at gmail.com
Mon Apr 12 21:22:30 CEST 2010


Hi all,

I was messing around with the IRanges::reflect method, wanting to
reflect an IRanges object (with many inner ranges) within 1 large
bounds. For instance, something like so:

R> reflect(IRanges(c(1,20,30), width=5), IRanges(1, 34))

However I get this message:

Error in reflect(IRanges(c(1, 20, 30), width = 5), IRanges(1, 34)) :
  'bounds' must be a Ranges object of length equal to that of 'x'

Which, I guess, is fine, because I can always do:

R> reflect(IRanges(c(1,20,30), width=5), IRanges(c(1,1,1), c(34,34,34)))

But the section that address "reflect" in ?reflect says:

    reflect "reflects" or reverses each range in x relative to the
    corresponding range in bounds, which is *recycled as necessary*.

(ASCII-emphasis mine)

But it seems that neither the `bounds` or `x` var is recycled anyway I
slice it. So, I'm curious if there's a discrepancy between the
documentation and (i) the implementation; or (ii) my understanding.

btw - I'm using IRanges_1.5.74

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