Commit 40136eae authored by LANORE Vincent's avatar LANORE Vincent
Browse files

Working on simplifying the hypothesis management.

parent bb9f7ab1
......@@ -4,73 +4,73 @@ open Bistro.Std
type t =
| H0_NeG1
| H0_NeG1_NeC_4
| H0_NeG1_NeC_5
| H0_NeG2
| H0_NeG2_NeC_4
| H0_NeG3
| H0_NeG4
| H0_NeG4_NeC_1
| H0_NeG4_NeC_2
| H0_NeG4_NeC_6
| H0_NeG4_NeC_8
| H0_NeG5
| H0_NeG6
| H0_NeG5_NeC_1
| H0_NeG5_NeC_div2
| H0_NeG5_NeC_x2
| H0_NeG6
| HaPC_NeG1
| HaPC_NeG1_NeC_4
| HaPC_NeG1_NeC_5
| HaPC_NeG2
| HaPC_NeG2_NeC_4
| HaPC_NeG3
| HaPC_NeG4
| HaPC_NeG4_NeC_1
| HaPC_NeG4_NeC_2
| HaPC_NeG4_NeC_6
| HaPC_NeG4_NeC_8
| HaPC_NeG5
| HaPC_NeG6
| HaPCOC
| HaPC_NeG5_NeC_1
| HaPC_NeG5_NeC_div2
| HaPC_NeG5_NeC_x2
| HaPC_NeG1_NeC_5
| HaPC_NeG5_NeC_1
| H0_NeG1_NeC_5
| H0_NeG5_NeC_1
| HaPC_NeG1_NeC_4
| HaPC_NeG4_NeC_1
| HaPC_NeG4_NeC_8
| H0_NeG1_NeC_4
| H0_NeG4_NeC_1
| H0_NeG4_NeC_8
| HaPC_NeG4_NeC_6
| HaPC_NeG4_NeC_2
| HaPC_NeG2_NeC_4
| H0_NeG4_NeC_6
| H0_NeG4_NeC_2
| H0_NeG2_NeC_4
| HaPC_NeG6
| HaPCOC
let string_of_model m = match m with
| H0_NeG1 -> "H0_NeG1"
| H0_NeG1_NeC_4 -> "H0_NeG1_NeC_4"
| H0_NeG1_NeC_5 -> "H0_NeG1_NeC_5"
| H0_NeG2 -> "H0_NeG2"
| H0_NeG2_NeC_4 -> "H0_NeG2_NeC_4"
| H0_NeG3 -> "H0_NeG3"
| H0_NeG4 -> "H0_NeG4"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eC_1"
| HaPC_NeG1_NeC_4 -> "HaPC_NeG1_NeC_4"
| HaPC_NeG4_NeC_1 -> "HaPC_NeG4_NeC_1"
| HaPC_NeG4_NeC_8 -> "HaPC_NeG4_NeC_8"
| H0_NeG1_NeC_4 -> "H0_NeG1_NeC_4"
| H0_NeG4_NeC_1 -> "H0_NeG4_NeC_1"
| H0_NeG4_NeC_8 -> "H0_NeG4_NeC_8"
| HaPC_NeG4_NeC_6 -> "HaPC_NeG4_NeC_6"
| HaPC_NeG4_NeC_2 -> "HaPC_NeG4_NeC_2"
| HaPC_NeG2_NeC_4 -> "HaPC_NeG2_NeC_4"
| H0_NeG4_NeC_6 -> "H0_NeG4_NeC_6"
| H0_NeG4_NeC_2 -> "H0_NeG4_NeC_2"
| H0_NeG2_NeC_4 -> "H0_NeG2_NeC_4"
| HaPC_NeG6 -> "HaPC_NeG6"
| HaPCOC -> "HaPCOC"
let assign k v =
seq ~sep:"=" [ string k ; v ]
......@@ -126,38 +126,12 @@ let bpp_config_F nodes hyp = [
string bpp_config_base ;
insert nodes ;
match hyp with
| H0_NeG1 -> bpp_config_H0_F_Ne
| H0_NeG2 -> bpp_config_H0_F_Ne
| H0_NeG3 -> bpp_config_H0_F_Ne
| H0_NeG4 -> bpp_config_H0_F_Ne
| H0_NeG5 -> bpp_config_H0_F_Ne
| H0_NeG6 -> bpp_config_H0_F_Ne
| HaPC_NeG1 -> bpp_config_HaPC_F_Ne
| HaPC_NeG2 -> bpp_config_HaPC_F_Ne
| HaPC_NeG3 -> bpp_config_HaPC_F_Ne
| HaPC_NeG4 -> bpp_config_HaPC_F_Ne
| HaPC_NeG5 -> bpp_config_HaPC_F_Ne
| HaPC_NeG6 -> bpp_config_HaPC_F_Ne
| HaPCOC -> bpp_config_HaPCOC_F
| HaPC_NeG5_NeC_div2 -> bpp_config_HaPC_F_Ne
| HaPC_NeG5_NeC_x2 -> bpp_config_HaPC_F_Ne
| H0_NeG5_NeC_div2 -> bpp_config_H0_F_Ne
| H0_NeG5_NeC_x2 -> bpp_config_H0_F_Ne
| HaPC_NeG1_NeC_5 -> bpp_config_HaPC_F_Ne
| HaPC_NeG5_NeC_1 -> bpp_config_HaPC_F_Ne
| H0_NeG1_NeC_5 -> bpp_config_H0_F_Ne
| H0_NeG5_NeC_1 -> bpp_config_H0_F_Ne
| HaPC_NeG1_NeC_4 -> bpp_config_HaPC_F_Ne
| HaPC_NeG4_NeC_1 -> bpp_config_HaPC_F_Ne
| HaPC_NeG4_NeC_8 -> bpp_config_HaPC_F_Ne
| H0_NeG1_NeC_4 -> bpp_config_H0_F_Ne
| H0_NeG4_NeC_1 -> bpp_config_H0_F_Ne
| H0_NeG4_NeC_8 -> bpp_config_H0_F_Ne
| HaPC_NeG4_NeC_2 -> bpp_config_HaPC_F_Ne
| HaPC_NeG4_NeC_6 -> bpp_config_HaPC_F_Ne
| HaPC_NeG2_NeC_4 -> bpp_config_HaPC_F_Ne
| H0_NeG4_NeC_6 -> bpp_config_H0_F_Ne
| H0_NeG4_NeC_2 -> bpp_config_H0_F_Ne
| H0_NeG2_NeC_4 -> bpp_config_H0_F_Ne
| H0_NeG1 | H0_NeG1_NeC_4 | H0_NeG1_NeC_5 | H0_NeG2 | H0_NeG2_NeC_4 | H0_NeG3 | H0_NeG4
| H0_NeG4_NeC_1 | H0_NeG4_NeC_2 | H0_NeG4_NeC_6 | H0_NeG4_NeC_8 | H0_NeG5 | H0_NeG5_NeC_1
| H0_NeG5_NeC_div2 | H0_NeG5_NeC_x2 | H0_NeG6 -> bpp_config_H0_F_Ne
| HaPC_NeG1 | HaPC_NeG1_NeC_4 | HaPC_NeG1_NeC_5 | HaPC_NeG2 | HaPC_NeG2_NeC_4 | HaPC_NeG3
| HaPC_NeG4 | HaPC_NeG4_NeC_1 | HaPC_NeG4_NeC_2 | HaPC_NeG4_NeC_6 | HaPC_NeG4_NeC_8 | HaPC_NeG5
| HaPC_NeG5_NeC_1 | HaPC_NeG5_NeC_div2 | HaPC_NeG5_NeC_x2 | HaPC_NeG6 -> bpp_config_HaPC_F_Ne
| HaPCOC -> bpp_config_HaPCOC_F
;
]
......@@ -63,110 +63,43 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
(* with several profiles or couples of profiles *)
let config_p = Convergence_hypothesis.bpp_config_F nodes model in
let ne_g = match model with
| H0_NeG1 -> 1.
| H0_NeG2 -> 2.
| H0_NeG3 -> 3.
| H0_NeG4 -> 4.
| H0_NeG5 -> 5.
| H0_NeG6 -> 6.
| HaPCOC -> 1.
| HaPC_NeG1-> 1.
| HaPC_NeG2-> 2.
| HaPC_NeG3-> 3.
| HaPC_NeG4-> 4.
| HaPC_NeG5-> 5.
| HaPC_NeG6-> 6.
| HaPC_NeG5_NeC_div2 -> 5.
| HaPC_NeG5_NeC_x2 -> 5.
| H0_NeG5_NeC_div2 -> 5.
| H0_NeG5_NeC_x2 -> 5.
| HaPC_NeG1_NeC_5 -> 1.
| HaPC_NeG5_NeC_1 -> 5.
| H0_NeG1_NeC_5 -> 1.
| H0_NeG5_NeC_1 -> 5.
| HaPC_NeG1_NeC_4 -> 1.
| HaPC_NeG4_NeC_1 -> 4.
| HaPC_NeG4_NeC_8 -> 4.
| H0_NeG1_NeC_4 -> 1.
| H0_NeG4_NeC_1 -> 4.
| H0_NeG4_NeC_8 -> 4.
| HaPC_NeG4_NeC_6 -> 4.
| HaPC_NeG4_NeC_2 -> 4.
| HaPC_NeG2_NeC_4 -> 2.
| H0_NeG4_NeC_6 -> 4.
| H0_NeG4_NeC_2 -> 4.
| H0_NeG2_NeC_4 -> 2.
| H0_NeG1 | H0_NeG1_NeC_4 | H0_NeG1_NeC_5
| HaPC_NeG1_NeC_4 | HaPC_NeG1_NeC_5 | HaPC_NeG1 | HaPCOC -> 1.
| H0_NeG2 | H0_NeG2_NeC_4 | HaPC_NeG2_NeC_4 | HaPC_NeG2 -> 2.
| H0_NeG3 | HaPC_NeG3 -> 3.
| H0_NeG4 | H0_NeG4_NeC_1 | H0_NeG4_NeC_2 | H0_NeG4_NeC_6 | H0_NeG4_NeC_8
| HaPC_NeG4_NeC_1 | HaPC_NeG4_NeC_2 | HaPC_NeG4_NeC_6 | HaPC_NeG4_NeC_8 | HaPC_NeG4 -> 4.
| H0_NeG5 | H0_NeG5_NeC_1 | H0_NeG5_NeC_div2 | H0_NeG5_NeC_x2
| HaPC_NeG5_NeC_1 | HaPC_NeG5_NeC_div2| HaPC_NeG5_NeC_x2 | HaPC_NeG5 -> 5.
| H0_NeG6 | HaPC_NeG6 -> 6.
in
let ne_c = match model with
| H0_NeG1 -> ne_g
| H0_NeG2 -> ne_g
| H0_NeG3 -> ne_g
| H0_NeG4 -> ne_g
| H0_NeG5 -> ne_g
| H0_NeG6 -> ne_g
| HaPCOC -> ne_g
| HaPC_NeG1-> ne_g
| HaPC_NeG2-> ne_g
| HaPC_NeG3-> ne_g
| HaPC_NeG4-> ne_g
| HaPC_NeG5-> ne_g
| HaPC_NeG6-> ne_g
| H0_NeG1 | H0_NeG2 | H0_NeG3 | H0_NeG4
| H0_NeG5 | H0_NeG6 | HaPCOC
| HaPC_NeG1 | HaPC_NeG2 | HaPC_NeG3
| HaPC_NeG4 | HaPC_NeG5 | HaPC_NeG6 -> ne_g
| HaPC_NeG5_NeC_div2 -> ne_g /. 2.
| HaPC_NeG5_NeC_x2 -> ne_g *. 2.
| H0_NeG5_NeC_div2 -> ne_g /. 2.
| H0_NeG5_NeC_x2 -> ne_g *. 2.
| HaPC_NeG1_NeC_5 -> 5.
| HaPC_NeG5_NeC_1 -> 1.
| H0_NeG1_NeC_4 -> 4.
| H0_NeG1_NeC_5 -> 5.
| H0_NeG2_NeC_4 -> 4.
| H0_NeG4_NeC_1 -> 1.
| H0_NeG4_NeC_2 -> 2.
| H0_NeG4_NeC_6 -> 6.
| H0_NeG4_NeC_8 -> 8.
| H0_NeG5_NeC_1 -> 1.
| HaPC_NeG1_NeC_4 -> 4.
| HaPC_NeG1_NeC_5 -> 5.
| HaPC_NeG2_NeC_4 -> 4.
| HaPC_NeG4_NeC_1 -> 1.
| HaPC_NeG4_NeC_8 -> 8.
| H0_NeG1_NeC_4 -> 4.
| H0_NeG4_NeC_1 -> 1.
| H0_NeG4_NeC_8 -> 8.
| HaPC_NeG4_NeC_6 -> 6.
| HaPC_NeG4_NeC_2 -> 2.
| HaPC_NeG2_NeC_4 -> 4.
| H0_NeG4_NeC_6 -> 6.
| H0_NeG4_NeC_2 -> 2.
| H0_NeG2_NeC_4 -> 4.
in
let ne_a = match model with
| H0_NeG1 -> ne_g
| H0_NeG2 -> ne_g
| H0_NeG3 -> ne_g
| H0_NeG4 -> ne_g
| H0_NeG5 -> ne_g
| H0_NeG6 -> ne_g
| HaPCOC -> ne_g
| HaPC_NeG1-> ne_g
| HaPC_NeG2-> ne_g
| HaPC_NeG3-> ne_g
| HaPC_NeG4-> ne_g
| HaPC_NeG5-> ne_g
| HaPC_NeG6-> ne_g
| HaPC_NeG5_NeC_div2 -> ne_g
| HaPC_NeG5_NeC_x2 -> ne_g
| H0_NeG5_NeC_div2 -> ne_g
| H0_NeG5_NeC_x2 -> ne_g
| HaPC_NeG1_NeC_5 -> ne_g
| HaPC_NeG5_NeC_1 -> ne_g
| H0_NeG1_NeC_5 -> ne_g
| H0_NeG5_NeC_1 -> ne_g
| HaPC_NeG1_NeC_4 -> ne_g
| HaPC_NeG4_NeC_1 -> ne_g
| HaPC_NeG4_NeC_8 -> ne_g
| H0_NeG1_NeC_4 -> ne_g
| H0_NeG4_NeC_1 -> ne_g
| H0_NeG4_NeC_8 -> ne_g
| HaPC_NeG4_NeC_6 -> ne_g
| HaPC_NeG4_NeC_2 -> ne_g
| HaPC_NeG2_NeC_4 -> ne_g
| H0_NeG4_NeC_6 -> ne_g
| H0_NeG4_NeC_2 -> ne_g
| H0_NeG2_NeC_4 -> ne_g
| HaPC_NeG4_NeC_6 -> 6.
| HaPC_NeG4_NeC_8 -> 8.
| HaPC_NeG5_NeC_1 -> 1.
in
let ne_a = ne_g in
let profile_f = profile.profile_f in
let profile_c = profile.profile_c in
(*let seed = Random.int Int.max_value in*)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment