I am predicting genes using GeneMark-ES
, I managed to generate a gtf
file, but when I tried to extract the nt/protein sequence using get_sequence_from_GTF.pl
, I am running into an error in the format of the gtf file, which I find puzzing as it was the gtf file was generated using gmes_petap.pl
(an script in the GeneMark-ES
package).
Here is the command I used and the error message which also prints the first line of the genemark.gtf file:
$ get_sequence_from_GTF.pl genemark.gtf DT_CAJQTU010000037_1.fasta
error in file format GTF: CAJQTU010000037.1 Desoria tigrina genome assembly, contig: utg000040l, whole genome shotgun sequence GeneMark.hmm3 gene 2099 4039 . + . gene_id "1_g"; transcript_id "1_t";
I think I have found the line in get_sequence_from_GTF.pl
that is causing the error, but not being a perl monk, I am having troubles to read figure out what is wrong with my gtf
file and more importantly figure out how to fix it.
...
if ( /^(\S+)\t\S+\t(\S+)\t(\d+)\t(\d+)\t.\t([\+-])\t([012.])\tgene_id \"(\S+)\"/ )
{
... (some stuff)
}
else
{
if ( /^\s+$/ ) { next };
if ( /^#/ ) { next };
die( "error in file format GTF: $_\n" );
}
...