simulation_pipeline.mli 2.33 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
  | Pair_tree of {
7 8 9
      npairs : int;
      branch_length1 : float;
      branch_length2 : float;
10 11
    }

12
module type S = sig
13
  type query
14

15
  include Detection_pipeline.S with type query := query
16

17
  val alignment_plot : query -> svg file
18 19
end

20 21 22 23
module Mutsel : sig
  include S

  val query :
24 25 26 27 28 29 30 31 32
    ?branch_scale:float ->
    ?ne_s:float * float ->
    ?gBGC:float * float ->
    ?seed:int ->
    tree:tree ->
    profiles:string ->
    n_h0:int ->
    n_ha:int ->
    unit ->
33 34
    query

35
  val simulation :
36
    query ->
37 38
    Codepitk.Simulator.Site_independent_mutsel.simulation workflow

39

40 41 42 43 44 45 46 47
  type benchmark = {
    method_labels : string list ;
    method_outputs : float option array list ;
    average_precision : (float * (float * float)) list ;
    site_model : [`Convergent | `Non_convergent] array ;
    ancestral_counts : int Phylogenetics.Amino_acid.table array ;
    convergent_counts : int Phylogenetics.Amino_acid.table array ;
  }
48

49

50 51
  val benchmark_statistics :
    Codepitk.Simulator.Site_independent_mutsel.simulation workflow ->
52
    results:cpt file list ->
53
    binary_file file
54

55
  (* val benchmark : t -> (t -> cpt file) list -> benchmark workflow
56 57
   *
   * val rds_of_benchmark : benchmark workflow -> rds file *)
58

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

64
  type param_t
65

66
  val explore_params : f:(param_t -> 'a) -> ((float * gBGC_t) * 'a) list
67

68
  val simu_of_param : ?n_h0:int -> param_t -> query
69

70 71
  val filter_results :
    f:('a -> bool) -> (param_t * 'a) list -> (param_t * 'a) list
72

73
  type record_t
74

75
  val record_of_simu : query -> record_t workflow
76

77 78
  val realistic_result : record_t -> bool
end
79

80 81
module Bppseqgen : sig
  type t
82

83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
  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
100

101 102 103 104
  include Detection_pipeline.Query with type t := t

  include Detection_pipeline.S with type query := t

105
  val oracle : t -> cpt file
106

107 108 109
  val alignment_plot : t -> svg file

  val multinomial_benchmark : t -> pdf file
110

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

  val benchmark2 : t -> pdf file
end