Learn R Programming

phangorn (version 1.5-0)

parsimony: Parsimony tree.

Description

parsimony returns the parsimony score of a tree. optim.parsimony tries to find the maximum parsimony tree using Nearest Neighbor Interchange (NNI) rearrangements. pace returns a (logical) matrix of the ancestral states of the root node. CI and RI computes the consistency and retention index.

Usage

parsimony(tree, data, method="fitch", ...)
optim.parsimony(tree, data, method="fitch", cost=NULL, trace=1,...)
pratchet(data, start=NULL, k=20, np=1, trace=1, all=FALSE, method="fitch", multicore=FALSE, ...)
fitch(tree, data, site = "pscore")
sankoff(tree, data, cost = NULL, site = "pscore")
CI(tree, data)
RI(tree, data)
acctran(tree, data)

Arguments

data
A object of class phyDat containing 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.
site
return either 'pscore' or 'site' wise parsimony scores.
trace
defines how much information is printed during optimisation.
start
a starting tree can be supplied.
k
number of rounds in the ratchet.
np
number of (parallel) bootstraps (see details).
multicore
logical, if TRUE analysis is performed in parallel (see details).
all
return all equally good trees or just one of them.
...
Further arguments passed to or from other methods (e.g. model="sankoff" and cost matrix).

Value

  • parsimony returns the maximum parsimony score (pscore). optim.parsimony returns a tree after NNI rearrangements. pratchet returns a tree or list of trees containing the best tree(s) found during the search. acctran returns a tree with edge length according to the ACCTRAN criterion.

Details

On platforms where the multicore package is avaiable the parsimony ratchet may find solutions faster. To do this set the parameter np to the number of cores available. See also details in bootstrap.pml.

References

Felsenstein, J. (2004). Inferring Phylogenies. Sinauer Associates, Sunderland. Nixon, K. (1999) The Parsimony Ratchet, a New Method for Rapid Rarsimony Analysis. Cladistics 15, 407-414

See Also

bab, ancestral.pml, nni, NJ, pml, getClans ,ancestral.pars, bootstrap.pml

Examples

Run this code
data(Laurasiatherian)
dm = dist.logDet(Laurasiatherian)
tree = NJ(dm)
parsimony(tree, Laurasiatherian)
treeNNI <- optim.parsimony(tree, Laurasiatherian)
treeRatchet <- pratchet(Laurasiatherian, start=tree)
treeRatchet <- acctran(treeRatchet, Laurasiatherian)

plot(midpoint(treeRatchet))
add.scale.bar()

parsimony(c(tree,treeNNI, treeRatchet), Laurasiatherian)

Run the code above in your browser using DataLab