convergence_tree.mli 1.08 KB
Newer Older
1 2 3
open Core_kernel
open Phylogenetics

4
type condition = [`Ancestral | `Convergent]
5

6 7 8 9
type branch_info = {
  condition : condition ;
  length : float ;
}
10

11 12 13 14 15 16
module Branch_info : sig
  type t = branch_info
  val length : t -> float
  val condition : t -> condition
end

17
type t = (unit, string, branch_info) Tree.t
18

19 20
val of_newick_tree : Newick.tree -> (t, [> `Msg of string]) result

21 22
val to_newick_tree : t -> Newick.tree

23 24
val from_file : string -> (t, [> `Msg of string]) result

25 26 27
val leaves :
  (_, 'l, branch_info) Tree.t ->
  ('l * condition) list
28

29
val infer_binary_condition_on_branches :
30 31 32 33
  ?gain_relative_cost:float ->
  Newick.tree ->
  convergent_leaves:String.Set.t ->
  Newick.tree
34

35 36
val reset_transitions : Newick.tree -> Newick.tree

37
val remove_nodes_with_single_child : Newick.tree -> Newick.tree
38 39 40 41 42 43

val alignment_counts_map :
  t ->
  Alignment.t ->
  (int Amino_acid.table -> int Amino_acid.table -> 'a) ->
  'a list
44 45 46 47 48 49 50 51

val pair_tree :
  node_info:'n ->
  leaf_info:(int -> condition -> 'l) ->
  branch_length1:float ->
  branch_length2:float ->
  npairs:int ->
  ('n, 'l, branch_info) Phylogenetics.Tree.t