#! /bin/awk -f # converts BED12 input into GFF { split($11,sz,","); split($12,st,","); for(i=1; i<=$10; i++) { line[i]=$1"\thts\texon\t"($2+st[i]+1)"\t"($2+st[i]+sz[i])"\t.\t"$6"\t.\tgene_id \""$4"\"; transcript_id \""$4"\";"; } if(rev==""||rev==0) { for(i=1; i<=$10; i++) { print line[i]; } } else { for(i=$10; i>=1; i--) { print line[i]; } } }