This might be easy but I have not been able to solve it - I have a normal fasta file as below:
>seq1 ATCTAC >seq2 AATCGCATCG >seq3 ATATACAGC >seq1 ATCGCGGGC >seq4 ATTAATTTTAT
what I want o do is to reverse the order of lines in the file. So the desired output should be:
>seq4 ATTAATTTTAT >seq1 ATCGCGGGC >seq3 ATATACAGC >seq2 AATCGCATCG >seq1 ATCTAC
I tried using
tail -r file.fa but then it does not work because ids get placed after the sequences.
How can I do this?