MurrellGroup / MolecularEvolution.jl

A Julia framework for developing phylogenetic models
MIT License
11 stars 4 forks source link

MolecularEvolution.jl

Dev Build Status Coverage

A Julia package for the flexible development of phylogenetic models.

MolecularEvolution.jl is still in an experimental phase, and subject to change without notice.

MolecularEvolution.jl exploits Julia's multiple dispatch, implementing a fully generic suite of likelihood calculations, branchlength optimization, topology optimization, and ancestral inference. Users can define probability distributions over their own data types, and specify the behavior of these under their own model types.

If the behavior you need is not already available in MolecularEvolution.jl:

And then sampling, likelihood calculations, branch-length optimization, ancestral reconstruction, etc should be available for your new data or model.

Design principles

In order of importance, we aim for the following:

Authors:

Ben Murrell and Venkatesh Kumar, with additional contributions by Sanjay Mohan, Alec Pankow, Hassan Sadiq, and Kenta Sato.

Quick example: Likelihood calculations under phylogenetic Brownian motion:

using MolecularEvolution, Plots

#First simulate a tree, using a coalescent process
tree = sim_tree(n=200)
internal_message_init!(tree, GaussianPartition())
#Simulate brownian motion over the tree
bm_model = BrownianMotion(0.0,1.0)
sample_down!(tree, bm_model)
#And plot the log likelihood as a function of the parameter value
ll(x) = log_likelihood!(tree,BrownianMotion(0.0,x))
plot(0.7:0.001:1.6,ll, xlabel = "variance per unit time", ylabel = "log likelihood")
image