skbio.tree.TreeNode.create_caches#

TreeNode.create_caches()[source]#

Construct an internal lookup table to facilitate searching by name.

Raises:
DuplicateNodeError

The tip cache requires that names are unique (with the exception of names that are None).

Notes

This method will not cache nodes whose name is None. This method will raise DuplicateNodeError if a name conflict in the tips is discovered, but will not raise if on internal nodes. This is because, in practice, the tips of a tree are required to be unique while no such requirement holds for internal nodes.