]> git.donarmstrong.com Git - ape.git/blob - man/speciesTree.Rd
new speciesTree()
[ape.git] / man / speciesTree.Rd
1 \name{speciesTree}
2 \alias{speciesTree}
3 \title{Species Tree Estimation}
4 \description{
5   This function calculates the species tree from a set of gene trees.
6 }
7 \usage{
8 speciesTree(x, FUN = min)
9 }
10 \arguments{
11   \item{x}{a list of trees, e.g., an object of class
12     \code{"multiPhylo"}.}
13   \item{FUN}{a function used to compute the divergence times of each
14     pair of tips.}
15 }
16 \details{
17   For all trees in \code{x}, the divergence time of each pair of tips is
18   calculated: these are then `summarized' with \code{FUN} to build a new
19   distance matrix used to calculate the species tree with a
20   single-linkage hierarchical clustering. The default for \code{FUN}
21   computes the maximum tree (maxtree) of Liu et al. (2010). Using
22   \code{FUN = sum} gives the shallowest divergence tree of Maddison and
23   Knowles (2006).
24 }
25 \value{
26   an object of class \code{"phylo"}.
27 }
28 \references{
29   Liu, L., Yu, L. and Pearl, D. K. (2010) Maximum tree: a consistent
30   estimator of the species tree. \emph{Journal of Mathematical Biology},
31   \bold{60}, 95--106.
32
33   Maddison, W. P. and Knowles, L. L. (2006) Inferring phylogeny despite
34   incomplete lineage sorting. \emph{Systematic Biology}, \bold{55}, 21--30.
35 }
36 \author{Emmanuel Paradis}
37 \examples{
38 ### example in Liu et al. (2010):
39 tr1 <- read.tree(text = "(((B:0.05,C:0.05):0.01,D:0.06):0.04,A:0.1);")
40 tr2 <- read.tree(text = "(((A:0.07,C:0.07):0.02,D:0.09):0.03,B:0.12);")
41 TR <- c(tr1, tr2)
42 TSmax <- speciesTree(TR) # MAXTREE
43 TSsha <- speciesTree(TR, sum) # shallowest divergence
44
45 layout(matrix(1:4, 1))
46 ## playing with 'x.lim' is not so complicated
47 ## but this will be improved someday
48 plot(tr1, "c", d = "u", y.lim = c(-0.07, 0.1), font = 1)
49 axisPhylo(4); title("Gene tree 1")
50 plot(tr2, "c", d = "u", y.lim = c(-0.05, 0.12), font = 1)
51 axisPhylo(4); title("Gene tree 2")
52 plot(TSmax, "c", d = "u", y.lim = c(-0.1, 0.07), font = 1)
53 axisPhylo(4); title("Species tree inferred\nby MAXTREE")
54 plot(TSsha, "c", d = "u", y.lim = c(0, 0.17), font = 1)
55 axisPhylo(4); title("Species tree inferred\nby Shallowest Divergence")
56 }
57 \keyword{models}