From dca7b216e929337836a18374147b13eb793ffd95 Mon Sep 17 00:00:00 2001 From: paradis Date: Fri, 18 Sep 2009 16:00:01 +0000 Subject: [PATCH] moved functions from ape to pegas -> ape 2.4 git-svn-id: https://svn.mpl.ird.fr/ape/dev/ape@90 6e262413-ae40-0410-9e79-b911bd7a66b7 --- ChangeLog | 14 +++++++++++++- DESCRIPTION | 15 +++++++-------- R/DNA.R | 17 +---------------- R/ape-defunct.R | 26 ++++++++++++++++++++++++++ R/klastorin.R | 2 -- man/ape-defunct.Rd | 31 +++++++++++++++++++++++++++++++ man/ape-internal.Rd | 3 +-- 7 files changed, 79 insertions(+), 29 deletions(-) create mode 100644 R/ape-defunct.R delete mode 100644 R/klastorin.R create mode 100644 man/ape-defunct.Rd diff --git a/ChangeLog b/ChangeLog index b9e9e59..1375195 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ - CHANGES IN APE VERSION 2.3-4 + CHANGES IN APE VERSION 2.4 NEW FEATURES @@ -13,6 +13,18 @@ BUG FIXES now ignored. +DEPRECATED & DEFUNCT + + o The functions heterozygosity, nuc.div, theta.h, theta.k and + theta.s have been moved from ape to pegas. + + +OTHER CHANGES + + o Deprecated functions are now listed in a help page: see + help("ape-defunct"), with the quotes! + + CHANGES IN APE VERSION 2.3-3 diff --git a/DESCRIPTION b/DESCRIPTION index 4aa608c..0a4038b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: ape -Version: 2.3-4 -Date: 2009-09-16 +Version: 2.4 +Date: 2009-09-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, 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 @@ -13,11 +13,10 @@ Description: ape provides functions for reading, writing, plotting, in a phylogenetic framework, analyses of diversification and macroevolution, computing distances from allelic and nucleotide data, reading nucleotide sequences, and several tools such as - Mantel's test, computation of minimum spanning tree, the population - parameter theta based on various approaches, nucleotide diversity, - generalized skyline plots, estimation of absolute evolutionary rates - and clock-like trees using mean path lengths, non-parametric rate - smoothing and penalized likelihood. Phylogeny estimation can be done - with the NJ, BIONJ, and ME methods. + Mantel's test, computation of minimum spanning tree, generalized + skyline plots, estimation of absolute evolutionary rates and + clock-like trees using mean path lengths, non-parametric rate + smoothing and penalized likelihood. Phylogeny estimation can be + done with the NJ, BIONJ, and ME methods. License: GPL (>= 2) URL: http://ape.mpl.ird.fr/ diff --git a/R/DNA.R b/R/DNA.R index 919f0ec..72e1258 100644 --- a/R/DNA.R +++ b/R/DNA.R @@ -1,4 +1,4 @@ -## DNA.R (2009-09-06) +## DNA.R (2009-09-18) ## Manipulations and Comparisons of DNA Sequences @@ -286,21 +286,6 @@ seg.sites <- function(x) which(as.logical(ans[[4]])) } -nuc.div <- function(x, variance = FALSE, pairwise.deletion = FALSE) -{ - if (pairwise.deletion && variance) - warning("cannot compute the variance of nucleotidic diversity\nwith pairwise deletion: try 'pairwise.deletion = FALSE' instead.") - if (is.list(x)) x <- as.matrix(x) - n <- dim(x)[1] - ans <- sum(dist.dna(x, "raw", pairwise.deletion = pairwise.deletion))/ - (n*(n - 1)/2) - if (variance) { - var <- (n + 1)*ans/(3*(n + 1)*dim(x)[2]) + 2*(n^2 + n + 3)*ans/(9*n*(n - 1)) - ans <- c(ans, var) - } - ans -} - dist.dna <- function(x, model = "K80", variance = FALSE, gamma = FALSE, pairwise.deletion = FALSE, base.freq = NULL, as.matrix = FALSE) diff --git a/R/ape-defunct.R b/R/ape-defunct.R new file mode 100644 index 0000000..fa885b4 --- /dev/null +++ b/R/ape-defunct.R @@ -0,0 +1,26 @@ +klastorin <- function(phy) + .Defunct(msg = '\'klastorin\' has been removed from ape, + see help("ape-defunct") for details.') + +heterozygosity <- function (x, variance = FALSE) + .Defunct(msg = '\'heterozygosity\' has been moved from ape to pegas, + see help("ape-defunct") for details.') + +H <- function(x, variance = FALSE) + heterozygosity (x, variance = FALSE) + +nuc.div <- function(x, variance = FALSE, pairwise.deletion = FALSE) + .Defunct(msg = '\'nuc.div\' has been moved from ape to pegas, + see help("ape-defunct") for details.') + +theta.h <- function(x, standard.error = FALSE) + .Defunct(msg = '\'theta.h\' has been moved from ape to pegas, + see help("ape-defunct") for details.') + +theta.k <- function(x, n = NULL, k = NULL) + .Defunct(msg = '\'theta.k\' has been moved from ape to pegas, + see help("ape-defunct") for details.') + +theta.s <- function(s, n, variance = FALSE) + .Defunct(msg = '\'theta.s\' has been moved from ape to pegas, + see help("ape-defunct") for details.') diff --git a/R/klastorin.R b/R/klastorin.R deleted file mode 100644 index 3d19128..0000000 --- a/R/klastorin.R +++ /dev/null @@ -1,2 +0,0 @@ -klastorin <- function(phy) - stop("the function klastorin has been removed from ape") diff --git a/man/ape-defunct.Rd b/man/ape-defunct.Rd new file mode 100644 index 0000000..6549d59 --- /dev/null +++ b/man/ape-defunct.Rd @@ -0,0 +1,31 @@ +\name{ape-defunct} +\alias{klastorin} +\alias{heterozygosity} +\alias{H} +\alias{nuc.div} +\alias{theta.h} +\alias{theta.k} +\alias{theta.s} +\title{Defunct Ape Functions} +\description{ + These functions have been removed from \pkg{ape} or moved to another + package. +} +\usage{ +klastorin(phy) +heterozygosity(x, variance = FALSE) +H(x, variance = FALSE) +nuc.div(x, variance = FALSE, pairwise.deletion = FALSE) +theta.h(x, standard.error = FALSE) +theta.k(x, n = NULL, k = NULL) +theta.s(s, n, variance = FALSE) +} +\details{ + \code{klastorin} has been removed because it does not seem to be used + and this helped to clear some internal C code (this function may be + put back with a different coding). + + \code{heterozygosity}, \code{nuc.div}, \code{theta.h}, \code{theta.k} + and \code{theta.s} have been moved to \pkg{pegas}. +} +\keyword{internal} diff --git a/man/ape-internal.Rd b/man/ape-internal.Rd index 0206ccb..f4e834c 100644 --- a/man/ape-internal.Rd +++ b/man/ape-internal.Rd @@ -1,5 +1,4 @@ \name{ape-internal} -\alias{klastorin} \alias{tree.build} \alias{f.cherry.yule} \alias{f.cherry.uniform} @@ -44,7 +43,7 @@ \alias{plotPhyloCoor} \title{Internal Ape Functions} \description{ - Internal ape functions. + Internal \pkg{ape} functions. } \note{ These are not to be called by the user (unless you know what you're doing). -- 2.39.2