Entering edit mode
GenomicRanges intersect is more like what I would call set intersect - first the sets of A and B are computed, then intersection is done.
Bedtools intersect finds the intersect of each interval in A with each interval in B which means that in the worst case, the number of output regions is the size of the cartesian product of A B as in the example below:
$ cat A.bed chr1 10 32 chr1 30 40 $ cat B.bed chr1 15 35 $ bedtools intersect -a A.bed -b B.bed chr1 15 32 chr1 30 35
Is this type of intersect possible in genomicranges? Thanks.
Edit: fixed example
Brilliant. Thanks!
It is just pintersect, no?
No.
pintersect()
afterfindOverlaps()