hyperiax.to_newick

hyperiax.to_newick(tree)[source]

Serialize a Tree back to a Newick string.

Requires an edge_length field. Uses Topology.names for node labels (empty string for unnamed nodes). The root carries a label but no branch length, so a name on the root survives a write -> read round trip.

Parameters:

tree (Tree) – the Tree to serialize.

Return type:

str