simulation_pipeline.mli 2.2 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 ->
Philippe Veber's avatar
Philippe Veber committed
37
    Codepitk.Mutsel_simulator.Site_independent.simulation workflow
38

39

40
  type benchmark = {
41 42
    n_h0 : int ;
    n_ha : int ;
43 44 45
    method_labels : string list ;
    method_outputs : float option array list ;
    average_precision : (float * (float * float)) list ;
46
    profiles : (float array * float array) array ;
47 48 49
    ancestral_counts : int Phylogenetics.Amino_acid.table array ;
    convergent_counts : int Phylogenetics.Amino_acid.table array ;
  }
50

51

52
  val benchmark : query -> (query -> cpt file) list -> benchmark workflow
53

54
  val rds_of_benchmark : benchmark workflow -> rds file
55

56 57 58 59
  (** stuff for gbgc SBME paper *)
  type gBGC_t =
    | Global of float
    | Convergent of float * float
60

61
  type param_t
62

63
  val explore_params : f:(param_t -> 'a) -> ((float * gBGC_t) * 'a) list
64

65
  val simu_of_param : ?n_h0:int -> param_t -> query
66

67 68
  val filter_results :
    f:('a -> bool) -> (param_t * 'a) list -> (param_t * 'a) list
69

70
  type record_t
71

72
  val record_of_simu : query -> record_t workflow
73

74 75
  val realistic_result : record_t -> bool
end
76

77 78
module Bppseqgen : sig
  type t
79

80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
  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
97

98 99 100 101
  include Detection_pipeline.Query with type t := t

  include Detection_pipeline.S with type query := t

102
  val oracle : t -> cpt file
103

104 105 106
  val alignment_plot : t -> svg file

  val multinomial_benchmark : t -> pdf file
107

108 109 110 111
  val benchmark : ?mode:[ `fast | `full ] -> t -> svg file

  val benchmark2 : t -> pdf file
end