>exon9_ENST00000462434|exon11_ENST00000462434|exon12_ENST00000462434|exon13_ENST00000462434|exon19_ENST00000462434|exon22_ENST00000462434|exon25_ENST00000462434|
GCAAATGAAACACCTGTTGGTCTTCTAATCCATTTGGGGGGTTTTTTCAGGGGAGGTATCAGTGGTGCTTGTGCCACTTGCTCTGGCACCTGCAGTGGTGGGAGAGGCTGGCCTTTGCTGAAGGAAGAGGAGATCTGGGGGGAAAAGACACCTGCATCGCCATCCTAAAGTGGCAGTTTAGTCAGGAACTCCACCTACAAACTCCATTTTGGGAGGAATCCTTGAGACACCCAATTTGACCTAGAAAGGTCAGACTCCCATATTCCAGGGGATGGGGAAGTGAGTGGTAGCGAGGGTGGGACTCCCATGCAAGTAGGCTCTTGGAAAGACTACTACATTCAAAGTCTACAATGGAGTGTGGCACAAAATGGATCTATAGAAGAGAGAAAGATAAGAGTCATACTCTTGAAATAACTGTCCCAGCAAAGGGGTCCCACGGTCCCTGAAATACTACAGGGCCCATCCAATAACAAGAGTCAAGGTGAAGGCCTTCTTCACATTGTGGCAGAAACTAACATCCTTTCAGGAAGATGGGCACTAGGGCAAAGGTGCAGCCCTCCCAAACCCCGGGCCCTGGTCTCCCAATCTCCAATATCTCCGCTTCTCAAGCCATATGTCTCTCTCCCACAAACAGAGACAGCCCCTTCCCTCCAGCATTCTCTACCAAGCCCTTCAAACCTTGTCAGCCTGTCTCATATGCTGGACTTCCCAGCTCCTACCCATCACAGAGTACAAACTGATCCAGCCGTTGAAGGAGGCAGCAGAGAACACTGAAGGGTCCCGAGGGCACCACTGCACATCAAAGCACCAGCTGCTCTGTGTTGGTAGCTTATATACCACTGCCTGATGTATAGTCTCATCTCCTTGCACCTGAGCTGTCTCTGGCGGGTTCTTCTGAAGCTCATCTTTACTGTATCCTAAAAGCTTTAGGAATTTCATTCTGGAGTCTTGCTCTAAGGTCACTGGCTGCAGAAGGCCTGTTGTCTGTCACTGTTGAGGTCATTTCCCTTGGGCTGAGGACTCTCACCTAGCCCCACGTCACTCTTCAACCATGTGGCCACTGGTGAGAAGGCTGGGATCCCAATCTGTAAGATGATGTCTCTTTAGAGTGGAGGGTAGCTCCCACAACAATCCGGGGGAAGGGGAAAGGGGGAGACTGTTGGCCCAAGACAGCAGAACCTTGAGCATGAAAAAGCCGATCTCTTAGCTGCTGAACTGGTGGTGCAGGCTGAGTTCTCCTGGAACTCCTGGGGGAGCATGACTCACACTGGAGACAGGGGGCTGTGAGGGAAGAATCCCTTGTAGCTCAGGGGTGAGGCTCATAACTGGAGCAGTAATTGGTGCTGGGGGCATAAATGTCTCTGGCAGAAATCGAAGCAGCTTTATTGCACCATTAAGTACATCACTGCATCAAAGACAGTGCCACAAATGCAAATCCAATCGGAGAAGGTAGCCCTGAGACATGTGGTGGCTGCGAGGGAGAAGGACCCCCAACCCTTGAGGAGCAGCGCTGGAAGAGAATCATTCCTTAATATGGCTCCAATTCCAGAACTGGGCTTTATCATCACAGAAGGAATGGCCTTGGGCTAAGGCTCCAACATAGGTGGAGTCAAGGGCAGTTCCCCATAGGCTGTGGTTCCCCTGCTCCTGTCTCACAGCCTAAGACAGCTTCCAGCAAAAGGCAGTTCATCCCTTTCACCTTCCATCCAACCTAGCCCACCCTTAATAATGCCGGCAGATGAGAAATTCCATTTTAACAGCGCCAAAGTTTCCTCTCTTGGTTCTGCTCAGCACCCATCCCTCACGTCCATGAGTTGTTCAAAGGGTGAACAGCAGTCAGCTCTACCCCAGACCCTGGGCTACAGAGAAATACGGACCTGGAAATACCAAGTCAGAGGCAGGGAAAAGGTAAGGGCAGGCTCATAAACCACAGAAGGGAGAAACAAAAGACCCACATGATGGGTCACAGCAGAGGTAGGCTTAAAAGTAACAATCCTGTTCACCCTCTCAGAAGCCACTTAAATAGAAGATCCCTGGGGGAGAAGATATCCTGCCCCAGGTCCTTACAGAGTGTAGTATTAGGGAGAGTGAAGAACTGATTCTATGCCCTGCCTCCAGGCCTGAGAGTGTCTTGGACAGATCCTAGAAGGCCAGACATAAAGGAGTAAAAAGCAGGCACTCAGCTGGTTTGGAGCCAAGCCTACAGCATCACATACCTGGCAGCAAGGAAAAGAGTCGGGAAAAAGAAACAGAATCTGTTGCAGAAGTCCCCTCTTCTGCAGGGAGGAGTTATGTAACAGCAGAAGTGGCCTCCTAGCAAGAGAGGCTGCCTGGTTTAGACCAGCAGCTTATGAGCGATGATGAGGACAGCCTTCAGGATAGGCATGAAGCTGGACACCTCGCTGAAGCTGCTACAGCCCGCCACCTGGGCATGCACTGCAAGGCCCTGCTCAAAGCTTCCTGCATCCACACATCGGGCAACCTCATGGAGCCCAGCCACGACATGAGGTGAGAG
>exon9_ENST00000462434|exon11_ENST00000462434|exon12_ENST00000462434|exon13_ENST00000462434|exon19_ENST00000462434|exon22_ENST00000462434|exon24_ENST00000462434|
GCAAATGAAACACCTGTTGGTCTTCTAATCCATTTGGGGGGTTTTTTCAGGGGAGGTATCAGTGGTGCTTGTGCCACTTGCTCTGGCACCTGCAGTGGTGGGAGAGGCTGGCCTTTGCTGAAGGAAGAGGAGATCTGGGGGGAAAAGACACCTGCATCGCCATCCTAAAGTGGCAGTTTAGTCAGGAACTCCACCTACAAACTCCATTTTGGGAGGAATCCTTGAGACACCCAATTTGACCTAGAAAGGTCAGACTCCCATATTCCAGGGGATGGGGAAGTGAGTGGTAGCGAGGGTGGGACTCCCATGCAAGTAGGCTCTTGGAAAGACTACTACATTCAAAGTCTACAATGGAGTGTGGCACAAAATGGATCTATAGAAGAGAGAAAGATAAGAGTCATACTCTTGAAATAACTGTCCCAGCAAAGGGGTCCCACGGTCCCTGAAATACTACAGGGCCCATCCAATAACAAGAGTCAAGGTGAAGGCCTTCTTCACATTGTGGCAGAAACTAACATCCTTTCAGGAAGATGGGCACTAGGGCAAAGGTGCAGCCCTCCCAAACCCCGGGCCCTGGTCTCCCAATCTCCAATATCTCCGCTTCTCAAGCCATATGTCTCTCTCCCACAAACAGAGACAGCCCCTTCCCTCCAGCATTCTCTACCAAGCCCTTCAAACCTTGTCAGCCTGTCTCATATGCTGGACTTCCCAGCTCCTACCCATCACAGAGTACAAACTGATCCAGCCGTTGAAGGAGGCAGCAGAGAACACTGAAGGGTCCCGAGGGCACCACTGCACATCAAAGCACCAGCTGCTCTGTGTTGGTAGCTTATATACCACTGCCTGATGTATAGTCTCATCTCCTTGCACCTGAGCTGTCTCTGGCGGGTTCTTCTGAAGCTCATCTTTACTGTATCCTAAAAGCTTTAGGAATTTCATTCTGGAGTCTTGCTCTAAGGTCACTGGCTGCAGAAGGCCTGTTGTCTGTCACTGTTGAGGTCATTTCCCTTGGGCTGAGGACTCTCACCTAGCCCCACGTCACTCTTCAACCATGTGGCCACTGGTGAGAAGGCTGGGATCCCAATCTGTAAGATGATGTCTCTTTAGAGTGGAGGGTAGCTCCCACAACAATCCGGGGGAAGGGGAAAGGGGGAGACTGTTGGCCCAAGACAGCAGAACCTTGAGCATGAAAAAGCCGATCTCTTAGCTGCTGAACTGGTGGTGCAGGCTGAGTTCTCCTGGAACTCCTGGGGGAGCATGACTCACACTGGAGACAGGGGGCTGTGAGGGAAGAATCCCTTGTAGCTCAGGGGTGAGGCTCATAACTGGAGCAGTAATTGGTGCTGGGGGCATAAATGTCTCTGGCAGGTCCCCTCACAGAGCTTCTCATATAGATACTCCAGACGCTGGGCTGCCTCTTCCAGCTTCCTTTTTGTCTT
>exon9_ENST00000462434|exon11_ENST00000462434|exon12_ENST00000462434|exon13_ENST00000462434|exon19_ENST00000462434|exon22_ENST00000462434|
GCAAATGAAACACCTGTTGGTCTTCTAATCCATTTGGGGGGTTTTTTCAGGGGAGGTATCAGTGGTGCTTGTGCCACTTGCTCTGGCACCTGCAGTGGTGGGAGAGGCTGGCCTTTGCTGAAGGAAGAGGAGATCTGGGGGGAAAAGACACCTGCATCGCCATCCTAAAGTGGCAGTTTAGTCAGGAACTCCACCTACAAACTCCATTTTGGGAGGAATCCTTGAGACACCCAATTTGACCTAGAAAGGTCAGACTCCCATATTCCAGGGGATGGGGAAGTGAGTGGTAGCGAGGGTGGGACTCCCATGCAAGTAGGCTCTTGGAAAGACTACTACATTCAAAGTCTACAATGGAGTGTGGCACAAAATGGATCTATAGAAGAGAGAAAGATAAGAGTCATACTCTTGAAATAACTGTCCCAGCAAAGGGGTCCCACGGTCCCTGAAATACTACAGGGCCCATCCAATAACAAGAGTCAAGGTGAAGGCCTTCTTCACATTGTGGCAGAAACTAACATCCTTTCAGGAAGATGGGCACTAGGGCAAAGGTGCAGCCCTCCCAAACCCCGGGCCCTGGTCTCCCAATCTCCAATATCTCCGCTTCTCAAGCCATATGTCTCTCTCCCACAAACAGAGACAGCCCCTTCCCTCCAGCATTCTCTACCAAGCCCTTCAAACCTTGTCAGCCTGTCTCATATGCTGGACTTCCCAGCTCCTACCCATCACAGAGTACAAACTGATCCAGCCGTTGAAGGAGGCAGCAGAGAACACTGAAGGGTCCCGAGGGCACCACTGCACATCAAAGCACCAGCTGCTCTGTGTTGGTAGCTTATATACCACTGCCTGATGTATAGTCTCATCTCCTTGCACCTGAGCTGTCTCTGGCGGGTTCTTCTGAAGCTCATCTTTACTGTATCCTAAAAGCTTTAGGAATTTCATTCTGGAGTCTTGCTCTAAGGTCACTGGCTGCAGAAGGCCTGTTGTCTGTCACTGTTGAGGTCATTTCCCTTGGGCTGAGGACTCTCACCTAGCCCCACGTCACTCTTCAACCATGTGGCCACTGGTGAGAAGGCTGGGATCCCAATCTGTAAGATGATGTCTCTTTAGAGTGGAGGGTAGCTCCCACAACAATCCGGGGGAAGGGGAAAGGGGGAGACTGTTGGCCCAAGACAGCAGAACCTTGAGCATGAAAAAGCCGATCTCTTAGCTGCTGAACTGGTGGTGCAGGCTGAGTTCTCCTGGAACTCCTGGGGGAGCATGACTCACACTGGAGACAGGGGGCTGTGAGGGAAGAATCCCTTGTAGCTCAGGGGTGAGGCTCATAACTGGAGCAGTAATTGGTGCTGGGGGCATAAATGTCTCTGGCAG
As above I have long fasta name file and i want to rename it by just include first and last name like :-
>exon9_ENST00000462434:exon25_ENST00000462434
GCAAATGAAACACCTGTTGGTCTTCTAATCCATTTGGGGGGTTTTTTCAGGGGAGGTATCAGTGGTGCTTGTGCCACTTGCTCTGGCACCTGCAGTGGTGGGAGAGGCTGGCCTTTGCTGAAGGAAGAGGAGATCTGGGGGGAAAAGACACCTGCATCGCCATCCTAAAGTGGCAGTTTAGTCAGGAACTCCACCTACAAACTCCATTTTGGGAGGAATCCTTGAGACACCCAATTTGACCTAGAAAGGTCAGACTCCCATATTCCAGGGGATGGGGAAGTGAGTGGTAGCGAGGGTGGGACTCCCATGCAAGTAGGCTCTTGGAAAGACTACTACATTCAAAGTCTACAATGGAGTGTGGCACAAAATGGATCTATAGAAGAGAGAAAGATAAGAGTCATACTCTTGAAATAACTGTCCCAGCAAAGGGGTCCCACGGTCCCTGAAATACTACAGGGCCCATCCAATAACAAGAGTCAAGGTGAAGGCCTTCTTCACATTGTGGCAGAAACTAACATCCTTTCAGGAAGATGGGCACTAGGGCAAAGGTGCAGCCCTCCCAAACCCCGGGCCCTGGTCTCCCAATCTCCAATATCTCCGCTTCTCAAGCCATATGTCTCTCTCCCACAAACAGAGACAGCCCCTTCCCTCCAGCATTCTCTACCAAGCCCTTCAAACCTTGTCAGCCTGTCTCATATGCTGGACTTCCCAGCTCCTACCCATCACAGAGTACAAACTGATCCAGCCGTTGAAGGAGGCAGCAGAGAACACTGAAGGGTCCCGAGGGCACCACTGCACATCAAAGCACCAGCTGCTCTGTGTTGGTAGCTTATATACCACTGCCTGATGTATAGTCTCATCTCCTTGCACCTGAGCTGTCTCTGGCGGGTTCTTCTGAAGCTCATCTTTACTGTATCCTAAAAGCTTTAGGAATTTCATTCTGGAGTCTTGCTCTAAGGTCACTGGCTGCAGAAGGCCTGTTGTCTGTCACTGTTGAGGTCATTTCCCTTGGGCTGAGGACTCTCACCTAGCCCCACGTCACTCTTCAACCATGTGGCCACTGGTGAGAAGGCTGGGATCCCAATCTGTAAGATGATGTCTCTTTAGAGTGGAGGGTAGCTCCCACAACAATCCGGGGGAAGGGGAAAGGGGGAGACTGTTGGCCCAAGACAGCAGAACCTTGAGCATGAAAAAGCCGATCTCTTAGCTGCTGAACTGGTGGTGCAGGCTGAGTTCTCCTGGAACTCCTGGGGGAGCATGACTCACACTGGAGACAGGGGGCTGTGAGGGAAGAATCCCTTGTAGCTCAGGGGTGAGGCTCATAACTGGAGCAGTAATTGGTGCTGGGGGCATAAATGTCTCTGGCAGAAATCGAAGCAGCTTTATTGCACCATTAAGTACATCACTGCATCAAAGACAGTGCCACAAATGCAAATCCAATCGGAGAAGGTAGCCCTGAGACATGTGGTGGCTGCGAGGGAGAAGGACCCCCAACCCTTGAGGAGCAGCGCTGGAAGAGAATCATTCCTTAATATGGCTCCAATTCCAGAACTGGGCTTTATCATCACAGAAGGAATGGCCTTGGGCTAAGGCTCCAACATAGGTGGAGTCAAGGGCAGTTCCCCATAGGCTGTGGTTCCCCTGCTCCTGTCTCACAGCCTAAGACAGCTTCCAGCAAAAGGCAGTTCATCCCTTTCACCTTCCATCCAACCTAGCCCACCCTTAATAATGCCGGCAGATGAGAAATTCCATTTTAACAGCGCCAAAGTTTCCTCTCTTGGTTCTGCTCAGCACCCATCCCTCACGTCCATGAGTTGTTCAAAGGGTGAACAGCAGTCAGCTCTACCCCAGACCCTGGGCTACAGAGAAATACGGACCTGGAAATACCAAGTCAGAGGCAGGGAAAAGGTAAGGGCAGGCTCATAAACCACAGAAGGGAGAAACAAAAGACCCACATGATGGGTCACAGCAGAGGTAGGCTTAAAAGTAACAATCCTGTTCACCCTCTCAGAAGCCACTTAAATAGAAGATCCCTGGGGGAGAAGATATCCTGCCCCAGGTCCTTACAGAGTGTAGTATTAGGGAGAGTGAAGAACTGATTCTATGCCCTGCCTCCAGGCCTGAGAGTGTCTTGGACAGATCCTAGAAGGCCAGACATAAAGGAGTAAAAAGCAGGCACTCAGCTGGTTTGGAGCCAAGCCTACAGCATCACATACCTGGCAGCAAGGAAAAGAGTCGGGAAAAAGAAACAGAATCTGTTGCAGAAGTCCCCTCTTCTGCAGGGAGGAGTTATGTAACAGCAGAAGTGGCCTCCTAGCAAGAGAGGCTGCCTGGTTTAGACCAGCAGCTTATGAGCGATGATGAGGACAGCCTTCAGGATAGGCATGAAGCTGGACACCTCGCTGAAGCTGCTACAGCCCGCCACCTGGGCATGCACTGCAAGGCCCTGCTCAAAGCTTCCTGCATCCACACATCGGGCAACCTCATGGAGCCCAGCCACGACATGAGGTGAGAG
>exon9_ENST00000462434:exon24_ENST00000462434
GCAAATGAAACACCTGTTGGTCTTCTAATCCATTTGGGGGGTTTTTTCAGGGGAGGTATCAGTGGTGCTTGTGCCACTTGCTCTGGCACCTGCAGTGGTGGGAGAGGCTGGCCTTTGCTGAAGGAAGAGGAGATCTGGGGGGAAAAGACACCTGCATCGCCATCCTAAAGTGGCAGTTTAGTCAGGAACTCCACCTACAAACTCCATTTTGGGAGGAATCCTTGAGACACCCAATTTGACCTAGAAAGGTCAGACTCCCATATTCCAGGGGATGGGGAAGTGAGTGGTAGCGAGGGTGGGACTCCCATGCAAGTAGGCTCTTGGAAAGACTACTACATTCAAAGTCTACAATGGAGTGTGGCACAAAATGGATCTATAGAAGAGAGAAAGATAAGAGTCATACTCTTGAAATAACTGTCCCAGCAAAGGGGTCCCACGGTCCCTGAAATACTACAGGGCCCATCCAATAACAAGAGTCAAGGTGAAGGCCTTCTTCACATTGTGGCAGAAACTAACATCCTTTCAGGAAGATGGGCACTAGGGCAAAGGTGCAGCCCTCCCAAACCCCGGGCCCTGGTCTCCCAATCTCCAATATCTCCGCTTCTCAAGCCATATGTCTCTCTCCCACAAACAGAGACAGCCCCTTCCCTCCAGCATTCTCTACCAAGCCCTTCAAACCTTGTCAGCCTGTCTCATATGCTGGACTTCCCAGCTCCTACCCATCACAGAGTACAAACTGATCCAGCCGTTGAAGGAGGCAGCAGAGAACACTGAAGGGTCCCGAGGGCACCACTGCACATCAAAGCACCAGCTGCTCTGTGTTGGTAGCTTATATACCACTGCCTGATGTATAGTCTCATCTCCTTGCACCTGAGCTGTCTCTGGCGGGTTCTTCTGAAGCTCATCTTTACTGTATCCTAAAAGCTTTAGGAATTTCATTCTGGAGTCTTGCTCTAAGGTCACTGGCTGCAGAAGGCCTGTTGTCTGTCACTGTTGAGGTCATTTCCCTTGGGCTGAGGACTCTCACCTAGCCCCACGTCACTCTTCAACCATGTGGCCACTGGTGAGAAGGCTGGGATCCCAATCTGTAAGATGATGTCTCTTTAGAGTGGAGGGTAGCTCCCACAACAATCCGGGGGAAGGGGAAAGGGGGAGACTGTTGGCCCAAGACAGCAGAACCTTGAGCATGAAAAAGCCGATCTCTTAGCTGCTGAACTGGTGGTGCAGGCTGAGTTCTCCTGGAACTCCTGGGGGAGCATGACTCACACTGGAGACAGGGGGCTGTGAGGGAAGAATCCCTTGTAGCTCAGGGGTGAGGCTCATAACTGGAGCAGTAATTGGTGCTGGGGGCATAAATGTCTCTGGCAGGTCCCCTCACAGAGCTTCTCATATAGATACTCCAGACGCTGGGCTGCCTCTTCCAGCTTCCTTTTTGTCTT
>exon9_ENST00000462434:exon22_ENST00000462434
GCAAATGAAACACCTGTTGGTCTTCTAATCCATTTGGGGGGTTTTTTCAGGGGAGGTATCAGTGGTGCTTGTGCCACTTGCTCTGGCACCTGCAGTGGTGGGAGAGGCTGGCCTTTGCTGAAGGAAGAGGAGATCTGGGGGGAAAAGACACCTGCATCGCCATCCTAAAGTGGCAGTTTAGTCAGGAACTCCACCTACAAACTCCATTTTGGGAGGAATCCTTGAGACACCCAATTTGACCTAGAAAGGTCAGACTCCCATATTCCAGGGGATGGGGAAGTGAGTGGTAGCGAGGGTGGGACTCCCATGCAAGTAGGCTCTTGGAAAGACTACTACATTCAAAGTCTACAATGGAGTGTGGCACAAAATGGATCTATAGAAGAGAGAAAGATAAGAGTCATACTCTTGAAATAACTGTCCCAGCAAAGGGGTCCCACGGTCCCTGAAATACTACAGGGCCCATCCAATAACAAGAGTCAAGGTGAAGGCCTTCTTCACATTGTGGCAGAAACTAACATCCTTTCAGGAAGATGGGCACTAGGGCAAAGGTGCAGCCCTCCCAAACCCCGGGCCCTGGTCTCCCAATCTCCAATATCTCCGCTTCTCAAGCCATATGTCTCTCTCCCACAAACAGAGACAGCCCCTTCCCTCCAGCATTCTCTACCAAGCCCTTCAAACCTTGTCAGCCTGTCTCATATGCTGGACTTCCCAGCTCCTACCCATCACAGAGTACAAACTGATCCAGCCGTTGAAGGAGGCAGCAGAGAACACTGAAGGGTCCCGAGGGCACCACTGCACATCAAAGCACCAGCTGCTCTGTGTTGGTAGCTTATATACCACTGCCTGATGTATAGTCTCATCTCCTTGCACCTGAGCTGTCTCTGGCGGGTTCTTCTGAAGCTCATCTTTACTGTATCCTAAAAGCTTTAGGAATTTCATTCTGGAGTCTTGCTCTAAGGTCACTGGCTGCAGAAGGCCTGTTGTCTGTCACTGTTGAGGTCATTTCCCTTGGGCTGAGGACTCTCACCTAGCCCCACGTCACTCTTCAACCATGTGGCCACTGGTGAGAAGGCTGGGATCCCAATCTGTAAGATGATGTCTCTTTAGAGTGGAGGGTAGCTCCCACAACAATCCGGGGGAAGGGGAAAGGGGGAGACTGTTGGCCCAAGACAGCAGAACCTTGAGCATGAAAAAGCCGATCTCTTAGCTGCTGAACTGGTGGTGCAGGCTGAGTTCTCCTGGAACTCCTGGGGGAGCATGACTCACACTGGAGACAGGGGGCTGTGAGGGAAGAATCCCTTGTAGCTCAGGGGTGAGGCTCATAACTGGAGCAGTAATTGGTGCTGGGGGCATAAATGTCTCTGGCAG
So please can anyone tell me how to do this. Thanks in advance
What have you tried?
duplicate of Fasta header trimming
I'd modify the
awk
solution there and use|
as FS, then get[0]
and[NF]
(if that's a thing). It's not an exact duplicate though, as the "last element" part is dynamic.If you are confortable with python, you can parse sequences with Biopython and edit sequence names as you wish with string manipulation methods.
This is not a complete answer, and belongs as a comment. "Use tools A and B" are suggestions, not solutions.