Off topic:Appending strings to fasta header from another file
1
0
Entering edit mode
2.3 years ago
Ming ▴ 70

Hello there,

I have a A.fasta file containing:

>AAL09996.1
ATGTCTAGCAAGCCGTCGAATATGCTTGATGAAGTTACCCTGTATACTCACTACGGCCTATCCGTGGCGAAGAAGCTCGGTGCGAATATGGTCGATGCTTTCCGGTCGGCCTTTTCGGTCAATGATGACATTCGTCAGGTGTATTACCGCGACAAGGGCATCTCTCACGCCAAAGCCGGTCGTTATTCCGAGGCAGTGGTGATGCTCGAGCAGGTTTACGATGCCGATGCCTTCGACGTGGAAGTGGCGCTGCATTTGGGAATCGCCTACGTTAAGACCGGGGCCGTTGATCGCGGCACCGAGTTGCTTGAGCGCTCCATCGCCGATGCGCCTGACAACATCAAGGTCGCGACCGTCCTTGGCCTGACCTATGTGCAGGTGCAAAAATATGATTTGGCCGTGCCTCTACTGGTCAAGGTGGCGGAAGCCAATCCGGTGAATTTCAATGTCCGCTTCCGTCTCGGGGTGGCGCTGGATAATCTGGGCCGCTTTGACGAAGCCATCGACAGTTTCAAGATCGCTTTGGGGCTGCGTCCCAATGAAGGCAAGGTGCATCGCGCAATCGCGTACAGCTACGAGCAGATGGGCTCGCACGAAGAGGCTTTGCCGCATTTTAAGAAGGCCAATGAACTCGATGAACGTTCGGCCGTCTAA
>AAR90856.1
ATGTCTAGCAAGCCGTCGGATATTCTTGACGAGGTCACTCTTTACGCTCACTACGGCCTTTCGGTGGCGAAGAAGCTCGGAATGAACATGGTCGATGCGTTCCGTGCGGCCTTTTCCGTCAACGACGACATCCGCCAGGTGTATTACCGCGACAAGGGCATCTCCCACGCCAAGGCCGGGCGCTATTCCCAGGCCGTCATGCTGCTGGAGCAGGTCTACGACGCCGATGCCTTCGATGTGGATGTGGCTCTGCACCTGGGAATCGCCTATGTGAAGACCGGCGCCGTCGATCGCGGCACCGAACTACTCGAACGTTCCTTGGCCGATGCGCCCGACAACGTGAAGGTGGCGACCGTTCTCGGCCTGACCTATGTGCAGGTGCAAAAGTACGATCTGGCCGTTCCGCTGCTGATCAAGGTGGCCGAGGCCAATCCCATCAATTTCAACGTCCGGTTCCGTCTGGGCGTGGCGCTGGACAACCTCGGCCGTTTCGACGAAGCCATCGACAGCTTCAAGATCGCGCTGGGCCTGCGTCCCAATGAAGGCAAGGTGCATCGCGCCATCGCCTTCAGCTATGAGCAGATGGGCCGGCACGAGGAAGCCTTGCCGCATTTCAAGAAGGCCAATGAACTTGACGAAGGGGCCTCGGTCTGA
...

I also have another file, A.taxonomy:

AAL09996.1  Bacteria;Proteobacteria;Alphaproteobacteria;Rhodospirillales;Rhodospirillaceae;Magnetospirillum;Magnetospirillum gryphiswaldense
AAR90856.1  Bacteria;Proteobacteria;Alphaproteobacteria;Rhodospirillales;Rhodospirillaceae;Magnetospirillum;Magnetospirillum magnetotacticum

etc etc

How do I modify the fasta headers so that it appears like this:

>AAL09996.1 Bacteria;Proteobacteria;Alphaproteobacteria;Rhodospirillales;Rhodospirillaceae;Magnetospirillum;Magnetospirillum gryphiswaldense
ATGTCTAGCAAGCCGTCGAATATGCTTGATGAAGTTACCCTGTATACTCACTACGGCCTATCCGTGGCGAAGAAGCTCGGTGCGAATATGGTCGATGCTTTCCGGTCGGCCTTTTCGGTCAATGATGACATTCGTCAGGTGTATTACCGCGACAAGGGCATCTCTCACGCCAAAGCCGGTCGTTATTCCGAGGCAGTGGTGATGCTCGAGCAGGTTTACGATGCCGATGCCTTCGACGTGGAAGTGGCGCTGCATTTGGGAATCGCCTACGTTAAGACCGGGGCCGTTGATCGCGGCACCGAGTTGCTTGAGCGCTCCATCGCCGATGCGCCTGACAACATCAAGGTCGCGACCGTCCTTGGCCTGACCTATGTGCAGGTGCAAAAATATGATTTGGCCGTGCCTCTACTGGTCAAGGTGGCGGAAGCCAATCCGGTGAATTTCAATGTCCGCTTCCGTCTCGGGGTGGCGCTGGATAATCTGGGCCGCTTTGACGAAGCCATCGACAGTTTCAAGATCGCTTTGGGGCTGCGTCCCAATGAAGGCAAGGTGCATCGCGCAATCGCGTACAGCTACGAGCAGATGGGCTCGCACGAAGAGGCTTTGCCGCATTTTAAGAAGGCCAATGAACTCGATGAACGTTCGGCCGTCTAA
>AAR90856.1 Bacteria;Proteobacteria;Alphaproteobacteria;Rhodospirillales;Rhodospirillaceae;Magnetospirillum;Magnetospirillum magnetotacticum
ATGTCTAGCAAGCCGTCGGATATTCTTGACGAGGTCACTCTTTACGCTCACTACGGCCTTTCGGTGGCGAAGAAGCTCGGAATGAACATGGTCGATGCGTTCCGTGCGGCCTTTTCCGTCAACGACGACATCCGCCAGGTGTATTACCGCGACAAGGGCATCTCCCACGCCAAGGCCGGGCGCTATTCCCAGGCCGTCATGCTGCTGGAGCAGGTCTACGACGCCGATGCCTTCGATGTGGATGTGGCTCTGCACCTGGGAATCGCCTATGTGAAGACCGGCGCCGTCGATCGCGGCACCGAACTACTCGAACGTTCCTTGGCCGATGCGCCCGACAACGTGAAGGTGGCGACCGTTCTCGGCCTGACCTATGTGCAGGTGCAAAAGTACGATCTGGCCGTTCCGCTGCTGATCAAGGTGGCCGAGGCCAATCCCATCAATTTCAACGTCCGGTTCCGTCTGGGCGTGGCGCTGGACAACCTCGGCCGTTTCGACGAAGCCATCGACAGCTTCAAGATCGCGCTGGGCCTGCGTCCCAATGAAGGCAAGGTGCATCGCGCCATCGCCTTCAGCTATGAGCAGATGGGCCGGCACGAGGAAGCCTTGCCGCATTTCAAGAAGGCCAATGAACTTGACGAAGGGGCCTCGGTCTGA

The headers will be joined together by a tab.

Thank you and will be appreciate any help.

fasta • 1.2k views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 2078 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6