I have a fasta file of DNA sequences for two different species across a chromosome, e.g.
and a text file of orthologs
SpeciesA SpeciesB gene1 geneX (etc)
I want to assign each ortholog pair into a seperate file, so I can run analyses on orthologous pairs, but I'm not sure how this can be achieved.
I thought about using the "paste" function in unix to merge the two files row by row, and then split the result file every two DNA sequences (i.e. a pair), but the order of the genes in the fasta file doesn't correspond to the order the orthologs are listed in.
Is there a standard way to do this? I imagine it must be done a lot for programs like Clustal?