Skip to main content
`Ctrl`+`K`

# make_tree

make_tree(treestring: str | None = None, tip_names: Iterable[str] | None = None, format_name: str | None = None, underscore_unmunge: bool = False, source: str | pathlib.Path | None = None) → PhyloNode

  Initialises a tree.

  Parameters:
    treestring

      a newick or xml formatted tree string

    tip_names

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

    format_name

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

    underscore_unmunge

      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.