Question: Beedtools intersect: more peaks intersected than intersected portions of those peaks?
gravatar for salamandra
4 days ago by
salamandra110 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..

ADD COMMENTlink modified 3 days ago • written 4 days ago by salamandra110
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: 1008 users visited in the last hour