i made gff annotation file with cds functional annotation i want add parent id to all transcript annotation including exon utr cds mrna and relate all of them to parent gene and change gene name by cds name
I think you are screw because you don't have ID/Parent attributes to link the related-features together, neither a shared attribute between the related-features (i.e locus_tag), and it cannot be parsed sequentially because the file has been sorted and features related to a same record are spread over the file.
You can maybe try to use the ID of features as a shared attribute by clipping the suffix (prefix are similar between the CDS,mRNA, gene ...)