jorvis / biocode

Bioinformatics code libraries and scripts
MIT License
504 stars 247 forks source link

correct_gff_feature_order.pl misplacing ##FASTA #29

Open ktretina opened 10 years ago

ktretina commented 10 years ago

Hello, While the script seems to work as advertised otherwise, when given a GFF file with a FASTA at the end of the file, correct_gff_feature_order.pl places the "##FASTA" header in the wrong place in the output file, such that this header is on the second line of the file like so:

1 ##gff-version 3 2 ##FASTA

The problem in the code seems to be here, where you need special handling of the "##FASTA" line:

first write the comments to the output file

for ( @commentlines ) { print $ofh "$\n"; }