package phylogenetics

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

In this variant implementation, one can specify some uncertainty for a given leaf, by letting leaf_state return true for several states. In that case, it is understood that each state has equal probability. If leaf_state always returns false for a given leaf, it is interpreted as the leaf being unobserved.

val pruning : ('a, 'b, 'c) Tree.t -> nstates:int -> transition_probabilities:('c -> matrix_decomposition) -> leaf_state:('b -> int -> bool) -> root_frequencies:Linear_algebra.vec -> float

pruning t ~nstates ~transition_probabilities ~leaf_state ~root_frequencies returns the probability of observing the states returned by leaf_state at the leaves of t given the CTMC specified by nstates, transition_probabilities and root_frequencies.

val conditional_likelihoods : ('n, 'l, 'b) Tree.t -> nstates:int -> leaf_state:('l -> int -> bool) -> transition_probabilities:('b -> Linear_algebra.mat) -> (shifted_vector, int array, 'b * Linear_algebra.mat) Tree.t
val conditional_simulation : Gsl.Rng.t -> (shifted_vector, int array, 'b * Linear_algebra.mat) Tree.t -> root_frequencies:Linear_algebra.vec -> (int, int, 'b * Linear_algebra.mat) Tree.t
OCaml

Innovation. Community. Security.