skbio.tree.BPTree.shear#

BPTree.shear(tips)[source]#

Remove all nodes from the tree except tips and ancestors of tips.

Parameters:
tipsset of str

The set of tip names to retain

Returns:
BPTree

A new BPTree corresponding to only the described tips and their ancestors.