This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to link hmmalign result and FastTree or other Tree tools

Hi, everyone.

I am making a protein gene family tree, I decide to use hmmalign to align my protein set to hmm model then use FastTree or other Tree methods to make a tree. In order to trim nonhomologous residues, I also set the --trim parameter. But I find it seems that tree methods like FastTree not parse the hmmalign output and it will report the error.

I am wondering whether someone can give some advice about how to link hmmalign result and FastTree or other Tree tools.

Thanks

Guandong Shang

fasttree hmmalign phylogenetic_tree

1 answer

By default hmmalign produces alignments in Stockholm format. That is an uncommon format that most programs can't read, and FastTree is no exception. I suggest you convert the Stockholm alignment made by hmmalign using the esl-reformat utility which comes with HMMer:

esl-reformat -u --gapsym=- afa alignment.sto > alignment.afa

The aligned fasta file should work with FastTree.

Thanks ! And I just find it seems that hmmalign also have "--outformat" parameter, I am curious the difference between "hmmalign --outformat afa" and "esl-reformat afa"

My version of hmmalign doesn't have the --outformat afa option (only --outformat a2m, which is different). If yours does, that should work without the extra re-alignment step.

Log in to answer this question.