Commit 3351182b authored by Carine Rey's avatar Carine Rey
Browse files

add new hypo (work in progress)

parent 4bbbe597
......@@ -22,6 +22,10 @@ type t =
| HaPC_NeG5_NeC_1
| H0_NeG1_NeC_5
| H0_NeG5_NeC_1
| HaPC_NeG2_NeC_4
| HaPC_NeG4_NeC_2
| H0_NeG2_NeC_4
| H0_NeG4_NeC_2
let string_of_model m = match m with
| H0_NeG1 -> "H0_NeG1"
......@@ -43,6 +47,10 @@ let string_of_model m = match m with
| HaPC_NeG5_NeC_1 -> "HaPC_NeG5_NeC_1"
| H0_NeG1_NeC_5 -> "H0_NeG1_NeC_5"
| H0_NeG5_NeC_1 -> "H0_NeG5_NeC_1"
| HaPC_NeG2_NeC_4 -> "HaPC_NeG2_NeC_4"
| HaPC_NeG4_NeC_2 -> "HaPC_NeG4_NeC_2"
| H0_NeG2_NeC_4 -> "H0_NeG2_NeC_4"
| H0_NeG4_NeC_2 -> "H0_NeG4_NeC_2"
let assign k v =
seq ~sep:"=" [ string k ; v ]
......@@ -117,5 +125,9 @@ let bpp_config_F nodes hyp = [
| 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_NeG2_NeC_4 -> bpp_config_HaPC_F_Ne
| HaPC_NeG4_NeC_2 -> bpp_config_HaPC_F_Ne
| H0_NeG2_NeC_4 -> bpp_config_H0_F_Ne
| H0_NeG4_NeC_2 -> bpp_config_H0_F_Ne
;
]
......@@ -68,6 +68,7 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
| H0_NeG3 -> 3.
| H0_NeG4 -> 4.
| H0_NeG5 -> 5.
| HaPCOC -> 1.
| HaPC_NeG1-> 1.
| HaPC_NeG2-> 2.
| HaPC_NeG3-> 3.
......@@ -81,7 +82,10 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
| HaPC_NeG5_NeC_1 -> 5.
| H0_NeG1_NeC_5 -> 1.
| H0_NeG5_NeC_1 -> 5.
| _ -> 1.
| HaPC_NeG2_NeC_4 -> 2.
| HaPC_NeG4_NeC_2 -> 4.
| H0_NeG2_NeC_4 -> 2.
| H0_NeG4_NeC_2 -> 4.
in
let ne_c = match model with
| H0_NeG1 -> ne_g
......@@ -89,6 +93,7 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
| H0_NeG3 -> ne_g
| H0_NeG4 -> ne_g
| H0_NeG5 -> ne_g
| HaPCOC -> ne_g
| HaPC_NeG1-> ne_g
| HaPC_NeG2-> ne_g
| HaPC_NeG3-> ne_g
......@@ -102,7 +107,10 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
| HaPC_NeG5_NeC_1 -> 1.
| H0_NeG1_NeC_5 -> 5.
| H0_NeG5_NeC_1 -> 1.
| _ -> ne_g
| HaPC_NeG2_NeC_4 -> 4.
| HaPC_NeG4_NeC_2 -> 2.
| H0_NeG2_NeC_4 -> 4.
| H0_NeG4_NeC_2 -> 2.
in
let ne_a = match model with
| H0_NeG1 -> ne_g
......@@ -110,6 +118,7 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
| H0_NeG3 -> ne_g
| H0_NeG4 -> ne_g
| H0_NeG5 -> ne_g
| HaPCOC -> ne_g
| HaPC_NeG1-> ne_g
| HaPC_NeG2-> ne_g
| HaPC_NeG3-> ne_g
......@@ -123,7 +132,10 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
| HaPC_NeG5_NeC_1 -> ne_g
| H0_NeG1_NeC_5 -> ne_g
| H0_NeG5_NeC_1 -> ne_g
| _ -> ne_g
| HaPC_NeG2_NeC_4 -> ne_g
| HaPC_NeG4_NeC_2 -> ne_g
| H0_NeG2_NeC_4 -> ne_g
| H0_NeG4_NeC_2 -> ne_g
in
let profile_f = profile.profile_f in
let profile_c = profile.profile_c in
......@@ -163,6 +175,8 @@ let derive_from_tree ~tree_dir ~tree ~profile ~preview ~use_concat ~ns ~no_Ne ~n
H0_NeG4 ;
HaPC_NeG3;
HaPC_NeG4;
H0_NeG2;
HaPC_NeG2;
]
;
(if no_Ne then
......@@ -176,6 +190,10 @@ let derive_from_tree ~tree_dir ~tree ~profile ~preview ~use_concat ~ns ~no_Ne ~n
HaPC_NeG5_NeC_1 ;
H0_NeG1_NeC_5 ;
H0_NeG5_NeC_1 ;
HaPC_NeG2_NeC_4 ;
HaPC_NeG4_NeC_2 ;
H0_NeG2_NeC_4 ;
H0_NeG4_NeC_2 ;
]
);
(if ne_test then
......
......@@ -17,6 +17,7 @@ type t_choices = {
t_choices_plot: text_file workflow ;
t_choices_condensed_plot: text_file workflow ;
t_choices_condensed_plot_png: text_file workflow ;
auc_tsv: text_file workflow ;
rp_plot: text_file workflow ;
tree_prefix: string;
}
......@@ -74,6 +75,10 @@ let make_t_choices ?(tree_prefix="") ~haPCOC_mr
~haPC_NeG1_NeC_5_mr
~h0_NeG1_NeC_5_mr
~h0_NeG5_NeC_1_mr
~haPC_NeG4_NeC_2_mr
~haPC_NeG2_NeC_4_mr
~h0_NeG2_NeC_4_mr
~h0_NeG4_NeC_2_mr
~haPC_NeG5_indel_mr () : post_analyses_dir directory workflow =
let env = Env.env_r in
......@@ -93,6 +98,10 @@ let make_t_choices ?(tree_prefix="") ~haPCOC_mr
("--HaPC_NeG5_NeC_x2_res" , haPC_NeG5_NeC_x2_mr );
("--H0_NeG5_NeC_div2_res" , h0_NeG5_NeC_div2_mr );
("--H0_NeG5_NeC_x2_res" , h0_NeG5_NeC_x2_mr );
("--HaPC_NeG4_NeC_2_res" , haPC_NeG4_NeC_2_mr );
("--H0_NeG4_NeC_2_res" , h0_NeG4_NeC_2_mr );
("--HaPC_NeG2_NeC_4_res" , haPC_NeG2_NeC_4_mr );
("--H0_NeG2_NeC_4_res" , h0_NeG2_NeC_4_mr );
("--HaPC_NeG5_NeC_1_res" , haPC_NeG5_NeC_1_mr );
("--H0_NeG5_NeC_1_res" , h0_NeG5_NeC_1_mr );
("--HaPC_NeG1_NeC_5_res" , haPC_NeG1_NeC_5_mr );
......@@ -201,6 +210,11 @@ type res_all_hyp = {
h0_NeG5_NeC_div2_res : dataset_res option ;
h0_NeG5_NeC_x2_res : dataset_res option ;
haPC_NeG4_NeC_2_res : dataset_res option ;
haPC_NeG2_NeC_4_res : dataset_res option ;
h0_NeG4_NeC_2_res : dataset_res option ;
h0_NeG2_NeC_4_res : dataset_res option ;
haPC_NeG5_NeC_1_res : dataset_res option ;
haPC_NeG1_NeC_5_res : dataset_res option ;
h0_NeG5_NeC_1_res : dataset_res option ;
......@@ -221,6 +235,10 @@ let make_t_choices_per_couple ~tree_prefix {ha_PCOC_res;
haPC_NeG5_NeC_x2_res ;
h0_NeG5_NeC_div2_res ;
h0_NeG5_NeC_x2_res ;
haPC_NeG4_NeC_2_res;
haPC_NeG2_NeC_4_res ;
h0_NeG4_NeC_2_res ;
h0_NeG2_NeC_4_res ;
haPC_NeG5_NeC_1_res;
haPC_NeG1_NeC_5_res ;
h0_NeG5_NeC_1_res ;
......@@ -247,6 +265,11 @@ let make_t_choices_per_couple ~tree_prefix {ha_PCOC_res;
let h0_NeG5_NeC_div2_mr = get_merged_results_opt h0_NeG5_NeC_div2_res in
let h0_NeG5_NeC_x2_mr = get_merged_results_opt h0_NeG5_NeC_x2_res in
let haPC_NeG4_NeC_2_mr = get_merged_results_opt haPC_NeG4_NeC_2_res in
let haPC_NeG2_NeC_4_mr = get_merged_results_opt haPC_NeG2_NeC_4_res in
let h0_NeG2_NeC_4_mr = get_merged_results_opt h0_NeG2_NeC_4_res in
let h0_NeG4_NeC_2_mr = get_merged_results_opt h0_NeG4_NeC_2_res in
let haPC_NeG5_NeC_1_mr = get_merged_results_opt haPC_NeG5_NeC_1_res in
let haPC_NeG1_NeC_5_mr = get_merged_results_opt haPC_NeG1_NeC_5_res in
let h0_NeG1_NeC_5_mr = get_merged_results_opt h0_NeG1_NeC_5_res in
......@@ -272,6 +295,10 @@ let make_t_choices_per_couple ~tree_prefix {ha_PCOC_res;
~h0_NeG5_NeC_x2_mr
~h0_NeG5_indel_mr
~haPC_NeG5_indel_mr
~haPC_NeG4_NeC_2_mr
~haPC_NeG2_NeC_4_mr
~h0_NeG2_NeC_4_mr
~h0_NeG4_NeC_2_mr
~haPC_NeG5_NeC_1_mr
~haPC_NeG1_NeC_5_mr
~h0_NeG1_NeC_5_mr
......@@ -299,6 +326,11 @@ let get_t_choices ~tree_prefix ~(dataset_results_l: dataset_res list) : t_choice
let h0_NeG5_NeC_div2_res = List.find dataset_results_l (is_hyp ~hyp: "H0_NeG5_NeC_div2" ) in
let h0_NeG5_NeC_x2_res = List.find dataset_results_l (is_hyp ~hyp: "H0_NeG5_NeC_x2" ) in
let haPC_NeG4_NeC_2_res = List.find dataset_results_l (is_hyp ~hyp: "HaPC_NeG4_NeC_2" ) in
let haPC_NeG2_NeC_4_res = List.find dataset_results_l (is_hyp ~hyp: "HaPC_NeG2_NeC_4" ) in
let h0_NeG4_NeC_2_res = List.find dataset_results_l (is_hyp ~hyp: "H0_NeG4_NeC_2" ) in
let h0_NeG2_NeC_4_res = List.find dataset_results_l (is_hyp ~hyp: "H0_NeG2_NeC_4" ) in
let haPC_NeG5_NeC_1_res = List.find dataset_results_l (is_hyp ~hyp: "HaPC_NeG5_NeC_1" ) in
let haPC_NeG1_NeC_5_res = List.find dataset_results_l (is_hyp ~hyp: "HaPC_NeG1_NeC_5" ) in
let h0_NeG5_NeC_1_res = List.find dataset_results_l (is_hyp ~hyp: "H0_NeG5_NeC_1" ) in
......@@ -314,6 +346,7 @@ let get_t_choices ~tree_prefix ~(dataset_results_l: dataset_res list) : t_choice
h0_NeG1_res; h0_NeG2_res; h0_NeG3_res; h0_NeG4_res; h0_NeG5_res;
haPC_NeG1_res; haPC_NeG2_res;haPC_NeG3_res; haPC_NeG4_res; haPC_NeG5_res;
haPC_NeG5_NeC_div2_res; haPC_NeG5_NeC_x2_res; h0_NeG5_NeC_div2_res; h0_NeG5_NeC_x2_res;
haPC_NeG4_NeC_2_res; haPC_NeG2_NeC_4_res; h0_NeG2_NeC_4_res; h0_NeG4_NeC_2_res;
haPC_NeG5_NeC_1_res; haPC_NeG1_NeC_5_res; h0_NeG1_NeC_5_res; h0_NeG5_NeC_1_res;
h0_NeG5_indel_res;haPC_NeG5_indel_res} in
let t_choices_max = t_choices_dir / selector ["out.max_MCC_per_meth.tsv"] in
......@@ -323,8 +356,9 @@ let get_t_choices ~tree_prefix ~(dataset_results_l: dataset_res list) : t_choice
let t_choices_condensed_plot = t_choices_dir / selector ["out_condensed.pdf"] in
let t_choices_condensed_plot_png = t_choices_dir / selector ["out_condensed.png"] in
let rp_plot = t_choices_dir / selector ["out_condensed.recall_precision_ok.pdf"] in
let auc_tsv = t_choices_dir / selector ["out.auc_condensed.tsv"] in
let tree_prefix = ha_PCOC.tree_prefix in
Some {t_choices_max; t_choices_recall09; t_choices_complete ; t_choices_plot; t_choices_condensed_plot;t_choices_condensed_plot_png;rp_plot; tree_prefix}
Some {t_choices_max; t_choices_recall09; t_choices_complete ; t_choices_plot; t_choices_condensed_plot;t_choices_condensed_plot_png;rp_plot; auc_tsv; tree_prefix}
| _ -> None
......@@ -477,6 +511,7 @@ let repo_of_post_analyses_res ~prefix ~post_analyses_res =
item [prefix ^ ".t_choices.condensed.pdf"] w.t_choices_condensed_plot ;
item [prefix ^ ".t_choices.condensed.png"] w.t_choices_condensed_plot_png ;
item [prefix ^ ".recall_precision_ok.pdf"] w.rp_plot ;
item [prefix ^ ".auc_condensed.tsv"] w.auc_tsv ;
]
] |> List.concat
);
......
......@@ -36,6 +36,10 @@ let nodes dataset (model : Convergence_hypothesis.t) =
|HaPC_NeG5_NeC_1 -> [ "tree.Ha.node_ids" ]
|H0_NeG1_NeC_5 -> [ "tree.H0_a.node_ids" ]
|H0_NeG5_NeC_1 -> [ "tree.H0_a.node_ids" ]
|HaPC_NeG2_NeC_4 -> [ "tree.Ha.node_ids" ]
|HaPC_NeG4_NeC_2 -> [ "tree.Ha.node_ids" ]
|H0_NeG2_NeC_4 -> [ "tree.H0_a.node_ids" ]
|H0_NeG4_NeC_2 -> [ "tree.H0_a.node_ids" ]
)
let tree dataset mode =
......
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