Tuesday, April 24, 2012

BED to GFF in one line

Here you go:

awk 'BEGIN{OFS="\t"}{ print $1,"qualimap",$4,$2,$3,$5,$6,".","bed" }' CpGIslandsByTakai.human.bed > file.gff

Here I use on 6 fields of BED file, but you can use this script as a basis and allow more fields to be used.

1 comment:

Moritz Schäfer said...

except it is wrong. bed is 0 index based and gff is 1 index based. (Note to future googlers)