package phylogenetics

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

A representation of classical parametric processes on nucleotides

Example usage of functions

Example 1: Computing a rate matrix

let example_rate_matrix =
  let model = JC69 in
  let rm = rate_matrix model in
  rm (* The computed rate matrix *)

Example 2: Computing the stationary distribution

let example_stationary_distribution =
  let model = K80 2.0 in
  let sd = stationary_distribution model in
  sd (* The computed stationary distribution *)

Example 3: Sampling a mutation model using HKY85

let example_hky85_model =
  let rng = Gsl.Rng.make Gsl.Rng.MT19937 in
  let alpha = 0.5 in
  let model = Random.hky85 rng ~alpha in
  model (* The sampled HKY85 mutation model *)

Example 4: Sampling a mutation model using GTR

let example_gtr_model =
  let rng = Gsl.Rng.make Gsl.Rng.MT19937 in
  let alpha = 1.0 in
  let model = Random.gtr rng ~alpha in
  model (* The sampled GTR mutation model *)
type t =
  1. | JC69
  2. | K80 of float
  3. | HKY85 of {
    1. stationary_distribution : Nucleotide.vector;
    2. transition_rate : float;
    3. transversion_rate : float;
    }
  4. | GTR of {
    1. stationary_distribution : Nucleotide.vector;
    2. exchangeabilities : Nucleotide.matrix;
    }
val rate_matrix : t -> Rate_matrix.Nucleotide.t
val stationary_distribution : t -> Nucleotide.vector
module Random : sig ... end
OCaml

Innovation. Community. Security.