Question: Viewing Mrbayes Tree By Ete2
gravatar for Pappu
5.1 years ago by
Pappu1.9k wrote:

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

python biopython • 1.9k views
ADD COMMENTlink modified 5.1 years ago • written 5.1 years ago by Pappu1.9k
gravatar for jhc
5.1 years ago by
jhc2.8k wrote:

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 Once you have extracted the newick formatted trees, you can load them and visualize them using ete2.

ADD COMMENTlink written 5.1 years ago by jhc2.8k

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 REPLYlink modified 5.1 years ago • written 5.1 years ago by Pappu1.9k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 678 users visited in the last hour