Question: Beedtools intersect: more peaks intersected than intersected portions of those peaks?
0
2.5 years ago by
salamandra330
salamandra330 wrote:

When finding the number of peaks/genomic regions in A that intersects with B and C (note even the non-overlaping part of each peak is reported):

`````` bedtools intersect -f 0.5 -r -wa -a \$A -b \$B -sorted | sort -k1,1 -k2,2n | uniq > Apeaks.intersectingwith.B
bedtools intersect -f 0.5 -r -wa -a Apeaks.intersectingwith.B -b \$C -sorted | sort -k1,1 -k2,2n | uniq > Apeaks.intersectingwith.B.and.C
wc -l Apeaks.intersectingwith.B.and.C
``````

we get 7 peaks/regions

But, when finding the number of regions that overlap in A, B and C (only the overlaping part of each peak is reported):

``````bedtools intersect -f 0.5 -r -a A.area.intersecting.B -b \$C -sorted | sort -k1,1 -k2,2n | uniq > A.area.intersecting.B.and.C
wc -l A.area.intersecting.B.and.C
``````

we get 6 regions

How is it possible to have more peaks that intersect (in A), than intersecting areas of those peaks?? I don't get it..