make_tree#

make_tree(treestring: str | None = None, tip_names: list[str] | None = None, format: str | None = None, underscore_unmunge: bool = False, source: str | pathlib.Path | None = None) PhyloNode | TreeNode#

Initialises a tree.

Parameters:
treestring

a newick or xml formatted tree string

tip_names

a list of tip names, returns a “star” topology tree

formatstr

indicates treestring is either newick or xml formatted, default is newick

underscore_unmungebool

replace underscores with spaces in all names read, i.e. “sp_name” becomes “sp name”

source

path to file tree came from, string value assigned to tree.source

Returns:
PhyloNode

Notes

Underscore unmunging is turned off by default, although it is part of the Newick format.