]> git.donarmstrong.com Git - ape.git/commitdiff
final fixes for ape 2.7-3
authorparadis <paradis@6e262413-ae40-0410-9e79-b911bd7a66b7>
Tue, 9 Aug 2011 02:22:33 +0000 (02:22 +0000)
committerparadis <paradis@6e262413-ae40-0410-9e79-b911bd7a66b7>
Tue, 9 Aug 2011 02:22:33 +0000 (02:22 +0000)
git-svn-id: https://svn.mpl.ird.fr/ape/dev/ape@169 6e262413-ae40-0410-9e79-b911bd7a66b7

DESCRIPTION
NEWS
man/all.equal.phylo.Rd
man/rTraitCont.Rd
man/root.Rd
src/SPR.c
src/bNNI.c
src/rTrait.c

index 1f06121079e15ee0678a85394a74f650bcd4477d..5501decba968ae38f9ac2c99c28c11874089712f 100644 (file)
@@ -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 <Emmanuel.Paradis@ird.fr>
diff --git a/NEWS b/NEWS
index 7b43668c946918a267b1a726a6bd4b73aeff8b2a..528e4083f58b3b12478e26dc3cd95ac82461b9b0 100644 (file)
--- 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.
 
 
 
index 0fce2e0c4ed5e068845f6b5de886e3d4fc8c5188..41351daa6a8dbf856511793080cff09ceec308fc 100644 (file)
   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.
index f9ce291e73ceb823727bd837bae6b3e46be31382..50fd073c33bbe3987c82fa23b4d6ae055b5860d5 100644 (file)
@@ -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
index 6559a690eaab39e7fd713c96886e8945a0969b84..05ef5935ba7237019b2b590ae2b4d75274491bc0 100644 (file)
@@ -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.
index e5e204f788db38b117c672cd1625221348c4d9f1..82f0a676461e20cad4d0e6531aeddb39a1a932c1 100644 (file)
--- 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;
index b477b670d75f52ce3a69c278ea4bacb5d91fdf07..9363ea5c5d0308d7b150dbfecc45ac2068bc4409 100644 (file)
@@ -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;
index 0e543a6d8642f205891e3d0d32a192695f960040..43dc73ad85f3163b65e49333889a2088d30a06a5 100644 (file)
@@ -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];
                        }