package phylogenetics

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

Module Phylogenetics.Nucleotide_processSource

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 *)
Sourcetype 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;
    }
Sourceval rate_matrix : t -> Rate_matrix.Nucleotide.t
Sourceval stationary_distribution : t -> Nucleotide.vector
Sourcemodule Random : sig ... end