Question: Detecting Overlaps within Grange Object
gravatar for user_g
2.6 years ago by
user_g20 wrote:


I have a Grange object which contains coordinates. I am using


function from the

GenomicRanges Package

inorder to detect overlaps. They provide 2 options, either minOverlap or maxGap. But I was trying to find a way to detect, maxOverlap or minGap. Is there a way to get to these options from the findOverlap function?

granges genomicranges R • 1.1k views
ADD COMMENTlink modified 2.6 years ago by d-cameron2.3k • written 2.6 years ago by user_g20
gravatar for d-cameron
2.6 years ago by
d-cameron2.3k wrote:

maxOverlap or minGap

These are exceedingly strange overlap requirements. What are you trying to do? Do you really want to do this?

If you really want these, then you should generate all possible pairings between query and subject, then removing the pairings that satisfy the corresponding minOverlap or maxGap criteria using the standard a findOverlaps() invocation.

For a non-overlapping granges with 1000 elements, a findOverlaps() with a maxOverlap or minGap of 0 of the granges object with itself will return 999,000 "overlaps" (all 1000*1000 combinations minus the 1000 self overlaps that actually overlap). Are you sure this is what you actually want to do?

ADD COMMENTlink modified 2.6 years ago • written 2.6 years ago by d-cameron2.3k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1958 users visited in the last hour