Description Usage Arguments Details Value Note Author(s) See Also Examples
View source: R/CollapseMonophyletics.R
Creates a new tree object with all monophyletic groups collapsed to one tip each, based on the output of 'AssessMonophyly'.
1 | CollapseMonophyletics(solution, tree, taxlevels = 1, ladderize = TRUE)
|
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. |
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'.
A tree object of type 'phy'.
The code is largely the same as 'PlotMonophyly' uses to create a plot with collapsed monophyletic groups.
Orlando Schwery, Peter Cowman
AssessMonophyly
, PlotMonophyly
, MonoPhy-package
1 2 3 | data(Ericactree)
solution <- AssessMonophyly(Ericactree, verbosity=5)
collapsetree <- CollapseMonophyletics(solution, Ericactree, taxlevels = 1, ladderize = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.