skbio.core.tree.TreeNode.tips

TreeNode.tips(include_self=False)[source]

Iterates over tips descended from self.

Node order is consistent between calls and is ordered by a postorder traversal of the tree.

Parameters:

include_self : bool

include the initial node if True

Returns:

GeneratorType

Yields successive TreeNode objects

Examples

>>> from skbio.core.tree import TreeNode
>>> tree = TreeNode.from_newick("((a,b)c,(d,e)f);")
>>> for node in tree.tips():
...     print node.name
a
b
d
e