Question: Grow/shrink ranges in bed file to a specified length
0
gravatar for boczniak767
3.5 years ago by
boczniak767690
Poland
boczniak767690 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 • 1.1k views
ADD COMMENTlink modified 3.5 years ago by Pierre Lindenbaum130k • written 3.5 years ago by boczniak767690

Wouldn't awk work?

ADD REPLYlink written 3.5 years ago by Devon Ryan96k
5
gravatar for Pierre Lindenbaum
3.5 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum130k 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 3.5 years ago by Pierre Lindenbaum130k
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: 1674 users visited in the last hour