skbio.tree.TreeNode.append#
- TreeNode.append(node, uncache=True)[source]#
Add a node to self’s children.
- Parameters:
See also
Notes
This method will add the node to the end of self’s children. If the incoming node is within another tree, it will be disconnected from its original parent, if any, but its children will be preserved. Therefore, this method is able to move an entire clade.
The
uncacheparameter applies to both donor and recipient trees.Examples
>>> from skbio import TreeNode >>> root = TreeNode(name="root") >>> child1 = TreeNode(name="child1") >>> child2 = TreeNode(name="child2") >>> root.append(child1) >>> root.append(child2) >>> print(root) (child1,child2)root;