Entering edit mode
2.7 years ago
bright602
▴
50
Hi, I have a gtf file. Could someone tell me how to change the order of attributes on the 9th column (gene_id comes first, then transcript_id, and lastly gene_name)?
Currently the format is below:
DDB0169550 dictyBase Curator exon 11729 12478 . + . transcript_id "DDB0201587"; gene_id "DDB_G0294088"; gene_name "A";
DDB0169550 dictyBase Curator exon 13479 13862 . + . transcript_id "DDB0201587"; gene_id "DDB_G0294088"; gene_name "B";
DDB0169550 dictyBase Curator CDS 6411 6676 . + 0 transcript_id "DDB0201587"; gene_id "DDB_G0294088"; gene_name "C";
Thanks for your help!
May I ask why you want to change the order of the attributes? In theory it should not matter.
EDIT: Sorry I'm wrong, in GTF there are two mandatory attributes gene_id and transcript_id, any other attributes or comments must appear after these two. So yes order matter. (More details here: https://agat.readthedocs.io/en/latest/gxf.html)