Description Usage Arguments Details Value Author(s) References Examples
View source: R/cophen.vector.R
Given a phylogenetic tree, computes the cophenetic vector of that phylogenetic tree.
1 | cophen.vector(tree, set.of.labels = NULL)
|
tree |
a single phylogenetic tree. It can be entered as a string the Newick format, as a 'phylo' object ( |
set.of.labels |
a list containing the set of labels of the tree (in the order of appearance from its newicks form). By default is |
The cophenetic vector is formed by all the cophenetic values between each pair of leaves. The cophenetic value of two different leaves i and j is the depth of the lowest common ancestor of the nodes in the tree labeled with i and j. If i=j, then the cophenetic value is the depth of that leaf.
A numeric array.
Lucia Rotger
A. Mir, F. Rossello, L.Rotger, A new balance index for phylogenetic trees. Mathematical Biosciences 241 (2013), 125-136.
G. Cardona, A. Mir, F. Rossello, L. Rotger, D. Sanchez, Cophenetic metrics for phylogenetic trees, after Sokal and Rohlf. BMC Bioinformatics 14 (2013), 3.
1 2 3 4 5 6 7 8 9 10 | # Computation of the cophenetic vector of trees
# entered in newick format:
cophen.vector("(1,2,3,4,5);")
cophen.vector("(1,(2,(3,(4,5))));")
# Computation of the cophenetic vector of trees
# entered as a phylo object:
require(ape)
random.tree = rtree(5,rooted=TRUE)
cophen.vector(random.tree)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.