Learn R Programming

MonoPhy (version 1.3.2)

CollapseMonophyletics: 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)

Value

A tree object of type 'phy'.

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.

Author

Orlando Schwery, Peter Cowman

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'.

See Also

AssessMonophyly, PlotMonophyly, MonoPhy-package

Examples

Run this code
data(Ericactree)
solution <- AssessMonophyly(Ericactree, verbosity=5)
collapsetree <- CollapseMonophyletics(solution, Ericactree, taxlevels = 1, ladderize = TRUE)

Run the code above in your browser using DataLab