+ CHANGES IN APE VERSION 2.7-1
+
+
+BUG FIXES
+
+ o A bug was introduced in read.nexus() in ape 2.7.
+
+ o image.DNAbin() did not colour correctly the bases if there were
+ '-' and no 'N' in the alignment.
+
+
+
CHANGES IN APE VERSION 2.7
Package: ape
-Version: 2.7
-Date: 2011-03-17
+Version: 2.7-1
+Date: 2011-03-18
Title: Analyses of Phylogenetics and Evolution
Author: Emmanuel Paradis, Ben Bolker, Julien Claude, Hoa Sien Cuong, Richard Desper, Benoit Durand, Julien Dutheil, Olivier Gascuel, Christoph Heibl, Daniel Lawson, Vincent Lefort, Pierre Legendre, Jim Lemon, Yvonnick Noel, Johan Nylander, Rainer Opgen-Rhein, Klaus Schliep, Korbinian Strimmer, Damien de Vienne
Maintainer: Emmanuel Paradis <Emmanuel.Paradis@ird.fr>
-## DNA.R (2011-03-16)
+## DNA.R (2011-03-21)
## Manipulations and Comparisons of DNA Sequences
y <- integer(N <- length(x))
ncl <- length(what)
col <- rep(col, length.out = ncl)
+ brks <- 0.5:(ncl + 0.5)
sm <- 0L
for (i in ncl:1) {
k <- ._bs_[._cs_ == what[i]]
sel <- which(x == k)
- if (ll <- length(sel)) {
+ if (L <- length(sel)) {
y[sel] <- i
- sm <- sm + ll
+ sm <- sm + L
} else {
what <- what[-i]
col <- col[-i]
+ brks <- brks[-i]
}
}
dim(y) <- dx
co <- c(bg, col)
leg.txt <- c(toupper(what), "others")
leg.co <- c(col, bg)
+ brks <- c(-0.5, brks)
}
yaxt <- if (show.labels) "n" else "s"
- image(1:s, 1:n, t(y), col = co, xlab = xlab,
- ylab = ylab, yaxt = yaxt, ...)
+ graphics::image.default(1:s, 1:n, t(y), col = co, xlab = xlab,
+ ylab = ylab, yaxt = yaxt, breaks = brks, ...)
if (show.labels)
mtext(rownames(x), side = 2, line = 0.1, at = 1:n,
cex = cex.lab, adj = 1, las = 1)
-## read.nexus.R (2011-02-28)
+## read.nexus.R (2011-03-18)
## Read Tree File in Nexus Format
.treeBuildWithTokens <- function(x)
{
- phy <- .Call("treeBuildWithTokens", x, PACKAGE = "apex")
+ phy <- .Call("treeBuildWithTokens", x, PACKAGE = "ape")
dim(phy[[1]]) <- c(length(phy[[1]])/2, 2)
nms <- c("edge", "edge.length", "Nnode", "node.label", "root.edge")
if (length(phy) == 4) nms <- nms[-5]
are dropped.}
\item{i, j}{indices of the rows and/or columns to select or to drop.
They may be numeric, logical, or character (in the same way than for
- standard R objects).}
+ standard \R objects).}
\item{drop}{logical; if \code{TRUE}, the returned object is of the
lowest possible dimension.}
\item{recursive}{for compatibility with the generic (unused).}
\details{
These are all `methods' of generic functions which are here applied to
DNA sequences stored as objects of class \code{"DNAbin"}. They are
- used in the same way than the standard R functions to manipulate
+ used in the same way than the standard \R functions to manipulate
vectors, matrices, and lists. Additionally, the operators \code{[[}
and \code{$} may be used to extract a vector from a list. Note that
the default of \code{drop} is not the same than the generic operator:
}
\author{\enc{BenoƮt}{Benoit} \email{b.durand@alfort.AFSSA.FR}}
\seealso{
- \code{\link[base]{all.equal}} for the generic R function
+ \code{\link[base]{all.equal}} for the generic \R function
}
\examples{
### maybe the simplest example of two representations
plot(bird.orders, font = 1, no.margin = TRUE)
par(mar = c(0, 0, 0, 8))
plot(dend, horiz = TRUE)
-layout(matrix(1, 1, 1))
+layout(matrix(1))
+\dontrun{
### convert into networks:
if (require(network)) {
x <- as.network(rtree(10))
print(as.igraph(tr, FALSE, FALSE))
}
}
+}
\keyword{manip}
frequencies of the DNA bases from a pair of sequences.
}
\usage{
-base.freq(x, freq = FALSE)
+base.freq(x, freq = FALSE, all = FALSE)
Ftab(x, y = NULL)
}
\arguments{
\item{y}{a vector with a single DNA sequence.}
\item{freq}{a logical specifying whether to return the proportions
(the default) or the absolute frequencies (counts).}
+ \item{all}{a logical; by default only the counts of A, C, G, and T are
+ returned. If \code{all = TRUE}, all counts of bases, ambiguous codes,
+ missing data, and alignment gaps are returned.}
}
\details{
The base frequencies are computed over all sequences in the
\item{evaluations}{id.}
}}
\references{
- Paradis, E. (2010) Time-dependent speciation and extinction from
- phylogenies: a least squares approach. \emph{Evolution} (in press)
- %, \bold{59}, 1--12.
+ Paradis, E. (2011) Time-dependent speciation and extinction from
+ phylogenies: a least squares approach. \emph{Evolution}, \bold{65},
+ 661--672.
}
\author{Emmanuel Paradis}
\seealso{
}
\author{
original C code by Hoa Sien Cuong and Olivier Gascuel; adapted and
- ported to R by Vincent Lefort \email{vincent.lefort@lirmm.fr}
+ ported to \R by Vincent Lefort \email{vincent.lefort@lirmm.fr}
}
\seealso{
\code{\link{nj}}, \code{\link{fastme}},
Higgins, D. G. and Thompson, J. D. (2003) Multiple sequence alignment
with the Clustal series of programs. \emph{Nucleic Acids Research}
\bold{31}, 3497--3500.
-
\url{http://www.clustal.org/}
Edgar, R. C. (2004) MUSCLE: Multiple sequence alignment with high
accuracy and high throughput. \emph{Nucleic Acids Research},
\bold{32}, 1792--1797.
-
\url{http://www.drive5.com/muscle/muscle_userguide3.8.html}
Notredame, C., Higgins, D. and Heringa, J. (2000) T-Coffee: A novel
method for multiple sequence alignments. \emph{Journal of Molecular
Biology}, \bold{302}, 205--217.
-
\url{http://www.tcoffee.org/Documentation/t_coffee/t_coffee_technical.htm}
}
\author{Emmanuel Paradis}
\code{\link[graphics]{image.default}} (e.g., \code{cex.axis}).}
}
\details{
- The idea of this function is to allow fleixble plotting and colouring
+ The idea of this function is to allow flexible plotting and colouring
of a nucleotide alignment. By default, the most common bases (a, g, c,
t, and n) and alignment gap are plotted using a standard colour
scheme.
}
\details{
The default value for \code{tol} is based on the numerical
- characteristics of the machine R is running on.
+ characteristics of the machine \R is running on.
}
\author{Emmanuel Paradis}
\seealso{
\item{nperm}{ Number of permutations for the tests. If \code{nperm =
0}, permutation tests will not be computed. The default value is \code{nperm = 999}. For large data files, the permutation test is rather slow since the permutation procedure is not compiled. }
\item{method}{ \code{method = "raw"} computes t-tests of the regression coefficients by permutation of the raw data. \code{method = "residuals"} computes t-tests of the regression coefficients by permutation of the residuals of the full model. If \code{method = NULL}, permutation of the raw data is used to test the regression coefficients in regression through the origin; permutation of the residuals of the full model is used to test the regression coefficients in ordinary multiple regression. }
- \item{silent}{ Informative messages and the time to compute the tests will not be written to the R console if silent=TRUE. Useful when the function is called by a numerical simulation function. }
+ \item{silent}{ Informative messages and the time to compute the tests will not be written to the \R console if silent=TRUE. Useful when the function is called by a numerical simulation function. }
}
\details{
London: Chapman & Hall.
}
\author{Original code in S by Ben Bolker \email{bolker@zoo.ufl.edu}, ported
- to R by Julien Claude \email{claude@isem.univ-montp2.fr}
+ to \R by Julien Claude \email{claude@isem.univ-montp2.fr}
}
\examples{
q1 <- matrix(runif(36), nrow = 6)
\author{Rainer Opgen-Rhein and
Korbinian Strimmer (\url{http://strimmerlab.org}).
- Parts of the rjMCMC sampling procedure are adapted from R code by Karl Browman
+ Parts of the rjMCMC sampling procedure are adapted from \R code by Karl Browman
(\url{http://www.biostat.wisc.edu/~kbroman/})}
\seealso{
}
\details{
The idea is to have different bits of text in different vectors that
- are put together to make a vector of R expressions. This vector is
+ are put together to make a vector of \R expressions. This vector is
interpreted by graphical functions to format the text. A simple use
may be \code{mixedFontLabel(genus, species), italic = 1:2}, but it is
more interesting when mixing fonts (see examples).
\item{test.links }{ \code{test.links = TRUE} will test the significance of individual host-parasite links. Default: \code{test.links = FALSE}. }
\item{seed }{ \code{seed = NULL} (default): a seed is chosen at random by the function. That seed is used as the starting point for all tests of significance, i.e. the global H-P test and the tests of individual H-P links if they are requested. Users can select a seed of their choice by giving any integer value to \code{seed}, for example \code{seed = -123456}. Running the function again with the same seed value will produce the exact same test results. }
\item{correction}{ Correction methods for negative eigenvalues (details below): \code{correction="lingoes"} and \code{correction="cailliez"}. Default value: \code{"none"}. }
- \item{silent}{ Informative messages and the time to compute the tests will not be written to the R console if silent=TRUE. Useful when the function is called by a numerical simulation function. }
+ \item{silent}{ Informative messages and the time to compute the tests will not be written to the \R console if silent=TRUE. Useful when the function is called by a numerical simulation function. }
}
\details{
\description{
This function calls PhyML and fits successively 28 models of DNA
evolution. The results are saved on disk, as PhyML usually does, and
- returned in R as a vector with the log-likelihood value of each model.
+ returned in \R as a vector with the log-likelihood value of each model.
}
\details{
The present function requires version 3.0.1 of PhyML; it won't work with
\author{Ben Bolker \email{bolker@zoo.ufl.edu} and Emmanuel Paradis}
\seealso{
\code{\link{read.tree}}, \code{\link{summary.phylo}},
- \code{\link[base]{print}} for the generic R function
+ \code{\link[base]{print}} for the generic \R function
}
\examples{
x <- rtree(10)
\name{richness.yule.test}
\alias{richness.yule.test}
-\title{}
+\title{Test of Diversification-Shift With the Yule Process}
\description{
This function performs a test of shift in diversification rate using
probabilities from the Yule process.
Both functions use continuous-time algorithms described in the
references. The models are time-dependent birth--death models as
described in Kendall (1948). Speciation (birth) and extinction (death)
- rates may be constant or vary through time according to an R function
+ rates may be constant or vary through time according to an \R function
specified by the user. In the latter case, \code{BIRTH} and/or
\code{DEATH} may be used of the primitives of \code{birth} and
\code{death} are known. In these functions time is the formal argument
Kendall, D. G. (1948) On the generalized ``birth-and-death''
process. \emph{Annals of Mathematical Statistics}, \bold{19}, 1--15.
- Paradis, E. (2010) Time-dependent speciation and extinction from
- phylogenies: a least squares approach. \emph{Evolution} (in press)
- %, \bold{59}, 1--12.
+ Paradis, E. (2011) Time-dependent speciation and extinction from
+ phylogenies: a least squares approach. \emph{Evolution}, \bold{65},
+ 661--672.
}
\author{Emmanuel Paradis}
\seealso{
(the default).}
\item{tip.label}{a character vector giving the tip labels; if not
specified, the tips "t1", "t2", ..., are given.}
- \item{br}{one of the following: (i) an R function used to generate the
+ \item{br}{one of the following: (i) an \R function used to generate the
branch lengths (\code{rtree}; use \code{NULL} to simulate only a
topology), or the coalescence times (\code{rcoal}); (ii) a character
to simulate a genuine coalescent tree for \code{rcoal} (the
\item a phylogenetic tree which may contain multichotomies;
\item a formula which specifies the predictors of the model described
- above: this is given as a standard R formula and has no response (no
+ above: this is given as a standard \R formula and has no response (no
left-hand side term), for instance: \code{~ x + y}, it can include
interactions (\code{~ x + a * b}) (see \code{\link[stats]{formula}}
for details);
/* } */
/* } */
/* if (! *freq) for (i = 0; i < 4; i++) BF[i] /= m; */
-}
+/* } */
void BaseProportion(unsigned char *x, int *n, double *BF)
{