My fasta file header is like this:
>MSTRG.8.1 gene=MSTRG.8 AATCGACCAGAACGTTGACGACTTCTTGAAGCTTATAGCCGATCTCAACAATCTCAACATTGAGATTCCA >MSTRG.10.1 gene=MSTRG.10 TCATCAGACTCTTCCGCAACCAATACTTCTACCCTTCAGAAGCTCCCTATCAAAGTAGGAATCTTTTATA >MSTRG.10.2 gene=MSTRG.10 TTCTACCCTTCAGAAGCTCCCTATCAAAGACAAATCTACAGGTCATGTGACTAAAGA
And gene Id is like this:
MSTRG.8.1 gene=MSTRG.8 MSTRG.10.1 gene=MSTRG.10 MSTRG.10.2 gene=MSTRG.10
Could you please help How I can extract sequences for these gene ids from fasta file.
If I trim header of both file then I can able extract, but I need the same header in my fasta files.