Friday, April 22, 2016

Extend the range of bed file using awk

If you have a bed file with 3 tab separated columns and want to extend the range, e.g. +/-2000bp, it can be done easily with awk:

awk  -F" " '{print $1 "\t" $2-2000 "\t"$3+2000}' file.bed

No comments:

Post a Comment