README.md

bppr: a helper R package for BPP

Currently the package is useful for

The package can calibrate a BPP A00 analysis to absolute divergence times by using either a fossil calibration on a node age, or a prior on the per-generation rate and generation time. In the latter case a posterior sample of the effective population sizes is obtained.

Bayes factor calculations are useful for species delimitation with very large datasets, in which case the rjMCMC algorithm may be inefficient. Bayes factors with bppr are calculated with the stepping stones algorithm or the Gaussian quadrature (thermodynamic integration) approach of Rannala and Yang (2018). Note that the stepping stones algorithm appears to be much more efficient than the Gaussian quadrature method.

A tutorial for the package can be found here.

Installation

If you have the devtools package installed, you can install bppr by typing in R:

devtools::install_github("dosreislab/bppr")

Example

Calibrating the hominid phylogeny to geological time and plotting it:

data(hominids)
# Calibrate the hominid phylogeny with a uniform fossil calibration of
# between 6.5 to 10 Ma for the human-chimp divergence, and plot the
# calibrated sample
calmsc <- msc2time.t(mcmc=hominids$mcmc, node="7humanchimp", calf=runif,
  min=6.5, max=10)
mcmc2densitree(hominids$tree, calmsc, "t_", thin=0.05, alpha=0.01)
  title(xlab="Divergence time (Ma)")

References

If you use the package to calibrate BPP trees to geological time (i.e if you use the msc2time functions), please cite

Other useful citations:

Other relevant citations are given in the helpfiles of the package.



dosreislab/bppr documentation built on April 10, 2023, 6:12 p.m.