Grow/shrink ranges in bed file to a specified length
1
0
Entering edit mode
7.7 years ago
boczniak767 ▴ 870

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 • 2.6k views
ADD COMMENT
0
Entering edit mode

Wouldn't awk work?

ADD REPLY
6
Entering edit mode
7.7 years ago
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 COMMENT

Login before adding your answer.

Traffic: 2684 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6