skbio.core.tree.TreeNode.create_caches

TreeNode.create_caches()[source]

Construct an internal lookups to facilitate searching by name

This method will not cache nodes in which the .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.

Raises:

DuplicateNodeError

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