+ CHANGES IN APE VERSION 2.1-3
+
+
+BUG FIXES
+
+ o An error was fixed in the computation of ancestral character
+ states by generalized least squares in ace().
+
+
+
CHANGES IN APE VERSION 2.1-2
Package: ape
-Version: 2.1-2
-Date: 2008-02-28
+Version: 2.1-3
+Date: 2008-03-10
Title: Analyses of Phylogenetics and Evolution
Author: Emmanuel Paradis, Ben Bolker, Julien Claude, Hoa Sien Cuong,
Richard Desper, Benoit Durand, Julien Dutheil, Olivier Gascuel,
the Klastorin-Misawa-Tajima approach. Phylogeny estimation can be done
with the NJ, BIONJ, ME, and ML methods.
License: GPL (>= 2)
-URL: http://pbil.univ-lyon1.fr/R/ape/
+URL: http://ape.mlp.ird.fr/
-## DNA.R (2008-02-08)
+## DNA.R (2008-03-10)
## Manipulations and Comparisons of DNA Sequences
{
if (is.list(x)) x <- unlist(x)
n <- length(x)
- BF <- .C("BaseProportion", as.raw(x), as.integer(n),
- double(4), DUP = FALSE, NAOK = TRUE, PACKAGE = "ape")[[3]]
+ BF <- .C("BaseProportion", x, n, double(4),
+ DUP = FALSE, NAOK = TRUE, PACKAGE = "ape")[[3]]
names(BF) <- letters[c(1, 3, 7, 20)]
BF
}
n <- dim(x)
s <- n[2]
n <- n[1]
- ans <- .C("SegSites", x, as.integer(n), as.integer(s),
- integer(s), DUP = FALSE, NAOK = TRUE, PACKAGE = "ape")
+ ans <- .C("SegSites", x, n, s, integer(s),
+ DUP = FALSE, NAOK = TRUE, PACKAGE = "ape")
which(as.logical(ans[[4]]))
}
n <- n[1]
BF <- if (is.null(base.freq)) base.freq(x) else base.freq
if (!pairwise.deletion) {
- keep <- .C("GlobalDeletionDNA", x, as.integer(n),
- as.integer(s), as.integer(rep(1, s)),
- PACKAGE = "ape")[[4]]
+ keep <- .C("GlobalDeletionDNA", x, n, s,
+ rep(1L, s), PACKAGE = "ape")[[4]]
x <- x[, as.logical(keep)]
s <- dim(x)[2]
}
var <- if (variance) double(Ndist) else 0
if (!gamma) gamma <- alpha <- 0
else alpha <- gamma <- 1
- d <- .C("dist_dna", x, as.integer(n), as.integer(s),
- as.integer(imod), double(Ndist), BF,
+ d <- .C("dist_dna", x, n, s, imod, double(Ndist), BF,
as.integer(pairwise.deletion), as.integer(variance),
var, as.integer(gamma), alpha, DUP = FALSE, NAOK = TRUE,
PACKAGE = "ape")
-## ace.R (2007-12-14)
+## ace.R (2008-03-10)
## Ancestral Character Estimation
-## Copyright 2005-2007 Emmanuel Paradis and Ben Bolker
+## Copyright 2005-2008 Emmanuel Paradis and Ben Bolker
## This file is part of the R-package `ape'.
## See the file ../COPYING for licensing issues.
V <- corMatrix(Initialize(corStruct, data.frame(x)),
corr = FALSE)
invV <- solve(V)
- obj$ace <- varAY %*% invV %*% x
+ o <- gls(x ~ 1, correlation = Initialize(corStruct, data.frame(x)))
+ GM <- o$coefficients
+ obj$ace <- drop(varAY %*% invV %*% (x - GM) + GM)
+ names(obj$ace) <- (nb.tip + 1):(nb.tip + nb.node)
if (CI) {
CI95 <- matrix(NA, nb.node, 2)
se <- sqrt((varA - varAY %*% invV %*% t(varAY))[cbind(1:nb.node, 1:nb.node)])
can be fitted by maximum likelihood (the default, Schluter et
al. 1997), least squares (\code{method = "pic"}, Felsenstein 1985), or
generalized least squares (\code{method = "GLS"}, Martins and Hansen
- 1997). In the latter case, the specification of \code{phy} and
- \code{model} are actually ignored: it is instead given through a
- correlation structure with the option \code{corStruct}.
+ 1997, Cunningham et al. 1998). In the latter case, the specification
+ of \code{phy} and \code{model} are actually ignored: it is instead
+ given through a correlation structure with the option \code{corStruct}.
For discrete characters (\code{type = "discrete"}), only maximum
likelihood estimation is available (Pagel 1994). The model is
\item{call}{the function call.}
}
\references{
+ Cunningham, C. W., Omland, K. E. and Oakley, T. H. (1998)
+ Reconstructing ancestral character states: a critical
+ reappraisal. \emph{Trends in Ecology & Evolution}, \bold{13},
+ 361--366.
+
Felsenstein, J. (1985) Phylogenies and the comparative
method. \emph{American Naturalist}, \bold{125}, 1--15.
\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
\seealso{
\code{\link{DNAmodel}}, \code{\link{nj}}, \code{\link{read.dna}},
- \code{\link{summary.phylo}}
+ \code{\link{summary.phylo}}, \code{\link{bionj}}, \code{\link{fastme}}
}
\keyword{models}
\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
\seealso{
\code{\link{write.tree}}, \code{\link{read.tree}},
- \code{\link{dist.dna}}, \code{\link{mlphylo}}
+ \code{\link{dist.dna}}, \code{\link{mlphylo}}, \code{\link{bionj}},
+ \code{\link{fastme}}
}
\examples{
### From Saitou and Nei (1987, Table 1):