[BioC] help with reduction operation using IRanges/GRanges

Steve Lianoglou mailinglist.honeypot at gmail.com
Wed Apr 25 00:54:07 CEST 2012


Hi,

On Tue, Apr 24, 2012 at 6:43 PM, Kasper Daniel Hansen
<kasperdanielhansen at gmail.com> wrote:
>> ir <- IRanges(start = c(1,5), width = 3)
>> ir
> IRanges of length 2
>    start end width
> [1]     1   3     3
> [2]     5   7     3
>> reduce(ir)
> IRanges of length 2
>    start end width
> [1]     1   3     3
> [2]     5   7     3
>> reduce(ir, min.gapwidth = 2)
> IRanges of length 1
>    start end width
> [1]     1   7     7
>
> As far as I understand, this is exactly what you want.  If you have
> further questions, I suggest you read the help page.

This actually isn't what he wants -- but what he wants isn't
answerable w/ `reduce`.

All of the OP's ranges overlap eachother -- I think he's trying to
split his ranges into two groups because one group has ends that are
very close to each other and the other's are a bit different. Note
that the last two rows, the ends are a greater distance away from (but
still *within*) the ends of the first group of ranges he's trying to
group.

It's almost trying to cluster groups of reads together, but again -- not really.

Not sure why you might want to do this, but ... just to say that
reduce isn't the answer here.

-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