Viewing Mrbayes Tree By Ete2
1
2
Entering edit mode
10.1 years ago
Pappu ★ 2.1k

I am wondering it the trees obtained by MrBayes can be viewed by ete2. Currently I am using FigTree. Thanks.

python biopython • 3.0k views
ADD COMMENT
2
Entering edit mode
10.1 years ago
jhc ★ 3.0k

MrBayes returns Nexus format, which has no native support in ete2. However, trees in nexus files are encoded using the newick standard, which is fully supported by ete.

You will need to write a little parser to extract the newick string in the [tree] section of your nexus file, or use any of the nexus parsers out there (I think BioPython can do this through its Phylo module http://biopython.org/wiki/Phylo). Once you have extracted the newick formatted trees, you can load them and visualize them using ete2.

ADD COMMENT
0
Entering edit mode

MrBayes tree seems very complicated to parse with different probability values and parameters. BioPython is not able to parse it. I don't have much experience with parsing regular expressions in python.

ADD REPLY

Login before adding your answer.

Traffic: 1747 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