NBISweden / AGAT

Another Gtf/Gff Analysis Toolkit
GNU General Public License v3.0
467 stars 56 forks source link

wrong transcript_id when outputting GTF when level2 and level1 features are missing #441

Closed Juke34 closed 8 months ago

Juke34 commented 8 months ago

Describe the bug transcript_id are wrongs...

General (please complete the following information):

To Reproduce agat_config should be set tp GTF output

Scaffold170 maker   exon    2883887 2884591 .   +   .   transcript_id "GBI_15721-RE"; gene_id "GBI_15721"; gene_name "GBI_15721";
Scaffold170 maker   exon    2885735 2885878 .   +   .   transcript_id "GBI_15721-RE"; gene_id "GBI_15721"; gene_name "GBI_15721";
Scaffold170 maker   exon    2885953 2886162 .   +   .   transcript_id "GBI_15721-RE"; gene_id "GBI_15721"; gene_name "GBI_15721";
Scaffold170 maker   exon    2886451 2886531 .   +   .   transcript_id "GBI_15721-RE"; gene_id "GBI_15721"; gene_name "GBI_15721";
Scaffold170 maker   exon    2887224 2888594 .   +   .   transcript_id "GBI_15721-RE"; gene_id "GBI_15721"; gene_name "GBI_15721";
Scaffold170 maker   CDS 2884322 2884591 .   +   0   transcript_id "GBI_15721-RE"; gene_id "GBI_15721"; gene_name "GBI_15721";
Scaffold170 maker   CDS 2885735 2885878 .   +   0   transcript_id "GBI_15721-RE"; gene_id "GBI_15721"; gene_name "GBI_15721";
Scaffold170 maker   CDS 2885953 2886162 .   +   0   transcript_id "GBI_15721-RE"; gene_id "GBI_15721"; gene_name "GBI_15721";
Scaffold170 maker   CDS 2886451 2886531 .   +   0   transcript_id "GBI_15721-RE"; gene_id "GBI_15721"; gene_name "GBI_15721";
Scaffold170 maker   CDS 2887224 2887376 .   +   0   transcript_id "GBI_15721-RE"; gene_id "GBI_15721"; gene_name "GBI_15721";
Scaffold170 maker   exon    2887524 2887566 .   +   .   transcript_id "GBI_15721-RF"; gene_id "GBI_15721"; gene_name "GBI_15721";
Scaffold170 maker   exon    2887651 2887775 .   +   .   transcript_id "GBI_15721-RF"; gene_id "GBI_15721"; gene_name "GBI_15721";
Scaffold170 maker   exon    2887917 2888009 .   +   .   transcript_id "GBI_15721-RF"; gene_id "GBI_15721"; gene_name "GBI_15721";
Scaffold170 maker   CDS 2887524 2887566 .   +   0   transcript_id "GBI_15721-RF"; gene_id "GBI_15721"; gene_name "GBI_15721";
Scaffold170 maker   CDS 2887651 2887775 .   +   2   transcript_id "GBI_15721-RF"; gene_id "GBI_15721"; gene_name "GBI_15721";
Scaffold170 maker   CDS 2887917 2888009 .   +   0   transcript_id "GBI_15721-RF"; gene_id "GBI_15721"; gene_name "GBI_15721";

output:

