skbio.tree.TreeNode.siblings#

TreeNode.siblings()[source]#

Return 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 import TreeNode
>>> tree = TreeNode.read(["((a,b)c,(d,e,f)g)root;"])
>>> tip_e = tree.find('e')
>>> [n.name for n in tip_e.siblings()]
['d', 'f']