I have seven fasta files, one per gene, with more than 400 fasta entries per file, like this: Input:
>1721_1 gene name ATG >10_14 gene name GTT
>1721_1 gene name TGA >10_14 gene name GAT
>1721_1 ATGTGA >10_14 GTTGAT
What I want to do is create one fasta (continuously) file containing seven genes per sample. As you can see, the sample name is not the same before the _ in the fasta headers.
Is there any way to do this with awk or other command-line tools? Thank you very much.