skbio.tree.TreeNode.unrooted_deepcopy#

TreeNode.unrooted_deepcopy(parent=None)[source]#

Walk the tree unrooted-style and returns a new deepcopy.

Deprecated since version 0.6.2: This function is deprecated as it generates a redundant copy of the tree. Use unrooted_copy() instead.

Parameters:
parentTreeNode or None

Direction of walking (from parent to self). If specified, walking to the parent will be prohibited.

Returns:
TreeNode

A new copy of the tree rooted at the given node.

Notes

Perform a deepcopy of self and return a new copy of the tree as an unrooted copy. This is useful for defining a new root of the tree.

This method calls unrooted_copy() which is recursive.