I am wondering it the trees obtained by MrBayes can be viewed by ete2. Currently I am using FigTree. Thanks.
I am wondering it the trees obtained by MrBayes can be viewed by ete2. Currently I am using FigTree. Thanks.
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.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
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.