Gab-1997 Gab-1997 - 2 years ago 113
Python Question

How to convert a tree drawn with ete2 to Newick format?

I have drawn a tree in python using ete2 commands Tree(), .add_child(), .add_sister() and so on.
Is there any way I can convert this tree to the corresponding Newick format?

jhc jhc
Answer Source
from ete3 import Tree
tree = Tree()
print tree.write()
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download