Package: ape
Version: 2.5-1
-Date: 2010-03-19
+Date: 2010-03-29
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 <Emmanuel.Paradis@ird.fr>
font = font, ...)
{
res <- list()
-###choice of the minimum space between the trees###
+###choice of the minimum space between the trees
left <- max(nchar(x$tip.label, type = "width")) + length.line
right <- max(nchar(y$tip.label, type = "width")) + length.line
space.min <- left + right + gap * 2
res$a <- a
b <- plotPhyloCoor(y, use.edge.length = use.edge.length,
direction = "leftwards", type = type)
- ###for the two trees to have the extreme leaves at the same ordinate.
- a[, 2] <- a[, 2] - min(a[, 2])
+###for the two trees to have the extreme leaves at the same ordinate.
+ a[, 2] <- a[, 2] - min(a[, 2])
b[, 2] <- b[, 2] - min(b[, 2])
res$b <- b
b2 <- b
}
}
if (show.tip.label) {
- text(a[1:N.tip.x, ], cex = 0, font = font, pos = 4, labels = x$tip.label)
+ text(a[1:N.tip.x, ], cex = 0, font = font, pos = 4,
+ labels = x$tip.label)
text(b2[1:N.tip.y, ], cex = 1, font = font, pos = 2,
- labels = y$tip.label)
+ labels = y$tip.label)
}
###links between associated taxa. Takes into account the size of the character strings of the taxa names.
lsa <- 1:N.tip.x
else if (length(lwd)>=nrow(assoc)) lwidths<-lwd
else lwidths<-c(rep(lwd, as.integer(nrow(assoc)/length(lwd))+1))
- #lty
+ #lty
if (length(lty) == 1) ltype <- c(rep(lty, nrow(assoc)))
else if (length(lty) >= nrow(assoc)) ltype <- lty
else ltype <- c(rep(lty, as.integer(nrow(assoc)/length(lty))+1))
for (i in 1:nrow(assoc)) {
-
- if (show.tip.label) {
- decx[i] <- strwidth(x$tip.label[lsa[x$tip.label ==
- assoc[i, 1]]])
- decy[i] <- strwidth(y$tip.label[lsb[y$tip.label ==
- assoc[i, 2]]])
- }
- else {
+ if (show.tip.label) {
+ decx[i] <- strwidth(x$tip.label[lsa[x$tip.label == assoc[i, 1]]])
+ decy[i] <- strwidth(y$tip.label[lsb[y$tip.label == assoc[i, 2]]])
+ } else {
decx[i] <- decy[i] <- 0
}
- segments(a[lsa[x$tip.label == assoc[i, 1]], 1] + decx[i] + gap, a[lsa[x$tip.label == assoc[i, 1]], 2], a[lsa[x$tip.label == assoc[i, 1]], 1] + gap + left, a[lsa[x$tip.label == assoc[i, 1]], 2], col = colors[i], lwd=lwidths[i], lty=ltype[i])
- segments(b2[lsb[y$tip.label == assoc[i, 2]], 1] - (decy[i] + gap), b2[lsb[y$tip.label == assoc[i, 2]], 2], b2[lsb[y$tip.label == assoc[i, 2]], 1] - (gap + right), b2[lsb[y$tip.label == assoc[i, 2]], 2], col = colors[i], lwd=lwidths[i], lty=ltype[i])
- segments(a[lsa[x$tip.label == assoc[i, 1]], 1] + gap + left, a[lsa[x$tip.label == assoc[i, 1]], 2], b2[lsb[y$tip.label == assoc[i, 2]], 1] - (gap + right), b2[lsb[y$tip.label == assoc[i, 2]], 2], col = colors[i], lwd=lwidths[i], lty=ltype[i])
+ segments(a[lsa[x$tip.label == assoc[i, 1]], 1] + decx[i] + gap,
+ a[lsa[x$tip.label == assoc[i, 1]], 2],
+ a[lsa[x$tip.label == assoc[i, 1]], 1] + gap + left,
+ a[lsa[x$tip.label == assoc[i, 1]], 2],
+ col = colors[i], lwd = lwidths[i], lty = ltype[i])
+
+ segments(b2[lsb[y$tip.label == assoc[i, 2]], 1] - (decy[i] + gap),
+ b2[lsb[y$tip.label == assoc[i, 2]], 2],
+ b2[lsb[y$tip.label == assoc[i, 2]], 1] - (gap + right),
+ b2[lsb[y$tip.label == assoc[i, 2]], 2],
+ col = colors[i], lwd = lwidths[i], lty = ltype[i])
+
+ segments(a[lsa[x$tip.label == assoc[i, 1]], 1] + gap + left,
+ a[lsa[x$tip.label == assoc[i, 1]], 2],
+ b2[lsb[y$tip.label == assoc[i, 2]], 1] - (gap + right),
+ b2[lsb[y$tip.label == assoc[i, 2]], 2],
+ col = colors[i], lwd = lwidths[i], lty = ltype[i])
}
if (return == TRUE) return(res)
}
obj <- list(edge = matrix(c(2, 1), 1, 2), Nnode = 1)
tp <- unlist(strsplit(tp, "[\\(\\);]"))
obj$tip.label <- tp[2]
- if (length(tp) == 3) obj$node.label <- tp[3]
+ if (tp[3] != "") obj$node.label <- tp[3]
class(obj) <- "phylo"
return(obj)
}
obj$edge.length <- as.numeric(tp[3])
obj$Nnode <- 1L
obj$tip.label <- tp[2]
- if (length(tp) == 4) obj$node.label <- tp[4]
+ if (tp[4] != "") obj$node.label <- tp[4]
class(obj) <- "phylo"
return(obj)
}
-## reorder.phylo.R (2007-06-16)
+## reorder.phylo.R (2010-04-02)
## Internal Reordering of Trees
-## Copyright 2006-2007 Emmanuel Paradis
+## Copyright 2006-2010 Emmanuel Paradis
## This file is part of the R-package `ape'.
## See the file ../COPYING for licensing issues.
{
order <- match.arg(order, c("cladewise", "pruningwise"))
if (!is.null(attr(x, "order")))
- if (attr(x, "order") == order) return(x)
- nb.tip <- length(x$tip.label)
+ if (attr(x, "order") == order) return(x)
nb.node <- x$Nnode
+ if (nb.node == 1) return(x)
+ nb.tip <- length(x$tip.label)
nb.edge <- dim(x$edge)[1]
neworder <- if (order == "cladewise")
.C("neworder_cladewise", as.integer(nb.tip),
Paradis, E. (2007) A Bit-Level Coding Scheme for Nucleotides.
\url{http://ape.mpl.ird.fr/misc/BitLevelCodingScheme_20April2007.pdf}
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{as.DNAbin}}, \code{\link{read.dna}},
\code{\link{read.GenBank}}, \code{\link{write.dna}}
\value{
A single numeric value is returned.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{base.freq}}, \code{\link{seg.sites}},
\code{\link{nuc.div}}
\bold{39}, 227--241.
}
\author{Julien Dutheil \email{julien.dutheil@univ-montp2.fr} and
- Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+ Emmanuel Paradis}
\seealso{
\code{\link{weight.taxo}}
}
Likelihood of ancestor states in adaptive radiation. \emph{Evolution},
\bold{51}, 1699--1711.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}, Ben Bolker
-\email{bolker@zoo.ufl.edu}}
+\author{Emmanuel Paradis, Ben Bolker \email{bolker@zoo.ufl.edu}}
\seealso{
\code{\link{corBrownian}}, \code{\link{corGrafen}},
\code{\link{corMartins}}, \code{\link{compar.ou}},
The function \code{\link[graphics]{locator}} may be used to
determine the \code{x} and \code{y} arguments.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{plot.phylo}}, \code{\link{axisPhylo}},
\code{\link[graphics]{locator}}
of \code{"as.DNAbin"}; a matrix of mode character or a list containing
vectors of mode character in the case of \code{"as.character"}.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{DNAbin}}, \code{\link{read.dna}},
\code{\link{read.GenBank}}, \code{\link{write.dna}}
\note{
Branch lengths are not supported in the present version.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\references{
Diaconis, P. W. and Holmes, S. P. (1998) Matchings and phylogenetic
trees. \emph{Proceedings of the National Academy of Sciences USA},
\value{
An object of class \code{"hclust"} or \code{"phylo"}.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link[stats]{hclust}}, \code{\link[stats]{as.hclust}},
\code{\link[stats]{dendrogram}}, \code{\link[ade4]{phylog}},
the help pages on \code{\link[graphics]{axis}} and
\code{\link[graphics]{par}}).
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{plot.phylo}}, \code{\link{add.scale.bar}},
\code{\link[graphics]{axis}}, \code{\link[graphics]{par}}
phylogenetic trees, from Yule to today. \emph{Statistical Science},
\bold{16}, 23--34.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\keyword{manip}
A numeric vector storing the relative frequencies with names
\code{c("a", "c", "g", "t")}.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{GC.content}}, \code{\link{seg.sites}},
\code{\link{nuc.div}}, \code{\link{DNAbin}}
and taxonomic data. \emph{Proceedings of the Royal Society of
London. Series B. Biological Sciences}, \bold{270}, 2499--2505.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{birthdeath}}, \code{\link{branching.times}},
\code{\link{diversi.gof}}, \code{\link{diversi.time}},
extinctions from molecular phylogenies. in \emph{Extinction Rates},
eds. Lawton, J. H. and May, R. M., pp. 164--182, Oxford University Press.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{branching.times}}, \code{\link{diversi.gof}},
\code{\link{diversi.time}}, \code{\link{ltt.plot}},
Felsenstein, J. (1985) Confidence limits on phylogenies: an approach
using the bootstrap. \emph{Evolution}, \bold{39}, 783--791.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{dist.topo}}, \code{\link{consensus}}, \code{\link{nodelabels}}
}
returned vector; otherwise the numbers (of mode character) of the
matrix \code{edge} of \code{phy} are used as names.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{is.ultrametric}}
}
McKenzie, A. and Steel, M. (2000) Distributions of cherries for two
models of trees. \emph{Mathematical Biosciences}, \bold{164}, 81--92.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{gammaStat}}
}
lengths. \emph{Molecular Phylogenetics and Evolution}, \bold{24},
58--65.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{chronogram}}, \code{\link{ratogram}},
\code{\link{NPRS.criterion}}, \code{\link{chronopl}}
approach. \emph{Molecular Biology and Evolution}, \bold{19},
101--109.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{chronogram}}, \code{\link{ratogram}},
\code{\link{NPRS.criterion}}, \code{\link{chronoMPL}}
Biology}, \bold{218}, 175--185.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{read.tree}}, \code{\link{pic}},
An object of class \code{phylo} with branch lengths.
}
\author{Julien Dutheil \email{julien.dutheil@univ-montp2.fr} and
- Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+ Emmanuel Paradis}
\references{
Grafen, A. (1989) The phylogenetic regression. \emph{Philosophical
Transactions of the Royal society of London. Series B. Biological
\value{
an object of class \code{"phylo"}.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{prop.part}}, \code{\link{dist.topo}}
}
\code{phy}), or, in the case of \code{dist.nodes}, the numbers of the
tips and the nodes (as given by the element \code{edge}).
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{read.tree}} to read tree files in Newick format,
\code{\link[stats]{cophenetic}} for the generic function
response in \code{formula}.
}
\author{Julien Dutheil \email{julien.dutheil@univ-montp2.fr} and
- Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+ Emmanuel Paradis}
\seealso{
\code{\link{plot.correlogram}, \link{Moran.I}}
}
A vector (if there is only one input sequence) or a list of class
\code{"DNAbin"}.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{base.freq}}, \code{\link{GC.content}},
\code{\link{theta.s}}, \code{\link{nuc.div}}, \code{\link{seg.sites}}
may be very long with only a slight increase in sample size.
}
\value{
- This function returns invisibly a named list with two componente:
+ This function returns invisibly a named list with two components:
\itemize{
\item{counts}{the counts for the histogram of
data(woodmouse)
d <- dist.dna(woodmouse)
delta.plot(d)
+layout(1)
delta.plot(d, 40, which = 1)
}
\keyword{hplot}
substitutions in the control region of mitochondrial DNA in humans and
chimpanzees. \emph{Molecular Biology and Evolution}, \bold{10}, 512--526.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{read.GenBank}}, \code{\link{read.dna}},
\code{\link{write.dna}}, \code{\link{DNAbin}},
an object of class \code{dist}. If \code{variance = TRUE} an
attribute called \code{"variance"} is given to the returned object.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{dist.dna}}, \code{\link{cophenetic.phylo}},
\code{\link[stats]{dist}}
testing minimum-evolution trees. \emph{Molecular Biology and
Evolution}, \bold{9}, 945--967.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{read.tree}} to read tree files in Newick format,
\code{\link{cophenetic.phylo}}, \code{\link{prop.part}}
comparisons. \emph{Journal of the American Statistical Association},
\bold{69}, 730--737.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{branching.times}}, \code{\link{diversi.time}}
\code{\link{ltt.plot}}, \code{\link{birthdeath}}, \code{\link{yule}},
testing. \emph{Proceedings of the Royal Society of London. Series
B. Biological Sciences}, \bold{264}, 1141--1147.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{branching.times}}, \code{\link{diversi.gof}}
\code{\link{ltt.plot}}, \code{\link{birthdeath}},
\value{
an object of class \code{"phylo"}.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{bind.tree}}, \code{\link{root}}
}
the Royal Society of London. Series B. Biological Sciences},
\bold{267}, 2267--2272.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{branching.times}}, \code{\link{ltt.plot}}, \code{\link{skyline}}
}
Felsenstein, J. (2004) \emph{Inferring phylogenies}. Sunderland:
Sinauer Associates.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\examples{
### Table 3.1 in Felsenstein 2004:
for (i in c(1:20, 30, 40, 50))
\code{"nodes"} with the identification of the tips and/or of the
nodes.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{plot.phylo}}, \code{\link{nodelabels}},
\code{\link[graphics]{identify}} for the generic function
The default value for \code{tol} is based on the numerical
characteristics of the machine R is running on.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{is.binary.tree}}, \code{\link[base]{.Machine}}
}
This function reorganizes the internal structure of the tree to get
the ladderized effect when plotted.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{plot.phylo}}, \code{\link{reorder.phylo}}
}
Transactions of the Royal Society of London. Series B. Biological
Sciences}, \bold{349}, 25--31.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{skyline}}, \code{\link{branching.times}},
\code{\link{birthdeath}}, \code{\link{bd.ext}}, \code{\link{yule.cov}}
}
\examples{
tr <-
-"((Pan_paniscus,Pan_troglodytes),((Homo_sapiens,Hom_erectus),Homo_abilis));"
+"((Pan_paniscus,Pan_troglodytes),((Homo_sapiens,Homo_erectus),Homo_abilis));"
tr <- read.tree(text = tr)
tr <- makeNodeLabel(tr, "u", nodeList = list(Pan = "Pan", Homo = "Homo"))
plot(tr, show.node.label = TRUE)
\value{
a numeric matrix of the same dimensions than `x'.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\examples{
### a simple rate matrix:
m <- matrix(0.1, 4, 4)
\value{
a matrix of mode numeric.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\keyword{manip}
\author{
Yvonnick Noel \email{noel@univ-lille3.fr},
Julien Claude \email{claude@isem.univ-montp2.fr} and
- Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}
+ Emmanuel Paradis
}
\seealso{
\code{\link{dist.dna}}, \code{\link{dist.gene}},
\seealso{
\code{\link{is.binary.tree}}
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\value{
Both functions return an object of class \code{"phylo"}.
}
method for reconstructing phylogenetic trees. \emph{Molecular Biology
and Evolution}, \bold{4}, 406--425.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{write.tree}}, \code{\link{read.tree}},
\code{\link{dist.dna}}, \code{\link{bionj}},
A numeric vector indexed with the node numbers of the matrix `edge' of
\code{phy}.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{plot.phylo}}
}
\code{show.tip.label}) of \code{plot.phylo} in most cases (see the
examples).
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}, Ben Bolker
- \email{bolker@zoo.ufl.edu}, and Jim Lemon}
+\author{Emmanuel Paradis, Ben Bolker \email{bolker@zoo.ufl.edu}, and Jim
+ Lemon}
\seealso{
\code{\link{plot.phylo}}, \code{\link{edges}}
}
\emph{Systematic Biology}, \bold{52}, 696--704.
\url{http://www.atgc-montpellier.fr/phyml/}
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{read.tree}}, \code{\link{write.tree}},
\code{\link{dist.dna}}
Felsenstein, J. (1985) Phylogenies and the comparative method.
\emph{American Naturalist}, \bold{125}, 1--15.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{read.tree}}, \code{\link{compar.gee}}, \code{\link{compar.lynch}}
}
the points. To keep black lines, it is better to leave \code{pch}
between 21 and 25.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{correlogram.formula}}, \code{\link{Moran.I}}
}
\item{Ntip}{}
\item{Nnode}{}
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{read.tree}}, \code{\link{add.scale.bar}},
\code{\link{axisPhylo}}, \code{\link{nodelabels}},
An object of class \code{"phylo"} (\code{[[}, \code{$}) or of class
\code{"multiPhylo"} (\code{[}), or NULL.
}
-\author{Ben Bolker \email{bolker@zoo.ufl.edu} and Emmanuel Paradis
- \email{Emmanuel.Paradis@mpl.ird.fr}}
+\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{read.dna}}, \code{\link{write.dna}},
\code{\link{dist.dna}}, \code{\link{DNAbin}}
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\examples{
### This won't work if your computer is not connected
### to the Internet!!!
\code{\link{read.GenBank}}, \code{\link{write.dna}},
\code{\link{DNAbin}}, \code{\link{dist.dna}}, \code{\link{woodmouse}}
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\examples{
### a small extract from `data(woddmouse)'
cat("3 40",
extensible file format for systematic information. \emph{Systematic
Biology}, \bold{46}, 590--621.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{read.tree}}, \code{\link{write.nexus}},
\code{\link{write.tree}}, \code{\link{read.nexus.data}},
in R. \url{http://ape.mpl.ird.fr/misc/FormatTreeR_28July2008.pdf}
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr} and Daniel
- Lawson \email{dan.lawson@bristol.ac.uk}}
+\author{Emmanuel Paradis and Daniel Lawson \email{dan.lawson@bristol.ac.uk}}
\seealso{
\code{\link{write.tree}}, \code{\link{read.nexus}},
\code{\link{write.nexus}}, \code{\link[base]{scan}} for the basic R
\value{
an object of class \code{"phylo"}.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{read.tree}} to read tree files in Newick format,
\code{\link[stats]{reorder}} for the generic function
an object of class \code{"phylo"} for \code{root} and \code{unroot}; a
single logical value for \code{is.rooted}.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{bind.tree}}, \code{\link{drop.tip}},
\code{\link{nodelabels}}, \code{\link{identify.phylo}}
A numeric (integer) vector giving the indices of the segregating
sites.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\note{
The present version looks for the sites which are ``variable'' in the
data in terms of different \emph{letters}. This may give unexpected
A NULL value in the case of \code{summary}, a single numeric value for
the three other functions.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{read.tree}}, \code{\link[base]{summary}} for the generic R
function
\value{
a square numeric matrix.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{Moran.I}}, \code{\link{correlogram.formula}}
}
\value{
a numeric vector.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{bind.tree}}, \code{\link{drop.tip}}, \code{\link{root}}
}
\value{
None (invisible `NULL').
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\references{
Anonymous. FASTA format description.
\url{http://www.ncbi.nlm.nih.gov/BLAST/fasta.html}
Biology}, \bold{46}, 590--621.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{read.nexus}}, \code{\link{read.tree}},
\code{\link{write.tree}}, \code{\link{read.nexus.data}},
\url{http://evolution.genetics.washington.edu/phylip/newick_doc.html}
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr} and Daniel
- Lawson \email{dan.lawson@bristol.ac.uk}}
+\author{Emmanuel Paradis and Daniel Lawson \email{dan.lawson@bristol.ac.uk}}
\seealso{
\code{\link{read.tree}}, \code{\link{read.nexus}},
\code{\link{write.nexus}}
\item{se}{the standard-error of lambda.}
\item{loglik}{the log-likelihood at its maximum.}
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{branching.times}}, \code{\link{diversi.gof}},
\code{\link{diversi.time}}, \code{\link{ltt.plot}},
Paradis, E. (2005) Statistical analysis of diversification with
species traits. \emph{Evolution}, \bold{59}, 1--12.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{branching.times}}, \code{\link{diversi.gof}},
\code{\link{diversi.time}}, \code{\link{ltt.plot}},
\value{
An object of class "yule" (see \code{\link{yule}}).
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{branching.times}}, \code{\link{ltt.plot}},
\code{\link{birthdeath}}, \code{\link{yule}}, \code{\link{yule.cov}}
subtrees: see \code{\link[grDevices]{rainbow}} for some possibilities
with colours.
}
-\author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
+\author{Emmanuel Paradis}
\seealso{
\code{\link{plot.phylo}}, \code{\link{drop.tip}},
\code{\link[graphics]{layout}}, \code{\link[grDevices]{rainbow}},
-/* dist_dna.c 2010-03-16 */
+/* dist_dna.c 2010-03-29 */
/* Copyright 2005-2010 Emmanuel Paradis
for (i2 = i1 + 1; i2 <= *n; i2++) {
for (k = 0; k < 16; k++) Ntab[k] = 0;
for (s1 = i1 - 1, s2 = i2 - 1; s1 < i1 + *n*(*s - 1); s1+= *n, s2 += *n) {
-#define PREPARE_BF_F84\
- A = (BF[0]*BF[2])/(BF[0] + BF[2]) + (BF[1]*BF[3])/(BF[1] + BF[3]);\
- B = BF[0]*BF[2] + BF[1]*BF[3];\
- C = (BF[0] + BF[2])*(BF[1] + BF[3]);
-
-#define COMPUTE_DIST_F84\
- P = ((double) Ns/L);\
- Q = ((double) (Nd - Ns)/L);\
- d[target] = -2*A*log(1 - P/(2*A) - (A - B)*Q/(2*A*C)) + 2*(A - B - C)*log(1 - Q/(2*C));\
- if (*variance) {\
- t1 = A*C;\
- t2 = C*P/2;\
- t3 = (A - B)*Q/2;\
- a = t1/(t1 - t2 - t3);\
- b = A*(A - B)/(t1 - t2 - t3) - (A - B - C)/(C - Q/2);\
- var[target] = (a*a*P + b*b*Q - pow(a*P + b*Q, 2))/2;\
- }
-
-void distDNA_F84(unsigned char *x, int *n, int *s, double *d,
- double *BF, int *variance, double *var)
-{
- int i1, i2, Nd, Ns, L, target, s1, s2;
- double P, Q, A, B, C, a, b, t1, t2, t3;
-
- PREPARE_BF_F84
- L = *s;
-
- target = 0;
- for (i1 = 1; i1 < *n; i1++) {
- for (i2 = i1 + 1; i2 <= *n; i2++) {
- Nd = Ns = 0;
- for (s1 = i1 - 1, s2 = i2 - 1; s1 < i1 + *n*(*s - 1); s1+= *n, s2 += *n) {
- COUNT_TS_TV
- }
- COMPUTE_DIST_F84
- target++;
- }
- }
-}
-
-void distDNA_F84_pairdel(unsigned char *x, int *n, int *s, double *d,
- double *BF, int *variance, double *var)
-{
- int i1, i2, Nd, Ns, L, target, s1, s2;
- double P, Q, A, B, C, a, b, t1, t2, t3;
-
- PREPARE_BF_F84
-
- target = 0;
- for (i1 = 1; i1 < *n; i1++) {
- for (i2 = i1 + 1; i2 <= *n; i2++) {
- Nd = Ns = L = 0;
- for (s1 = i1 - 1, s2 = i2 - 1; s1 < i1 + *n*(*s - 1); s1+= *n, s2 += *n) {
- CHECK_PAIRWISE_DELETION
- COUNT_TS_TV
- }
- COMPUTE_DIST_F84
- target++;
- }
- }
-}
DO_CONTINGENCY_NUCLEOTIDES
}