Return the newick string representation of this tree.
Note
Deprecated in scikit-bio 0.2.0-dev to_newick will be removed in scikit-bio 0.3.0. It is replaced by write, which is a more general method for serializing TreeNode instances. write supports multiple file formats by taking advantage of scikit-bio’s I/O registry system. See skbio.io for more details.
Please see TreeNode.from_newick for a further description of the Newick format.
Parameters: | with_distances : bool
semicolon : bool
escape_name : bool
|
---|---|
Returns: | str
|
See also
Examples
>>> from skbio import TreeNode
>>> tree = TreeNode.read(StringIO("((a,b)c,(d,e)f)root;"))
>>> print(tree.to_newick())
((a,b)c,(d,e)f)root;