Learn R Programming

phangorn (version 1.5-0)

ancestral.pml: Ancestral character reconstruction.

Description

Marginal reconstruction of the ancestral character states.

Usage

ancestral.pml(object, type = c("ml", "bayes"))
ancestral.pars(tree, data, type = c("MPR", "ACCTRAN"))
pace(tree, data, type = c("MPR", "ACCTRAN"))
plotAnc(tree, data, i, col=NULL, ...)

Arguments

object
an object of class pml
tree
a tree, i.e. an object of class pml
data
an object of class phyDat
type
method used to assign characters to internal nodes, see details.
i
plots the i-th character of the data.
col
a vector containing the colors for all possible states.
...
Further arguments passed to or from other methods.

Value

  • An object of class "phyDat", containing the ancestral states of all nodes.

Details

The argument "type" defines the criterion to assign the internal nodes. For ancestral.pml so far "ml" and (empirical) "bayes" and for ancestral.pars "MPR" and "ACCTRAN" are possible. With parsimony reconstruction one has to keep in mind that there will be often no unique solution. For further details see vignette("Ancestral").

References

Felsenstein, J. (2004). Inferring Phylogenies. Sinauer Associates, Sunderland. Swofford, D.L., Maddison, W.P. (1987) Reconstructing ancestral character states under Wagner parsimony. Math. Biosci. 87: 199--229 Yang, Z. (2006). Computational Molecular evolution. Oxford University Press, Oxford.

See Also

pml, parsimony, ace, root

Examples

Run this code
example(NJ)
fit = pml(tree, Laurasiatherian)
anc.ml = ancestral.pml(fit, type = "ml")
anc.p = ancestral.pars(tree, Laurasiatherian)
require(seqLogo)
seqLogo( t(subset(anc.ml, 48, 1:20)[[1]]), ic.scale=FALSE)
seqLogo( t(subset(anc.p, 48, 1:20)[[1]]), ic.scale=FALSE)
plotAnc(tree, anc.ml, 1)

Run the code above in your browser using DataLab