Can anyone advise me on how to rename the header in my fasta file? Say I have a seq.fa file with transcript sequences:
>TR1|c0_g1_i1 GTCGAGCATGGTCTTGGTCATCTTCCTTTCAAAGAA >TR6|c0_g1_i1 GTGGAATATCGCCAGTGACCATCACTGATTAACCTG
I also have a file with contigs matching the transcripts - names.txt:
TR1|c0_g1_i1 scaf0432344_50037.734_wgs TR6|c0_g1_i1 scaf0159424_10142.072_wgs
How to I add contig names to the fasta file headers so that the "scaf0..." identifier comes before the "TR..."?
>scaf0432344_50037.734_wgs|TR1|c0_g1_i1 GTCGAGCATGGTCTTGGTCATCTTCCTTTCAAAGAA >scaf0159424_10142.072_wgs|TR6|c0_g1_i1 GTGGAATATCGCCAGTGACCATCACTGATTAACCTG