how much positions overlapped for each pair of the pairs obtained by findoverlap.
1
0
Entering edit mode
vinod.acear ▴ 50
@vinodacear-8884
Last seen 3.6 years ago
India

I have got overlapping pairs list using findoverlap function on two granges, i want to know  how much positions overlapped for each  pair of  the pairs obtained by findoverlap.

granges genomicranges findoverlaps subsetbyoverlaps • 1.5k views
ADD COMMENT
3
Entering edit mode
@herve-pages-1542
Last seen 14 hours ago
Seattle, WA, United States

Hi,

So you have a Hits object that you got by calling findOverlaps() on your GRanges objects query and subject, e.g. by doing something like:

hits <- findOverlaps(query, subject, ...)

Now you can get the corresponding overlap as a range for each pair in hits with:

overlap <- pintersect(query[queryHits(hits)],
                      subject[subjectHits(hits)])

and the number of positions in each overlap with:

width(overlap)

Cheers,

H.

ADD COMMENT
0
Entering edit mode

Thanks herve

ADD REPLY

Login before adding your answer.

Traffic: 873 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6