CollapseMonophyletics {MonoPhy} | R Documentation |
Get tree with collapsed monophyletic groups
Description
Creates a new tree object with all monophyletic groups collapsed to one tip each, based on the output of 'AssessMonophyly'.
Usage
CollapseMonophyletics(solution, tree, taxlevels = 1, ladderize = TRUE)
Arguments
solution |
Object with saved output of the 'AssessMonophyly' function. |
tree |
An object of type 'phy', rooted phylogeny (the same which was used to obtain the solution before). |
taxlevels |
An integer or name corresponding to the desired taxonomic level (i.e. the number of its column in the taxonomy table, not counting the tip names). Default is 1. |
ladderize |
If TRUE will ladderize tree before collapsing clades. Default is TRUE. |
Details
Can be used after 'AssessMonophyly' is run to obtain a tree object where all groups that were inferred as monophyletic at a given taxonomic level will be collapsed to single tips and relabeled according to the name of their group. The resulting tree will have the same topology as seen when plotting the original tree with setting 'monocoll=TRUE' in 'PlotMonophyly'.
Value
A tree object of type 'phy'.
Note
The code is largely the same as 'PlotMonophyly' uses to create a plot with collapsed monophyletic groups.
Author(s)
Orlando Schwery, Peter Cowman
See Also
AssessMonophyly
, PlotMonophyly
, MonoPhy-package
Examples
data(Ericactree)
solution <- AssessMonophyly(Ericactree, verbosity=5)
collapsetree <- CollapseMonophyletics(solution, Ericactree, taxlevels = 1, ladderize = TRUE)