package phylogenetics

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

Module Phylogenetics.Phylogenetic_treeSource

Module for phylogenetic trees.

Types
Sourcetype t =
  1. | Node of {
    1. meta : metadata;
    2. left : branch;
    3. right : branch;
    }
  2. | Leaf of {
    1. meta : metadata;
    2. index : Sigs.index;
    }

Type for evolutionary trees: binary trees whose edges are labelled with lengths (floats) and whose leaves are labelled with sequence indexes (strings)

Sourceand branch = float * t
Sourceand metadata = {
  1. id : int;
  2. routing_no : int;
}
Creation/Conversion
Sourceval of_preorder : string -> t
Sourceval of_newick : string -> t
Sourceval of_newick_file : string -> t
Sourceval make_random : int -> t
Sourceval to_newick : t -> string
Sourceval to_newick_file : t -> string -> unit
Sourceval to_dot : t -> string
Sourceval to_tree : t -> (metadata, metadata * string, float) Tree.t
Parameters and transformations
Sourceval nb_branches : t -> int
Sourceval get_branch_lengths : t -> float list
Sourceval set_branch_lengths : t -> float list -> t
Constructors
Sourceval build_leaf : ?routing_no:int -> Sigs.index -> t
Sourceval build_node : ?routing_no:int -> (float * t) -> (float * t) -> t
Sourceval index_of_int : int -> Sigs.index
Sourceval index_of_string : string -> Sigs.index
Getters and setters
Sourceval get_id : t -> int
Sourceval get_meta : t -> metadata
Sourceval set_meta : t -> metadata -> t
Sourceval get_routing_no : t -> int
Sourceval set_routing_no : t -> int -> t
Comparison
Sourceval equal : t -> t -> bool
Pretty printers
Sourceval pp : Format.formatter -> t -> unit
Sourceval pp_fancy : Format.formatter -> t -> unit
Sourceval print : t -> unit
Sourceval print_fancy : t -> unit
OCaml

Innovation. Community. Security.