Learn R Programming

phangorn (version 0.0-2)

parsimony: Parsimony tree.

Description

parsimony returns the parsimony score of a tree. optim.parsimony tries to find the mamximum parsimony tree using NNI rearrangements.

Usage

parsimony(tree, data, method="sankoff", ...)
optim.parsimony(tree, data, cost=NULL, ...)

Arguments

data
A (dna) sequences.
tree
tree to start the nni search from.
method
one of 'fitch' or 'sankoff'.
cost
A cost matrix for the transitions between two states.
...
Further arguments passed to or from other methods.

Value

  • parsimony returns the maximum parsimony score (pscore). optim.parsimony returns a tree after NNI rearrangements.

References

Felsenstein, J. (2004). Inferring Phylogenies. Sinauer Associates, Sunderland.

See Also

sankoff, NJ

Examples

Run this code
data(Laurasiatherian)
dm = dist.logDet(Laurasiatherian)
tree = NJ(dm)
parsimony(tree, Laurasiatherian)
ptree <- optim.parsimony(tree, Laurasiatherian)

Run the code above in your browser using DataLab