Detecting Overlaps within Grange Object
1
0
Entering edit mode
6.6 years ago
user_g ▴ 20

Hello,

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

findOverlaps()

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?

R genomicRanges Granges • 2.6k views
ADD COMMENT
0
Entering edit mode
6.6 years ago
d-cameron ★ 2.9k

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 COMMENT

Login before adding your answer.

Traffic: 2072 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