This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Grow/shrink ranges in bed file to a specified length

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 answer

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);}'

??

Log in to answer this question.