Question: Get overlapping features with certain fraction max
0
gravatar for irfanwustl
23 days ago by
irfanwustl20
irfanwustl20 wrote:

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?

bedtools genome • 103 views
ADD COMMENTlink modified 23 days ago by Pierre Lindenbaum134k • written 23 days ago by irfanwustl20
0
gravatar for Pierre Lindenbaum
23 days ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum134k wrote:

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}'
ADD COMMENTlink written 23 days ago by Pierre Lindenbaum134k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1597 users visited in the last hour
_