I have a fasta file containing N sequences (outgroups). On the other hand, I have N fast files each having the orthologous gene sequences of several samples.
The idea is to put each of the outgroups at the top of their corresponding genes.
The outgroup looks like below,
> GENE 1 TTAACTCCTGCTACTTTG > GENE 2 TCTGTCGACGGCAACTGTGAAACTTATC > GENE 3 GCACCCTGAGCCGAACTGAATTC > GENE 4 GGTTAACAGAACTTGTTCTTCACATGCAGAGTCTTGA
Here is the fasta file of one of my genes, called
>Ind_1 TTAAATCCTGCTTCTTTG >Ind_2 TTAAATCCTGCTTCTTTG >Ind_3 TTAAATCCTGCTTCTTTG
I want to get the following:
> GENE 1 TTAACTCCTGCTACTTTG >Ind_1 TTAAATCCTGCTTCTTTG >Ind_2 TTAAATCCTGCTTCTTTG >Ind_3 TTAAATCCTGCTTCTTTG
This is done for GENE1, I need same job for the rest of the GENES. As you see, the name of entries in outgroup fasta file (GENE1, GENE2, ...) are the same as their orthologous genes (
I appreciate any help on this post.