aspartik.data.newick

class Tree:

#

A classical Newick tree

This tree supports node and edge attributes, but it does not parse them in any way. It also doesn't support extended Newick which includes hybridization events.

The constructor takes a single line of Newick notation.

>>> tree = Tree("(A:0.1,B:0.2,(C:0.3,D:0.4):0.5);")
>>> str(tree)
'(A:0.1,B:0.2,(C:0.3,D:0.4):0.5);'