Learn R Programming

phangorn (version 2.0.3)

maxCladeCred: Maximum clade credibility tree

Description

maxCladeCred computes the maximum clade credibility tree from a sample of trees.

Usage

maxCladeCred(x, tree = TRUE, part = NULL, rooted = TRUE)

Arguments

x
x is an object of class multiPhylo or phylo
tree
logical indicating whether return the tree with the clade credibility (default) or the clade credibility score for all trees.
rooted
logical, if FALSE the tree with highest maximum bipartition credibility is returned.
part
a list of partitions as returned by prop.part

Value

  • a tree (an object of class phylo) with the highest clade credibility or a numeric vector of clade credibilities for each tree.

Details

So far just the best tree is returned. No annotations or transformations of edge length are performed.

If a list of partition is provided then the clade credibity is computed for the trees in x.

See Also

consensus, consensusNet, prop.part

Examples

Run this code
data(Laurasiatherian)
set.seed(42)
bs <- bootstrap.phyDat(Laurasiatherian, FUN = function(x)upgma(dist.hamming(x)), 
    bs=100)
class(bs) <- 'multiPhylo'

strict_consensus <- consensus(bs)
majority_consensus <- consensus(bs, p=.5)
max_clade_cred <- maxCladeCred(bs)
par(mfrow = c(1,3), mar = c(1,4,1,1))
plot(strict_consensus, main="Strict consensus tree")
plot(majority_consensus, main="Majority consensus tree")
plot(max_clade_cred, main="Maximum clade credibility tree")

# compute clade credibility for trees given a prop.part object
pp <- prop.part(bs)
tree <- rNNI(bs[[1]], 20)
maxCladeCred(c(tree, bs[[1]]), tree=FALSE, part = pp)
# first value likely be -Inf

Run the code above in your browser using DataLab