gpertea / gffcompare

classify, merge, tracking and annotation of GFF files by comparing to a reference annotation GFF
MIT License
198 stars 32 forks source link

why -x and -y option print empty file #50

Closed fjptwenger closed 4 years ago

fjptwenger commented 4 years ago

I use command: gffread -x sample.CDS.fa -y sample.CDS.protein.fa -g GRCh38.fasta sample.gtf
and No errors appear,but both sample.CDS.fa and sample.CDS.protein.fa are empty file,Why is this happening?

the head of the sample.gtf:

1   StringTie   transcript  356184  357780  1000    +   .   gene_id "MSTRG.49"; transcript_id "MSTRG.49.1"; 
1   StringTie   exon    356184  356438  1000    +   .   gene_id "MSTRG.49"; transcript_id "MSTRG.49.1"; exon_number "1"; 
1   StringTie   exon    357540  357780  1000    +   .   gene_id "MSTRG.49"; transcript_id "MSTRG.49.1"; exon_number "2"; 
1   StringTie   transcript  1488502 1572128 1000    -   .   gene_id "MSTRG.70"; transcript_id "MSTRG.70.1"; 
1   StringTie   exon    1488502 1488533 1000    -   .   gene_id "MSTRG.70"; transcript_id "MSTRG.70.1"; exon_number "1"; 
1   StringTie   exon    1565130 1572128 1000    -   .   gene_id "MSTRG.70"; transcript_id "MSTRG.70.1"; exon_number "2"; 
1   StringTie   transcript  2147579 2148044 1000    -   .   gene_id "MSTRG.79"; transcript_id "MSTRG.79.1"; 
1   StringTie   exon    2147579 2147793 1000    -   .   gene_id "MSTRG.79"; transcript_id "MSTRG.79.1"; exon_number "1"; 
1   StringTie   exon    2147992 2148044 1000    -   .   gene_id "MSTRG.79"; transcript_id "MSTRG.79.1"; exon_number "2"; 
gpertea commented 4 years ago

That seems to happen because there are no CDS features in the input gtf file (which looks like the output of a stringtie --merge operation, which only has exon features but no CDS features). Options -x and -y only produce output based on the CDS features.