package phylogenetics

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

Module Phylogenetics.Iupac_nucleotideSource

Nucleotide IUPAC symbol

IUPAC symbols are characters that can be used to represent a subset of nucleotides, for instance when the nucleotide at a given position is not precisely known. A IUPAC symbol is said ambiguous if it corresponds to a set of size at least 2.

Valid IUPAC symbols for nucleotides can be found here.

include Alphabet.S_int
include Alphabet.S with type t = private int and type vector = private Linear_algebra.vec and type matrix = private Linear_algebra.mat and type 'a table = private 'a array
Sourcetype t = private int
Sourcetype vector = private Linear_algebra.vec
Sourcetype matrix = private Linear_algebra.mat
Sourcetype 'a table = private 'a array
Sourceval equal : t -> t -> bool
Sourceval compare : t -> t -> int
Sourceval all : t list
Sourceval card : int
Sourceval to_int : t -> int
Sourceval counts : t Core.Sequence.t -> int table
Sourcemodule Table : sig ... end
Sourcemodule Vector : sig ... end
Sourceval flat_profile : unit -> vector
Sourceval random_profile : Gsl.Rng.t -> float -> vector
Sourcemodule Matrix : sig ... end
Sourceval (.%()) : vector -> t -> float
Sourceval (.%()<-) : vector -> t -> float -> unit
Sourceval (.%{}) : matrix -> (t * t) -> float
Sourceval (.%{}<-) : matrix -> (t * t) -> float -> unit
Sourceval of_int : int -> t option
Sourceval of_int_exn : int -> t
Sourceval of_char : char -> t option

of_char c returns the IUPAC symbol corresponding to the given character c. It returns None if the character is not a valid IUPAC nucleotide symbol.

Example:

  let symbol = Iupac_nucleotide.of_char 'A' in
  (* symbol = Some 0 *)
Sourceval is_ambiguous : t -> bool

is_ambiguous sym checks if the given IUPAC symbol sym represents an ambiguous nucleotide. It returns true if the symbol is ambiguous, and false otherwise.

Example:

  let ambiguous = Iupac_nucleotide.is_ambiguous 4 in
  (* ambiguous = true *)