Last chance! 50% off unlimited learning
Sale ends in
Marginal reconstruction of the ancestral character states.
ancestral.pml(object, type = "marginal", return = "prob")ancestral.pars(tree, data, type = c("MPR", "ACCTRAN"), cost = NULL,
return = "prob")
pace(tree, data, type = c("MPR", "ACCTRAN"), cost = NULL,
return = "prob")
plotAnc(tree, data, i = 1, site.pattern = TRUE, col = NULL,
cex.pie = par("cex"), pos = "bottomright", ...)
an object of class pml
method used to assign characters to internal nodes, see details.
return a phyDat
object or matrix of probabilities.
a tree, i.e. an object of class pml
an object of class phyDat
A cost matrix for the transitions between two states.
plots the i-th site pattern of the data
.
logical, plot i-th site pattern or i-th site
a vector containing the colors for all possible states.
a numeric defining the size of the pie graphs
a character string defining the position of the legend
Further arguments passed to or from other methods.
of class "phyDat", containing the ancestral states of all nodes.
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").
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.
# NOT RUN {
example(NJ)
fit <- pml(tree, Laurasiatherian)
anc.ml <- ancestral.pml(fit, type = "ml")
anc.p <- ancestral.pars(tree, Laurasiatherian)
# }
# NOT RUN {
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)
# }
# NOT RUN {
# plot the first site pattern
plotAnc(tree, anc.ml, 1)
# plot the third character
plotAnc(tree, anc.ml, attr(anc.ml, "index")[3])
# }
Run the code above in your browser using DataLab