Skip to content

Probabilistic Programming: A Powerful New Approach to Statistical Phylogenetics

License

Notifications You must be signed in to change notification settings

phyppl/probabilistic-programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Probabilistic Programming: A Powerful New Approach to Statistical Phylogenetics

Fredrik Ronquist, Jan Kudlicka, Viktor Senderov, Johannes Borgström, Nicolas Lartillot, Daniel Lundén, Lawrence Murray, Thomas B. Schön, David Broman (F.R., J.K., and V.S. contributed equally to this work)

This is the source code repository accompanying the paper.

  • Preprint available at bioRxiv
  • Corresponding author: Fredrik Ronquist, fredrik.ronquist (at) nrm.se

Contents

Directory Description
birch Phylogenetic models in Birch
data Phylogenetic trees used in the analysis
R Auxilliary R package for testing
webppl Phylogenetic models in WebPPL

How to download this repository?

git clone http://github.com/phyppl/probabilistic-programming

Phylogenetic models in Birch

To install and use the models in Birch, please download and install the Birch compiler, library, (optional) examples, and their dependencies. Installation instructions can be found on the getting started with Birch webpage. The phylogenetic models presented in this paper can then be run like regular Birch packages. Follow the Birch README in the birch directory for detailed instructions.

Phylogenetic models in WebPPL

To install and use the models in WebPPL, the following packages have been provided:

  • phywppl main package containing the models (implemented in WebPPL)
  • phyjs dependency package with shared library functions (implemented in JavaScript)
  • rppl (optional) R package used in verification

Installing phylogenetic WebPPL (phywppl)

An npm package phywppl has been provided. To install it:

  1. Download and install Node, if it has not been installed already.
  2. Download and install WebPPL, if it has not been installed already.
  3. Download this repository (see above), if it has not been downloaded already.
  4. Change to the webppl/phywppl package directory:
cd webppl/phywwpl
  1. Install dependency packages phyjs (local) and shelljs:
npm install ../phyjs
npm install shelljs

Now, all WebPPL programs from the paper can be run from the shell with the tools that are found in the repository. Consult the phywppl README for instructions.

Installing optional R package (rppl)

An optional R package rppl is provided, which is needed to generate the verification plots from the WebPPL source tree.

  1. Install R.
  2. From R, type
install.packages(file.choose(), repos = NULL, type = "source")
  1. When R prompts you to select the desired package, indicate the rppl_1.0.0.tar.gz package from the R directory.

Phylogenetic data

The WebPPL and Birch scripts we provide simulate diversification along observed reconstructed trees. We use a new JSON format for phylogenetic trees named PhyJSON. Supported by the resources we provide in the repository, both WebPPL and Birch have mechanisms for reading in phylogenetic trees stored in the PhyJSON format. We also provide a stand-alone tool, nexus2phyjson, which can be used to convert trees in Nexus tree files to PhyJSON format.

For convenience, we provide several built-in phylogenetic trees in the phyjs package for purposes such as testing and verification. They can be used directly, without the need to input them from a PhyJSON file.