Formating output to GTFrelax
Level3 agat-cds-6: We replace the transcript_id GBI_15721-RF by GBI_15721-RE. We save original transcript_id into previous_transcript_id attribute.
Level3 agat-cds-7: We replace the transcript_id GBI_15721-RF by GBI_15721-RE. We save original transcript_id into previous_transcript_id attribute.
Level3 agat-cds-8: We replace the transcript_id GBI_15721-RF by GBI_15721-RE. We save original transcript_id into previous_transcript_id attribute.
Level3 agat-exon-6: We replace the transcript_id GBI_15721-RF by GBI_15721-RE. We save original transcript_id into previous_transcript_id attribute.
Level3 agat-exon-7: We replace the transcript_id GBI_15721-RF by GBI_15721-RE. We save original transcript_id into previous_transcript_id attribute.
Level3 agat-exon-8: We replace the transcript_id GBI_15721-RF by GBI_15721-RE. We save original transcript_id into previous_transcript_id attribute.
##gtf-version X
# GFF-like GTF i.e. not checked against any GTF specification. Conversion based on GFF input, standardised by AGAT.
Scaffold170 AGAT    gene    2883887 2888594 .   +   .   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "GBI_15721"; gene_name "GBI_15721";
Scaffold170 AGAT    mRNA    2883887 2888594 .   +   .   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "GBI_15721-RE"; Parent "GBI_15721"; gene_name "GBI_15721";
Scaffold170 maker   exon    2883887 2884591 .   +   .   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "agat-exon-1"; Parent "GBI_15721-RE"; gene_name "GBI_15721";
Scaffold170 maker   exon    2885735 2885878 .   +   .   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "agat-exon-2"; Parent "GBI_15721-RE"; gene_name "GBI_15721";
Scaffold170 maker   exon    2885953 2886162 .   +   .   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "agat-exon-3"; Parent "GBI_15721-RE"; gene_name "GBI_15721";
Scaffold170 maker   exon    2886451 2886531 .   +   .   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "agat-exon-4"; Parent "GBI_15721-RE"; gene_name "GBI_15721";
Scaffold170 maker   exon    2887224 2888594 .   +   .   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "agat-exon-5"; Parent "GBI_15721-RE"; gene_name "GBI_15721";
Scaffold170 maker   CDS 2884322 2884591 .   +   0   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "agat-cds-1"; Parent "GBI_15721-RE"; gene_name "GBI_15721";
Scaffold170 maker   CDS 2885735 2885878 .   +   0   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "agat-cds-2"; Parent "GBI_15721-RE"; gene_name "GBI_15721";
Scaffold170 maker   CDS 2885953 2886162 .   +   0   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "agat-cds-3"; Parent "GBI_15721-RE"; gene_name "GBI_15721";
Scaffold170 maker   CDS 2886451 2886531 .   +   0   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "agat-cds-4"; Parent "GBI_15721-RE"; gene_name "GBI_15721";
Scaffold170 maker   CDS 2887224 2887376 .   +   0   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "agat-cds-5"; Parent "GBI_15721-RE"; gene_name "GBI_15721";
Scaffold170 AGAT    five_prime_UTR  2883887 2884321 .   +   .   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "agat-five_prime_utr-1"; Parent "GBI_15721-RE"; gene_name "GBI_15721";
Scaffold170 AGAT    three_prime_UTR 2887377 2888594 .   +   .   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "agat-three_prime_utr-1"; Parent "GBI_15721-RE"; gene_name "GBI_15721";
Scaffold170 AGAT    mRNA    2887524 2888009 .   +   .   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "GBI_15721-RF"; Parent "GBI_15721"; gene_name "GBI_15721";
Scaffold170 maker   exon    2887524 2887566 .   +   .   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "agat-exon-6"; Parent "GBI_15721-RF"; gene_name "GBI_15721"; previous_transcript_id "GBI_15721-RF";
Scaffold170 maker   exon    2887651 2887775 .   +   .   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "agat-exon-7"; Parent "GBI_15721-RF"; gene_name "GBI_15721"; previous_transcript_id "GBI_15721-RF";
Scaffold170 maker   exon    2887917 2888009 .   +   .   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "agat-exon-8"; Parent "GBI_15721-RF"; gene_name "GBI_15721"; previous_transcript_id "GBI_15721-RF";
Scaffold170 maker   CDS 2887524 2887566 .   +   0   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "agat-cds-6"; Parent "GBI_15721-RF"; gene_name "GBI_15721"; previous_transcript_id "GBI_15721-RF";
Scaffold170 maker   CDS 2887651 2887775 .   +   2   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "agat-cds-7"; Parent "GBI_15721-RF"; gene_name "GBI_15721"; previous_transcript_id "GBI_15721-RF";
Scaffold170 maker   CDS 2887917 2888009 .   +   0   gene_id "GBI_15721"; transcript_id "GBI_15721-RE"; ID "agat-cds-8"; Parent "GBI_15721-RF"; gene_name "GBI_15721"; previous_transcript_id "GBI_15721-RF";