Get overlapping features with certain fraction max
Hi, Given two bed files, I want to get the overlapping feature which has at most x bp overlap. Probably I should use closest bed but how to restrict the overlap to some x bp at most?
• 950 views
•
link
1 answer
pipe the output of bedtools intersect into awk to filter on the overlapsize:
awk '{x1=int($2);x2=int($5);B=x1<x2?x2:x1; x1=int($3);x2=int($6);E=x1<x2?x1:x2;if(E-B<20) print}'
• 0 views
•
link
Log in to answer this question.