This is a test version of Biostars. For the public version, visit https://www.biostars.org.
File conversion: a2m To fasta

Hello,

I have an msa file in a2m format, I want to convert this file to fasta. Is there any solution?

a2m fasta a3m

2 answers

you can convert Multiple Sequence Alignment file from A2M format to FASTA by;

  1. seqmagick
  2. biopython
  3. sed to replace dots

    grep -v "^#" input.a2m | sed '/^>/! s/.//g' > output.fasta

In HHsuite ( https://github.com/soedinglab/hh-suite ), there is a Perl script ( https://github.com/soedinglab/hh-suite/blob/master/scripts/reformat.pl ). It can convert between most common alignment formats, including A2M -> aligned FASTA. I am assuming you mean aligned FASTA, but it has an option to convert to plain FASTA as well by removing gap characters.

Log in to answer this question.