Skip to content

dosreislab/bppr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bppr: a helper R package for BPP

[! WARNING] The bppr package has been deprecated as of Nov 2024. This simply means that the package is no longer mantained or updated. You can still download, install, and use it. All bppr functionally has been migrated to the mcmc3r package (https://github.com/dosreislab/mcmc3r). Please refer to mcmc3r for the latest version of all functions.

Currently the package is useful for

  • Calibrating BPP phylogenies to geological time

  • Calculation of Bayes factors with BPP for model selection

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.

Releases

No releases published

Packages

No packages published