Package: ape
-Version: 2.8-1
-Date: 2011-12-03
+Version: 3.0
+Date: 2012-01-13
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, Andrei-Alin Popescu, Klaus Schliep, Korbinian Strimmer, Damien de Vienne
Maintainer: Emmanuel Paradis <Emmanuel.Paradis@ird.fr>
- CHANGES IN APE VERSION 2.8-1
+ CHANGES IN APE VERSION 3.0
NEW FEATURES
o extract.clade() sometimes shuffled some tip labels (thanks to
Ludovic Mallet and Mahendra Mariadassou for the fix).
+ o clustal() should now by default find the executable under Windows.
+
OTHER CHANGES
o The code of mantel.test() has been adjusted to be consistent
with common permutation tests.
+ o The C code of base.freq() has been improved and is now nearly 8
+ times faster.
+
CHANGES IN APE VERSION 2.8
-## DNA.R (2011-03-21)
+## DNA.R (2012-01-10)
## Manipulations and Comparisons of DNA Sequences
-## Copyright 2002-2011 Emmanuel Paradis
+## Copyright 2002-2012 Emmanuel Paradis
## This file is part of the R-package `ape'.
## See the file ../COPYING for licensing issues.
-## clustal.R (2011-03-16)
+## clustal.R (2012-01-12)
## Multiple Sequence Alignment with External Applications
-## Copyright 2011 Emmanuel Paradis
+## Copyright 2011-2012 Emmanuel Paradis
## This file is part of the R-package `ape'.
## See the file ../COPYING for licensing issues.
if (is.null(exec)) {
if (os == "Linux") exec <- "clustalw"
if (os == "Darwin") exec <- "clustalw2"
- if (os == "Windows") exec <- "C:/Program Files/ClustalW2/clustalw2"
+ if (os == "Windows") shortPathName("C:/Program Files/ClustalW2/clustalw2.exe")
}
if (missing(x)) {
if (!translation) n <- length(tr$tip.label)
ROOT <- n + 1
if (sum(tr$edge[, 1] == ROOT) == 1 && dim(tr$edge)[1] > 1) {
- stop(paste("There is apparently two root edges in your file: cannot read tree file.\n Reading NEXUS file aborted at tree no.", i, sep = ""))
+ stop(paste("The tree has apparently singleton node(s): cannot read tree file.\n Reading NEXUS file aborted at tree no.", i, sep = ""))
}
}
if (Ntree == 1) {
## is a bifurcation at the root
ROOT <- length(obj[[i]]$tip.label) + 1
if(sum(obj[[i]]$edge[, 1] == ROOT) == 1 && dim(obj[[i]]$edge)[1] > 1)
- stop(paste("There is apparently two root edges in your file: cannot read tree file.\n Reading Newick file aborted at tree no.", i, sep = ""))
+ stop(paste("The tree has apparently singleton node(s): cannot read tree file.\n Reading Newick file aborted at tree no.", i))
}
if (Ntree == 1 && !keep.multi) obj <- obj[[1]] else {
if (!is.null(tree.names)) names(obj) <- tree.names
\url{http://ape.mpl.ird.fr/misc/BitLevelCodingScheme_20April2007.pdf}
Paradis, E. (2012) \emph{Analysis of Phylogenetics and Evolution with
- R (Second Edition)}. New York: Springer.
+ R (Second Edition).} New York: Springer.
}
\author{Emmanuel Paradis}
\seealso{
message is issued.
If there are any characters preceding the first "(" in a line then
- this is assigned to the name. This is returned when a "multiphylo"
+ this is assigned to the name. This is returned when a "multiPhylo"
object is returned and \code{tree.names = NULL}.
}
\value{
Paradis, E. (2008) Definition of Formats for Coding Phylogenetic Trees
in R. \url{http://ape.mpl.ird.fr/misc/FormatTreeR_28July2008.pdf}
+
+ Paradis, E. (2012) \emph{Analysis of Phylogenetics and Evolution with
+ R (Second Edition).} New York: Springer.
}
\author{Emmanuel Paradis and Daniel Lawson \email{dan.lawson@bristol.ac.uk}}
-/* dist_dna.c 2011-06-23 */
+/* dist_dna.c 2012-01-10 */
-/* Copyright 2005-2011 Emmanuel Paradis
+/* Copyright 2005-2012 Emmanuel Paradis
/* This file is part of the R-package `ape'. */
/* See the file ../COPYING for licensing issues. */
/* if (! *freq) for (i = 0; i < 4; i++) BF[i] /= m; */
/* } */
+/* void BaseProportion(unsigned char *x, int *n, double *BF) */
+/* { */
+/* int i; */
+
+/* for (i = 0; i < *n; i++) { */
+/* switch (x[i]) { */
+/* case 136 : BF[0]++; break; */
+/* case 40 : BF[1]++; break; */
+/* case 72 : BF[2]++; break; */
+/* case 24 : BF[3]++; break; */
+/* case 192 : BF[4]++; break; */
+/* case 160 : BF[5]++; break; */
+/* case 144 : BF[6]++; break; */
+/* case 96 : BF[7]++; break; */
+/* case 80 : BF[8]++; break; */
+/* case 48 : BF[9]++; break; */
+/* case 224 : BF[10]++; break; */
+/* case 176 : BF[11]++; break; */
+/* case 208 : BF[12]++; break; */
+/* case 112 : BF[13]++; break; */
+/* case 240 : BF[14]++; break; */
+/* case 4 : BF[15]++; break; */
+/* case 2 : BF[16]++; break; */
+/* } */
+/* } */
+/* } */
+
+/* a hash table is much faster than switch (2012-01-10) */
void BaseProportion(unsigned char *x, int *n, double *BF)
{
- int i;
-
- for (i = 0; i < *n; i++) {
- switch (x[i]) {
- case 136 : BF[0]++; break;
- case 40 : BF[1]++; break;
- case 72 : BF[2]++; break;
- case 24 : BF[3]++; break;
- case 192 : BF[4]++; break;
- case 160 : BF[5]++; break;
- case 144 : BF[6]++; break;
- case 96 : BF[7]++; break;
- case 80 : BF[8]++; break;
- case 48 : BF[9]++; break;
- case 224 : BF[10]++; break;
- case 176 : BF[11]++; break;
- case 208 : BF[12]++; break;
- case 112 : BF[13]++; break;
- case 240 : BF[14]++; break;
- case 4 : BF[15]++; break;
- case 2 : BF[16]++; break;
- }
- }
+ int i;
+ double count[256];
+
+ memset(count, 0, 256*sizeof(double));
+
+ for (i = 0; i < *n; i++) count[x[i]]++;
+
+ BF[0] = count[136];
+ BF[1] = count[40];
+ BF[2] = count[72];
+ BF[3] = count[24];
+ BF[4] = count[192];
+ BF[5] = count[160];
+ BF[6] = count[144];
+ BF[7] = count[96];
+ BF[8] = count[80];
+ BF[9] = count[48];
+ BF[10] = count[224];
+ BF[11] = count[176];
+ BF[12] = count[208];
+ BF[13] = count[112];
+ BF[14] = count[240];
+ BF[15] = count[4];
+ BF[16] = count[2];
}
void SegSites(unsigned char *x, int *n, int *s, int *seg)