o plot.phylo() has a new argument 'edge.lty' that specifies the
types of lines used for the edges (plain, dotted, dashed, ...)
+ o phymltest() has been updated to work with PhyML 3.0.1.
+
BUG FIXES
Package: ape
Version: 2.3
-Date: 2009-03-27
+Date: 2009-03-29
Title: Analyses of Phylogenetics and Evolution
-Author: Emmanuel Paradis,
-Ben Bolker,
-Julien Claude,
-Hoa Sien Cuong,
-Richard Desper,
-Benoit Durand,
-Julien Dutheil,
-Olivier Gascuel,
-Gangolf Jobb,
-Christoph Heibl,
-Daniel Lawson,
-Vincent Lefort,
-Pierre Legendre,
-Jim Lemon,
-Yvonnick Noel,
-Johan Nylander,
-Rainer Opgen-Rhein,
-Korbinian Strimmer,
-Damien de Vienne
+Author: Emmanuel Paradis, Ben Bolker, Julien Claude, Hoa Sien Cuong, Richard Desper, Benoit Durand, Julien Dutheil, Olivier Gascuel, Gangolf Jobb, Christoph Heibl, Daniel Lawson, Vincent Lefort, Pierre Legendre, Jim Lemon, Yvonnick Noel, Johan Nylander, Rainer Opgen-Rhein, Korbinian Strimmer, Damien de Vienne
Maintainer: Emmanuel Paradis <Emmanuel.Paradis@ird.fr>
Depends: R (>= 2.6.0)
Suggests: gee
-## phymltest.R (2008-10-08)
+## phymltest.R (2009-03-29)
## Fits a Bunch of Models with PhyML
-## Copyright 2004-2008 Emmanuel Paradis
+## Copyright 2004-2009 Emmanuel Paradis
## This file is part of the R-package `ape'.
## See the file ../COPYING for licensing issues.
os <- Sys.info()[1]
## default names of PhyML:
if (is.null(execname)) {
- if (os == "Linux") execname <- "phyml_3.0_linux32"
- if (os == "Darwin") execname <- "phyml_3.0_macintel"
- if (os == "Windows") execname <- "phyml_3.0_win32"
+ if (os == "Linux") execname <- "phyml_3.0.1_linux32"
+ if (os == "Darwin") execname <- "phyml_3.0.1_macintel"
+ if (os == "Windows") execname <- "phyml_3.0.1_win32"
}
if (is.null(execname))
stop("you must give an executable file name for PHYML")
tstv <- rep("-t e", N) # ignored by PhyML with JC69 or F81
inv <- rep(c("", "-v e"), length.out = N)
## no need to use the -c option of PhyML (4 categories by default if '-a e' is set):
- alpha <- rep(rep(c("", "-a e"), each = 2), length.out = N)
+ alpha <- rep(rep(c("-c 1", "-a e"), each = 2), length.out = N)
tree <- rep("", N)
if (!is.null(itree)) tree[] <- paste("-u ", itree)
-## read.tree.R (2009-03-09)
+## read.tree.R (2009-03-29)
## Read Tree Files in Parenthetic Format
comment.char = "#", keep.multi = FALSE, ...)
{
unname <- function(treetext) {
+ nc <- nchar(treetext)
tstart <- 1
- while (substr(treetext, tstart, tstart) != "(" && tstart <= nchar(treetext))
+ while (substr(treetext, tstart, tstart) != "(" && tstart <= nc)
tstart <- tstart + 1
if (tstart > 1)
return(c(substr(treetext, 1, tstart - 1),
- substr(treetext, tstart, nchar(treetext))))
+ substr(treetext, tstart, nc)))
return(c("", treetext))
}
if (!is.null(text)) {
tree <- scan(file = file, what = "", sep = "\n", quiet = TRUE,
skip = skip, comment.char = comment.char, ...)
}
- tmp <- lapply(tree, unname)
- tmpnames <- sapply(tmp, function(x) x[1])
- tree <- sapply(tmp, function(x) x[2])
- if (is.null(tree.names) && any(nzchar(tmpnames))) tree.names <- tmpnames
## Suggestion from Eric Durand and Nicolas Bortolussi (added 2005-08-17):
if (identical(tree, character(0))) {
warning("empty character string.")
STRING <- character(Ntree)
for (i in 1:Ntree)
STRING[i] <- paste(tree[x[i]:y[i]], sep = "", collapse = "")
+
+ tmp <- unlist(lapply(STRING, unname))
+ tmpnames <- tmp[c(TRUE, FALSE)]
+ tree <- tmp[c(FALSE, TRUE)]
+ if (is.null(tree.names) && any(nzchar(tmpnames)))
+ tree.names <- tmpnames
+
colon <- grep(":", STRING)
if (!length(colon)) {
obj <- lapply(STRING, clado.build)
}
}
n <- length(phy$tip.label)
- if(tree.names){STRING <- paste(tname,"(",sep="")
- }else STRING <- "("
+ STRING <-
+ if (output.tree.names) paste(tree.names, "(", sep = "") else "("
br <- which(phy$edge[, 1] == n + 1)
for (j in br) {
desc <- phy$edge[j, 2]
-require(ape, quietly = TRUE, save = FALSE) # added line
+require(ape, quietly = TRUE, save = FALSE)
woodmouse <- read.dna("woodmouse.txt", format = "sequential")
Use in phylogenetic analysis: to identify congruence among distance matrices (D) representing different genes or different types of data. Congruent D matrices correspond to data tables that can be used together in a combined phylogenetic or other type of multivariate analysis.
}
\usage{
-CADM.global(Dmat, nmat, n, nperm=99, make.sym=TRUE, weights=NULL, silent=FALSE)
-CADM.post (Dmat, nmat, n, nperm=99, make.sym=TRUE, weights=NULL, mult="holm", mantel=FALSE, silent=FALSE)
+CADM.global(Dmat, nmat, n, nperm=99, make.sym=TRUE, weights=NULL,
+ silent=FALSE)
+CADM.post (Dmat, nmat, n, nperm=99, make.sym=TRUE, weights=NULL,
+ mult="holm", mantel=FALSE, silent=FALSE)
}
\arguments{
The Holm correction is computed after ordering the P-values in a list with the smallest value to the left. Compute adjusted P-values as:
-\eqn{P_corr = (k-i+1)*P}
+\deqn{P_{corr} = (k-i+1)*P}{P_corr = (k-i+1)*P}
-where i is the position in the ordered list. Final step: from left to right, if an adjusted P_corr in the ordered list is smaller than the one occurring at its left, make the smallest one equal to the largest one.
+where i is the position in the ordered list. Final step: from left to right, if an adjusted \eqn{P_{corr}}{P_corr} in the ordered list is smaller than the one occurring at its left, make the smallest one equal to the largest one.
The Sidak correction is:
-\eqn{P_corr = 1 - (1 - P)^k}
+\deqn{P_{corr} = 1 - (1 - P)^k}{P_corr = 1 - (1 - P)^k}
The Bonferonni correction is:
-\eqn{P_corr = k*P}
+\deqn{P_{corr} = k*P}{P_corr = k*P}
}
\value{
-\code{CADM.global} produces a small table containing the W, Chi2, and Prob.perm statistics described in the following list.
-\code{CADM.post} produces a table stored in element $A_posteriori_tests, containing Mantel.mean, Prob, and Corrected.prob statistics in rows; the columns correspond to the k distance matrices under study, labeled Dmat.1 to Dmat.k.
+\code{CADM.global} produces a small table containing the W, Chi2, and Prob.perm statistics described in the following list.
+\code{CADM.post} produces a table stored in element \code{A_posteriori_tests}, containing Mantel.mean, Prob, and Corrected.prob statistics in rows; the columns correspond to the k distance matrices under study, labeled Dmat.1 to Dmat.k.
If parameter \code{mantel} is TRUE, tables of Mantel statistics and P-values are computed among the matrices.
\item{W }{Kendall's coefficient of concordance, W (Kendall and Babington Smith 1939). }
Siegel, S. and N. J. Castellan, Jr. 1988. Nonparametric statistics for the behavioral sciences. 2nd edition. McGraw-Hill, New York.
}
-\seealso{ \code{\link{kendall.W}}, \code{\link[ape:ape-package]{ape}} }
+
\author{ Pierre Legendre, Universite de Montreal }
\examples{
--- /dev/null
+\name{mat3}
+\alias{mat3}
+\title{Three Matrices}
+\description{
+ Three matrices respectively representing Serological (asymmetric),
+ DNA hybridization (asymmetric) and Anatomical (symmetric) distances
+ among 9 families.
+}
+\usage{
+data(mat3)
+}
+\format{
+ A data frame with 27 observations and 9 variables.
+}
+\source{
+ Lapointe, F.-J., J. A. W. Kirsch and J. M. Hutcheon. 1999. Total
+ evidence, consensus, and bat phylogeny: a distance-based
+ approach. Molecular Phylogenetics and Evolution 11: 55-66.
+}
+\seealso{
+ \code{\link{mat5Mrand}}, \code{\link{mat5M3ID}}
+}
+\keyword{datasets}
--- /dev/null
+\name{mat5M3ID}
+\alias{mat5M3ID}
+\title{Five Trees}
+\description{
+ Three partly similar trees, two independent trees.
+}
+\usage{
+data(mat5M3ID)
+}
+\format{
+ A data frame with 250 observations and 50 variables.
+}
+\source{
+ Data provided by V. Campbell.
+}
+\seealso{
+ \code{\link{mat5Mrand}}, \code{\link{mat3}}
+}
+\keyword{datasets}
--- /dev/null
+\name{mat5Mrand}
+\alias{mat5Mrand}
+\title{Five Independent Trees}
+\description{
+ Five independent additive trees.
+}
+\usage{
+data(mat5Mrand)
+}
+\format{
+ A data frame with 250 observations and 50 variables.
+}
+\source{
+ Data provided by V. Campbell.
+}
+\seealso{
+ \code{\link{mat5M3ID}}, \code{\link{mat3}}
+}
+\keyword{datasets}
returned in R as a vector with the log-likelihood value of each model.
}
\details{
- The present function requires version 3.0 of PhyML; it won't work with
+ The present function requires version 3.0.1 of PhyML; it won't work with
older versions.
The user must take care to set correctly the three different paths
ans
}
### ... and their primitives:
-BIRTH.logis <- function(a, b) log(exp(-a*t) + exp(b))/a + t
+BIRTH.logis <- function(t) log(exp(-a*t) + exp(b))/a + t
BIRTH.step <- function(t)
{
if (t <= Tcl) return(t*l1)
### fit both models:
yule.time(bird.families, birth.logis)
yule.time(bird.families, birth.logis, BIRTH.logis) # same but faster
-yule.time(bird.families, birth.step) # fails
+\dontrun{yule.time(bird.families, birth.step)} # fails
yule.time(bird.families, birth.step, BIRTH.step)
}
\keyword{models}