Question: Grow/shrink ranges in bed file to a specified length
0
gravatar for boczniak767
2.9 years ago by
boczniak767680
Poland
boczniak767680 wrote:

Is there any tool which can make entries in bed file equal length?

I've checked bedtools slop but it's not what I'm looking for.

The goal is to get fasta file with equal-sized sequences, but I've to start with bed file with my coordinates.

bed • 927 views
ADD COMMENTlink modified 2.9 years ago by Pierre Lindenbaum125k • written 2.9 years ago by boczniak767680

Wouldn't awk work?

ADD REPLYlink written 2.9 years ago by Devon Ryan93k
5
gravatar for Pierre Lindenbaum
2.9 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum125k wrote:
awk -F '\t' '{X=10000; mid=(int($2)+int($3))/2;printf("%s\t%d\t%d\n",$1,(mid-X<0?0:mid-X),mid+X);}'

??

ADD COMMENTlink written 2.9 years ago by Pierre Lindenbaum125k
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: 1753 users visited in the last hour