Dear All,
I would like to change the header of the fasta file as follows, but I don't know how. The actual file is so long that I need a command. Could you tell me the command to change only the header.
Before
>TRINITY_DN22056_c0_g1_i1 len=300 path=[0:0-299] GTCCATTTGACTGATTCCCATTCCAAAAAAAACCACTCAACCAGGACTGACGCATAAAACCGTCAAATCGACGACGCAGGATAAGGTTCGATTATGACTTGTTACGGTCTCAAAGGCGCGTTTTTACACAATTATG >TRINITY_DN30979_c0_g1_i1 len=300 path=[0:0-299] TGACGAATGAGAACAAGGGCACGCAGTTCGTTTTATGTCAATTGAACTGCTGGTCACTAACCAGAATTCGTATTCCCGTTGGACGTCAATTTGCATAAAAAATGTAAAAGAGAAAATACGATCATAAAAAGTGGAAA
After
>AbTRINITY_DN22056_c0_g1_i1 len=300 path=[0:0-299] GTCCATTTGACTGATTCCCATTCCAAAAAAAACCACTCAACCAGGACTGACGCATAAAACCGTCAAATCGTACGACGCAGGATAAGGTTCGATTATGACTTGTTACGGTCTCAAAGGCGCGTTTTTACACAATTATG >AbTRINITY_DN30979_c0_g1_i1 len=300 path=[0:0-299] TGACGAATGAGAACAAGGGCACGCAGTTCGTTTTATGTCAATTGAACTGCTGGTCACTAACCAGAATTCGTATTCCCGTTGGACGTCAATTTGCATAAAAAATGTAAAAGAGAAAATACGATCATAAAAAGTGGAAA
This question may not exactly be a bioinformatics question. If this was inappropriate, I apologize. Thank you for your help.
A simple Linux command can do it:
or modify in place:
always include "^" (starts with): https://nsaunders.wordpress.com/2014/08/14/looking-for-in-all-the-wrong-places/
Good point, thanks.