skbio.core.tree.TreeNode.siblings

TreeNode.siblings()[source]

Returns all nodes that are children of self parent.

This call excludes self from the list.

Returns:

list of TreeNode

The list of sibling nodes relative to self

See also

neighbors

Examples

>>> from skbio.core.tree import TreeNode
>>> tree = TreeNode.from_newick("((a,b)c,(d,e,f)g)root;")
>>> tip_e = tree.find('e')
>>> [n.name for n in tip_e.siblings()]
['d', 'f']