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

Wouldn't awk work?

ADD REPLYlink written 2.1 years ago by Devon Ryan89k
4
gravatar for Pierre Lindenbaum
2.1 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum119k 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.1 years ago by Pierre Lindenbaum119k
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: 1088 users visited in the last hour