Drop tips from tree
DropTip()
removes specified tips from a phylogenetic tree, collapsing
incident branches.
DropTip(tree, tip) ## S3 method for class 'phylo' DropTip(tree, tip) ## S3 method for class 'multiPhylo' DropTip(tree, tip)
tree |
A tree of class |
tip |
Character vector specifying labels of leaves in tree to be dropped, or integer vector specifying the indices of leaves to be dropped. Specifying the index of an internal node will drop all descendants of that node. |
This function is more robust than ape::drop.tip()
as it does not
require any particular internal node numbering schema. It is not presently
as fast, though it is ripe for optimization; if you are finding this
function is a rate-limiting step, please get in touch and I'll prioritise
writing a faster implementation.
DropTip()
returns a tree of class phylo
, in Preorder, with the
requested leaves removed.
Martin R. Smith (martin.smith@durham.ac.uk)
Other tree manipulation:
AddTip()
,
CollapseNode()
,
ConsensusWithout()
,
EnforceOutgroup()
,
LeafLabelInterchange()
,
MakeTreeBinary()
,
RenumberTips()
,
RenumberTree()
,
Renumber()
,
RootTree()
,
SingleTaxonTree()
,
SortTree()
,
Subtree()
tree <- BalancedTree(8) plot(tree) plot(DropTip(tree, c('t4', 't5')))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.