intro to MCCR

advertisement
The CR and MCCR test for rapid diversification in early clade history
This section will introduce you to methods for testing whether rates of diversification
have varied over time. The most common kinds of questions these methods address
include whether a clade has adaptively radiated and whether differences in species
richness between clades are due to significantly different rates of diversification.
We will first explore the constant rates (CR) test of Pybus and Harvey (2000).
1 Reading in a tree
We will use ape ’s read.tree to read in a tree. Start by loading the packages geiger and
ape .
> require(geiger)
> require(ape)
The tree is in a nexus file called "homalops.phy". The methods in this example assume
an ultrametric tree with branch lengths proportional to time. Our first step is to read in a
chronogram using the read.tree function in ape
>snake_tree<-read.tree("homalops.phy")
> plot(ladderize(snake_tree))
The ladderize function, also in ape, orders the branches to produce a ladderized tree.
This is generally a good idea as it standardizes the presentation of the topology across
multiple analyses.
2 Calculating the gamma statistic
The gamma statistic (Pybus and Harvey, 2000) describes the average distance of
weighting times from the midpoint of the tree. Negative gamma values indicate that
almost branching events have occured earlier in the tree and positive gamma values
indicate that splits have tended to occur closer to the tips of the tree.
To calculate gamma, we use the gammaStat function in ape.
> snake_gamma <- gammaStat(snake_tree)
> snake_gamma
[1] -3.241085
3 Using simulation to account for incomplete taxonomic sampling
The negative value for the snake tree suggests that cladogenetic events are
disproportionately distributed towards the root of the tree. This is possibly evidence for
rapid initial diversification in the clade. However, incomplete taxonomic sampling has
been shown to bias the gamma statistic towards negative values (see Pybus and
Harvey 2000 for a discussion). One solution is to create a null distribution for the
gamma statistic on incompletely sampled trees using simulation. To accomplish this we
will use functions in /geiger and ape to
•
•
•
Using a birth-death model, simulate trees of size equal to the known (or estimated)
species richness of the clade.
Prune the simulated trees down to the size of the original by randomly deleting taxa.
Recalculate the gamma statistic.
If the observed gamma statistic falls into the tail of this null distribution we can conclude
that even with incomplete taxonomic sampling, there are more cladogenetic events
early in the history of our tree than expected under a constant rates model. To perform
these simulations, we need to know or estimate the following parameters for the clade:
•
•
•
Birth rate
Total species richness
Sampled species richness
There are approximately 34 species of homalopsid snakes but we have sampled only
21 of them in our tree. The following block of code will calculate and expected
distribution of gamma given this degree of random subsampling, a birth rate of 0.5 and
no extinction (death rate = 0).
>num_simulations<-500
>g1_null<-numeric(num_simulations)
>for(i in 1:num_simulations) {
birthdeath.tree(b=0.5, d=0, taxa.stop=34)->sim_tree
prune.random.taxa(sim_tree, 13)->prune
gammaStat(prune)->g1_null[i]
}
We can use the histogram function in r to plot the null distribution and show where the
empirical observation falls.
>hist(g1_null)
>arrows(snake_gamma, 100, snake_gamma, 0, col="red")
As we can see from the plot, a gamma value as extreme as that observed in our original
data set is unlikely to have arisen by chance under a pure birth model. We can calculate
the estimated p-value from our null distribution using “which”, "sum” and "length"
commands to find the fraction of gamma values in the null distribution that exceed the
observed gamma.
>mccr_pval<-length(which(g1_null>snake_gamma))/length(g1_null)
[1] 0.998
Pybus, O. G., and P. H. Harvey. 2000. Testing macro-evolutionary models using
incomplete molecular phylogenies. Phil. Trans. Roy. Soc. (Lond.) B 267:22672272.
Download