Module Cgr.Types


module Types: Cgr_types
Types for sequences, CGR-trees (Digital Search Trees based on CGR) and the type of the common parameter module for computing CGR on segment, square, ...


Nucleotides


type nucleotide = int 
val nuc_a : nucleotide
val nuc_c : nucleotide
val nuc_t : nucleotide
val nuc_g : nucleotide
val nucleotides : nucleotide list Pervasives.ref
val char_of_nucleotide : nucleotide -> char
val string_of_nucleotide : nucleotide -> string

Sequences


type sequence = nucleotide array 
type big_sequence = (nucleotide, Bigarray.int8_unsigned_elt, Bigarray.c_layout)
Bigarray.Array1.t

type sequence_source =
| Seq of sequence
| File of string
type probs = float array 
[| p(A) ; p(C) ; p(G) ; p(T) |]
type markov_probs = float array array 
[| [| p(AA) ; p(AC) ; p(AG) ; p(AT) |] ; [| p(CA) ; p(CC) ; p(CG) ; p(CT) |] ; [| p(GA) ; p(GC) ; p(GG) ; p(GT) |] ; [| p(TA) ; p(TC) ; p(TG) ; p(TT) |] ; |]

Trees



type tree = {
   label : int;
   children : tree option array; (*one cell for each nucleotide*)
}
type tree_stats = {
   tree_nodes : int; (*number of nodes in the tree, i.e. the length of the souce sequence*)
   tree_height : int; (*height of the tree, i.e. the number of levels.*)
   tree_level_filling : (int * float) array array; (*number of nodes and filling percentage of each level. First level is 0. For each level a.(0) contains number of nodes and pecentage for all nucleotides, and a.(1-4) contains number of nodes and percentage for one nucleotide.*)
   tree_mean : float;
   tree_deviation : float;
   tree_variance : float;
   tree_longest_branches : sequence list;
   tree_shortest_branches : sequence list;
   tree_x_branches_lengths : int array; (*length of AAA... branch, CCC... branch, ...*)
   tree_last_insertion_level : int;
}

Parameter for the Cenac method



type method_kind =
| Segment
| Square
| Tetra
| Binary

type cgr_next_method =
| Cgr_next
| Cgr_next_given_weight of probs
| Cgr_next_adaptative_weight
Type of method to compute the coordinates of the next point in the Cenac_param.next function.
val cgr_next_methods : (string * cgr_next_method) list
Available cgr_next_methods and their abbreviation.
module type Cenac_param = sig .. end

Species



type species = {
   spec_name : string;
   spec_abbr : string;
}