[Bioc-sig-seq] IRange overlap percentage

Kunbin Qu KQu at genomichealth.com
Tue Sep 7 19:27:53 CEST 2010


Hi,

I have some IRanges like the followings. I would like to find out the
overlap of x and y, and also the actual overlap percentage to each when
they overlap. For the following case, IRanges 3 in x overlaps with
IRanges 2 in y from 8 -9. Is there a function to call to give me the
overlap% for x and y, which are 2/3 = 67% for x, 2/4 = 50% for y? thanks
a lot!

-Kunbin


> x
IRanges of length 3
    start end width
[1]     1   2     2
[2]     5   6     2
[3]     7   9     3
> y
IRanges of length 2
    start end width
[1]     3   4     2
[2]     8  11     4
> findOverlaps(x,y)
An object of class "RangesMatching"
Slot "matchMatrix":
     query subject
[1,]     3       2

Slot "DIM":
[1] 3 2

>

______________________________________________________________________
The contents of this electronic message, including any attachments, are intended only for the use of the individual or entity to which they are addressed and may contain confidential information. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this message or any attachment is strictly prohibited. If you have received this transmission in error, please send an e-mail to postmaster at genomichealth.com and delete this message, along with any attachments, from your computer.



More information about the Bioc-sig-sequencing mailing list