From: paradis Date: Tue, 9 Aug 2011 02:22:33 +0000 (+0000) Subject: final fixes for ape 2.7-3 X-Git-Url: https://git.donarmstrong.com/?p=ape.git;a=commitdiff_plain;h=c3c9c0a9590fabd2996543a4789c84634b7aca71 final fixes for ape 2.7-3 git-svn-id: https://svn.mpl.ird.fr/ape/dev/ape@169 6e262413-ae40-0410-9e79-b911bd7a66b7 --- diff --git a/DESCRIPTION b/DESCRIPTION index 1f06121..5501dec 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: ape -Version: 2.7-5 -Date: 2011-07-18 +Version: 2.7-3 +Date: 2011-08-08 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 diff --git a/NEWS b/NEWS index 7b43668..528e408 100644 --- a/NEWS +++ b/NEWS @@ -35,6 +35,7 @@ BUG FIXES Schliep for the fix). o root() failed in some cases with an outgroup made of several tips. + The help page has been clarified a bit. diff --git a/man/all.equal.phylo.Rd b/man/all.equal.phylo.Rd index 0fce2e0..41351da 100644 --- a/man/all.equal.phylo.Rd +++ b/man/all.equal.phylo.Rd @@ -34,9 +34,13 @@ format and in the \code{"phylo"} class of objects used in `ape'. One aim of the present function is to be able to identify whether two objects of class \code{"phylo"} represent the same phylogeny. +} +\note{ + The algorithm used here does not work correctly for the comparison of + topologies (i.e., ignoring tip labels) of unrooted trees. This also + affects \code{\link{unique.multiPhylo}} which calls the present function. See: - Only the labelled topologies are compared (i.e. branch lengths are not - considered. + \url{https://stat.ethz.ch/pipermail/r-sig-phylo/2011-August/001562.html} } \value{ A logical value, or a two-column matrix. diff --git a/man/rTraitCont.Rd b/man/rTraitCont.Rd index f9ce291..50fd073 100644 --- a/man/rTraitCont.Rd +++ b/man/rTraitCont.Rd @@ -45,7 +45,7 @@ rTraitCont(phy, model = "BM", sigma = 0.1, alpha = 1, theta = 0, \code{alpha}, and \code{theta}. This may be interesting for the last one to model varying phenotypic optima. The exact updating formula from Gillespie (1996) are used which are reduced to BM formula if - \code{alpha = 0}. + \code{alpha = 0}.} \item{A function:}{it must be of the form \code{foo(x, l)} where \code{x} is the trait of the ancestor and \code{l} is the branch diff --git a/man/root.Rd b/man/root.Rd index 6559a69..05ef593 100644 --- a/man/root.Rd +++ b/man/root.Rd @@ -12,7 +12,8 @@ is.rooted(phy) \item{phy}{an object of class \code{"phylo"}.} \item{outgroup}{a vector of mode numeric or character specifying the new outgroup.} - \item{node}{alternatively, a node number where to root the tree.} + \item{node}{alternatively, a node number where to root the tree (this + should give the MRCA of the ingroup).} \item{resolve.root}{a logical specifying whether to resolve the new root as a bifurcating node.} \item{interactive}{if \code{TRUE} the user is asked to select the node @@ -37,11 +38,11 @@ is.rooted(phy) tree is rerooted using the node below this tip as the new root. If \code{outgroup} is of length two or more, the most recent common - ancestor (MRCA) is used as the new root. Note that the tree is really - unrooted before being rerooted, so that if \code{outgroup} is already - the outgroup, then the returned tree is not the same than the original - one (see examples). If \code{outgroup} is not monophyletic, the - operation fails and an error message is issued. + ancestor (MRCA) \emph{of the ingroup} is used as the new root. Note + that the tree is unrooted before being rerooted, so that if + \code{outgroup} is already the outgroup, then the returned tree is not + the same than the original one (see examples). If \code{outgroup} is + not monophyletic, the operation fails and an error message is issued. If \code{resolve.root = TRUE}, \code{root} adds a zero-length branch below the MRCA of the ingroup. diff --git a/src/SPR.c b/src/SPR.c index e5e204f..82f0a67 100644 --- a/src/SPR.c +++ b/src/SPR.c @@ -249,7 +249,7 @@ void assignUpWeights(edge *etest, node *vtest, node *va, edge *back, node *cprev /*sib is tree C being passed by B*/ /*D is tree below etest*/ double D_AB, D_CD, D_AC, D_BD; - /* double thisWeight; */ + double thisWeight; sib = siblingEdge(etest); left = etest->head->leftEdge; right = etest->head->rightEdge; diff --git a/src/bNNI.c b/src/bNNI.c index b477b67..9363ea5 100644 --- a/src/bNNI.c +++ b/src/bNNI.c @@ -57,7 +57,7 @@ void weighTree(tree *T) //void bNNI(tree *T, double **avgDistArray, int *count) void bNNI(tree *T, double **avgDistArray, int *count, double **D, int numSpecies) { - edge *e; /* , *centerEdge; */ + edge *e, *centerEdge; edge **edgeArray; int *p, *location, *q; int i,j; diff --git a/src/rTrait.c b/src/rTrait.c index 0e543a6..43dc73a 100644 --- a/src/rTrait.c +++ b/src/rTrait.c @@ -12,6 +12,7 @@ void rTraitCont(int *model, int *Nedge, int *edge1, int *edge2, double *el, { /* The tree must be in pruningwise order */ int i; + double alphaT, M, S; switch(*model) { case 1 : for (i = *Nedge - 1; i >= 0; i--) { @@ -25,7 +26,7 @@ void rTraitCont(int *model, int *Nedge, int *edge1, int *edge2, double *el, alphaT = alpha[i] * el[i]; M = exp(-alphaT); S = sigma[i] * sqrt((1 - exp(-2 * alphaT))/(2 * alpha[i])); - } else { + } else { /* same than if (alpha[i] ==0) */ M = 1; S = sqrt(el[i]) * sigma[i]; }