I have a fasta file (seq.fa) which is a standard file format for genetic info, like so:
>TR1|c0_g1_i1 GTCGAGCATGGTCTTGGTCATCTTCCTTTCAAAGAA >TR6|c0_g1_i1 GTGGAATATCGCCAGTGACCATCACTGATTAACCTG
I also have a file with names matching the headers (">TR..." names):
TR1|c0_g1_i1 scaf0432344_50037.734_wgs TR6|c0_g1_i1 scaf0159424_10142.072_wgs
I need to make the "scaf0..." identifiers the first thing coming after the ">" file in the seq.fa.
I want to keep the "TR..." identifiers which are unique to each of my sequences, like so:
>scaf0432344_50037.734_wgs|TR1|c0_g1_i1 GTCGAGCATGGTCTTGGTCATCTTCCTTTCAAAGAA >scaf0159424_10142.072_wgs|TR6|c0_g1_i1 GTGGAATATCGCCAGTGACCATCACTGATTAACCTG
The names file is in the same order as the sequences file!
Haven't tried anything since I'm not trained and have no idea what I'm doing :/