simulation_pipeline.mli 2.32 KB
Newer Older
1
open Bistro
Philippe Veber's avatar
Philippe Veber committed
2
open File_formats
3 4

type tree =
Philippe Veber's avatar
Philippe Veber committed
5
  | NHX of nhx file
6
  | Convergence_tree of Codepitk.Convergence_tree.t workflow
7

8 9 10 11
val nhx_of_convergence_tree :
  Codepitk.Convergence_tree.t workflow ->
  nhx file

12 13 14 15 16
val pair_tree :
  branch_length1:float ->
  branch_length2:float ->
  npairs:int -> tree

17
module type S = sig
18
  type query
19

20
  include Detection_pipeline.S with type query := query
21

22
  val alignment_plot : query -> svg file
23 24
end

25 26 27 28
module Mutsel : sig
  include S

  val query :
29 30 31 32 33 34 35 36 37
    ?branch_scale:float ->
    ?ne_s:float * float ->
    ?gBGC:float * float ->
    ?seed:int ->
    tree:tree ->
    profiles:string ->
    n_h0:int ->
    n_ha:int ->
    unit ->
38 39
    query

40
  val simulation :
41
    query ->
Louis Duchemin's avatar
Louis Duchemin committed
42
    Codepitk.Mutsel_simulator.Site_independent.t workflow
43

44

45
  type benchmark = {
46 47
    n_h0 : int ;
    n_ha : int ;
48 49 50
    method_labels : string list ;
    method_outputs : float option array list ;
    average_precision : (float * (float * float)) list ;
51
    profiles : (float array * float array) array ;
52 53 54
    ancestral_counts : int Phylogenetics.Amino_acid.table array ;
    convergent_counts : int Phylogenetics.Amino_acid.table array ;
  }
55

56

57
  val benchmark : query -> (query -> cpt file) list -> benchmark workflow
58

59
  val rds_of_benchmark : benchmark workflow -> rds file
60

61 62 63 64
  (** stuff for gbgc SBME paper *)
  type gBGC_t =
    | Global of float
    | Convergent of float * float
65

66
  type param_t
67

68
  val explore_params : f:(param_t -> 'a) -> ((float * gBGC_t) * 'a) list
69

70
  val simu_of_param : ?n_h0:int -> param_t -> query
71

72 73
  val filter_results :
    f:('a -> bool) -> (param_t * 'a) list -> (param_t * 'a) list
74

75
  type record_t
76

77
  val record_of_simu : query -> record_t workflow
78

79 80
  val realistic_result : record_t -> bool
end
81

82 83
module Bppseqgen : sig
  type t
84

85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
  val bppseqgen_mixed :
    ?ne_s:float ->
    ?seed:int ->
    tree:tree ->
    profiles:string ->
    n_h0:int ->
    n_ha:int ->
    unit ->
    t

  val bppseqgen :
    hyp:Convergence_hypothesis.t ->
    tree:tree ->
    profiles:string ->
    nb_sites:int ->
    seed:int ->
    t
102

103 104 105 106
  include Detection_pipeline.Query with type t := t

  include Detection_pipeline.S with type query := t

107
  val oracle : t -> cpt file
108

109 110 111
  val alignment_plot : t -> svg file

  val multinomial_benchmark : t -> pdf file
112

113 114 115 116
  val benchmark : ?mode:[ `fast | `full ] -> t -> svg file

  val benchmark2 : t -> pdf file
end