Commit 06285cb2 authored by Carine Rey's avatar Carine Rey
Browse files

more hypothesis

parent 1ff53ffb
......@@ -26,8 +26,10 @@ type t =
| H0_NeG5_NeC_1
| HaPC_NeG1_NeC_4
| HaPC_NeG4_NeC_1
| H0_NeG1_NeC_4
| H0_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
......@@ -59,8 +61,10 @@ let string_of_model m = match m with
| H0_NeG5_NeC_1 -> "H0_NeG5_NeC_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"
......@@ -145,8 +149,10 @@ let bpp_config_F nodes hyp = [
| 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
......
......@@ -86,8 +86,10 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
| 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.
......@@ -119,8 +121,10 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
| H0_NeG5_NeC_1 -> 1.
| HaPC_NeG1_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.
......@@ -152,8 +156,10 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
| 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
......@@ -193,14 +199,22 @@ let derive_from_tree ~tree_dir ~tree ~profile ~preview ~use_concat ~ns ~no_Ne ~n
[
H0_NeG6;
HaPC_NeG6;
H0_NeG1;
HaPC_NeG1;
H0_NeG2;
HaPC_NeG2;
HaPC_NeG4_NeC_6 ;
HaPC_NeG4_NeC_2 ;
HaPC_NeG2_NeC_4 ;
HaPC_NeG1_NeC_4 ;
HaPC_NeG4_NeC_8 ;
HaPC_NeG4_NeC_1 ;
H0_NeG4_NeC_6 ;
H0_NeG4_NeC_2 ;
H0_NeG2_NeC_4 ;
H0_NeG1_NeC_4 ;
H0_NeG4_NeC_8 ;
H0_NeG4_NeC_1 ;
]
] |> List.concat
in
......
......@@ -86,8 +86,10 @@ let make_t_choices ?(tree_prefix="") ~haPCOC_mr
~h0_NeG5_NeC_1_mr
~haPC_NeG4_NeC_1_mr
~haPC_NeG1_NeC_4_mr
~haPC_NeG4_NeC_8_mr
~h0_NeG1_NeC_4_mr
~h0_NeG4_NeC_1_mr
~h0_NeG4_NeC_8_mr
~haPC_NeG4_NeC_6_mr
~haPC_NeG4_NeC_2_mr
~haPC_NeG2_NeC_4_mr
......@@ -117,6 +119,8 @@ let make_t_choices ?(tree_prefix="") ~haPCOC_mr
("--H0_NeG5_NeC_x2_res" , h0_NeG5_NeC_x2_mr );
("--HaPC_NeG4_NeC_1_res" , haPC_NeG4_NeC_1_mr );
("--H0_NeG4_NeC_1_res" , h0_NeG4_NeC_1_mr );
("--HaPC_NeG4_NeC_8_res" , haPC_NeG4_NeC_8_mr );
("--H0_NeG4_NeC_8_res" , h0_NeG4_NeC_8_mr );
("--HaPC_NeG1_NeC_4_res" , haPC_NeG1_NeC_4_mr );
("--H0_NeG1_NeC_4_res" , h0_NeG1_NeC_4_mr );
("--HaPC_NeG5_NeC_1_res" , haPC_NeG5_NeC_1_mr );
......@@ -238,8 +242,10 @@ type res_all_hyp = {
h0_NeG5_NeC_x2_res : dataset_res option ;
haPC_NeG4_NeC_1_res : dataset_res option ;
haPC_NeG4_NeC_8_res : dataset_res option ;
haPC_NeG1_NeC_4_res : dataset_res option ;
h0_NeG4_NeC_1_res : dataset_res option ;
h0_NeG4_NeC_8_res : dataset_res option ;
h0_NeG1_NeC_4_res : dataset_res option ;
haPC_NeG5_NeC_1_res : dataset_res option ;
......@@ -270,8 +276,10 @@ let make_t_choices_per_couple ~tree_prefix {ha_PCOC_res;
h0_NeG5_NeC_div2_res ;
h0_NeG5_NeC_x2_res ;
haPC_NeG4_NeC_1_res;
haPC_NeG4_NeC_8_res;
haPC_NeG1_NeC_4_res ;
h0_NeG4_NeC_1_res ;
h0_NeG4_NeC_8_res ;
h0_NeG1_NeC_4_res ;
haPC_NeG5_NeC_1_res;
haPC_NeG1_NeC_5_res ;
......@@ -308,9 +316,11 @@ let make_t_choices_per_couple ~tree_prefix {ha_PCOC_res;
let h0_NeG5_NeC_x2_mr = get_merged_results_opt h0_NeG5_NeC_x2_res in
let haPC_NeG4_NeC_1_mr = get_merged_results_opt haPC_NeG4_NeC_1_res in
let haPC_NeG4_NeC_8_mr = get_merged_results_opt haPC_NeG4_NeC_8_res in
let haPC_NeG1_NeC_4_mr = get_merged_results_opt haPC_NeG1_NeC_4_res in
let h0_NeG1_NeC_4_mr = get_merged_results_opt h0_NeG1_NeC_4_res in
let h0_NeG4_NeC_1_mr = get_merged_results_opt h0_NeG4_NeC_1_res in
let h0_NeG4_NeC_8_mr = get_merged_results_opt h0_NeG4_NeC_8_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
......@@ -347,8 +357,10 @@ let make_t_choices_per_couple ~tree_prefix {ha_PCOC_res;
~h0_NeG5_indel_mr
~haPC_NeG5_indel_mr
~haPC_NeG4_NeC_1_mr
~haPC_NeG4_NeC_8_mr
~haPC_NeG1_NeC_4_mr
~h0_NeG1_NeC_4_mr
~h0_NeG4_NeC_8_mr
~h0_NeG4_NeC_1_mr
~haPC_NeG5_NeC_1_mr
~haPC_NeG1_NeC_5_mr
......@@ -386,8 +398,10 @@ let get_t_choices ~tree_prefix ~(dataset_results_l: dataset_res list) : t_choice
let h0_NeG5_NeC_x2_res = List.find dataset_results_l (is_hyp ~hyp: "H0_NeG5_NeC_x2" ) in
let haPC_NeG4_NeC_1_res = List.find dataset_results_l (is_hyp ~hyp: "HaPC_NeG4_NeC_1" ) in
let haPC_NeG4_NeC_8_res = List.find dataset_results_l (is_hyp ~hyp: "HaPC_NeG4_NeC_8" ) in
let haPC_NeG1_NeC_4_res = List.find dataset_results_l (is_hyp ~hyp: "HaPC_NeG1_NeC_4" ) in
let h0_NeG4_NeC_1_res = List.find dataset_results_l (is_hyp ~hyp: "H0_NeG4_NeC_1" ) in
let h0_NeG4_NeC_8_res = List.find dataset_results_l (is_hyp ~hyp: "H0_NeG4_NeC_8" ) in
let h0_NeG1_NeC_4_res = List.find dataset_results_l (is_hyp ~hyp: "H0_NeG1_NeC_4" ) in
let haPC_NeG5_NeC_1_res = List.find dataset_results_l (is_hyp ~hyp: "HaPC_NeG5_NeC_1" ) in
......@@ -412,7 +426,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; h0_NeG6_res;
haPC_NeG1_res; haPC_NeG2_res;haPC_NeG3_res; haPC_NeG4_res; haPC_NeG5_res; haPC_NeG6_res;
haPC_NeG5_NeC_div2_res; haPC_NeG5_NeC_x2_res; h0_NeG5_NeC_div2_res; h0_NeG5_NeC_x2_res;
haPC_NeG4_NeC_1_res; haPC_NeG1_NeC_4_res; h0_NeG1_NeC_4_res; h0_NeG4_NeC_1_res;
haPC_NeG4_NeC_1_res; haPC_NeG4_NeC_8_res; haPC_NeG1_NeC_4_res; h0_NeG1_NeC_4_res; h0_NeG4_NeC_1_res; h0_NeG4_NeC_8_res;
haPC_NeG5_NeC_1_res; haPC_NeG1_NeC_5_res; h0_NeG1_NeC_5_res; h0_NeG5_NeC_1_res;
haPC_NeG4_NeC_6_res; haPC_NeG4_NeC_2_res; haPC_NeG2_NeC_4_res; h0_NeG4_NeC_6_res; h0_NeG4_NeC_2_res;h0_NeG2_NeC_4_res;
h0_NeG5_indel_res;haPC_NeG5_indel_res} in
......
......@@ -36,6 +36,8 @@ option_list = list(
make_option(c("--HaPC_NeG4_NeC_1_res" ) , type="character", default=NA, help="merged_results HaPC_NeG4_NeC_1_res" , metavar="character"),
make_option(c("--H0_NeG4_NeC_1_res" ) , type="character", default=NA, help="merged_results H0_NeG4_NeC_1_res" , metavar="character"),
make_option(c("--HaPC_NeG4_NeC_8_res" ) , type="character", default=NA, help="merged_results HaPC_NeG4_NeC_8_res" , metavar="character"),
make_option(c("--H0_NeG4_NeC_8_res" ) , type="character", default=NA, help="merged_results H0_NeG4_NeC_8_res" , metavar="character"),
make_option(c("--HaPC_NeG1_NeC_4_res" ) , type="character", default=NA, help="merged_results HaPC_NeG1_NeC_4_res" , metavar="character"),
make_option(c("--H0_NeG1_NeC_4_res" ) , type="character", default=NA, help="merged_results H0_NeG1_NeC_4_res" , metavar="character"),
......@@ -110,6 +112,8 @@ df_H0_NeG1_NeC_5 = read_hyp(opt$H0_NeG1_NeC_5 )
df_HaPC_NeG4_NeC_1 = read_hyp(opt$HaPC_NeG4_NeC_1)
df_H0_NeG4_NeC_1 = read_hyp(opt$H0_NeG4_NeC_1 )
df_HaPC_NeG4_NeC_8 = read_hyp(opt$HaPC_NeG4_NeC_8)
df_H0_NeG4_NeC_8 = read_hyp(opt$H0_NeG4_NeC_8 )
df_HaPC_NeG1_NeC_4 = read_hyp(opt$HaPC_NeG1_NeC_4 )
df_H0_NeG1_NeC_4 = read_hyp(opt$H0_NeG1_NeC_4 )
......@@ -126,9 +130,6 @@ df_H0_NeG5_indel = read_hyp(opt$H0_NeG5_indel_res )
df_HaPCOC = read_hyp(opt$HaPCOC)
########################################################################
print("prep df_d")
......@@ -164,6 +165,7 @@ df_d_H0HaPC_NeG5_NeC_1 = build_df_dist_couple(df_H0_NeG5_NeC_1, df_HaPC_NeG5_N
df_d_H0HaPC_NeG1_NeC_5 = build_df_dist_couple(df_H0_NeG1_NeC_5, df_HaPC_NeG1_NeC_5, "H0/HaPC NeG1_NeC_5")
df_d_H0HaPC_NeG4_NeC_1 = build_df_dist_couple(df_H0_NeG4_NeC_1, df_HaPC_NeG4_NeC_1, "H0/HaPC NeG4_NeC_1")
df_d_H0HaPC_NeG4_NeC_8 = build_df_dist_couple(df_H0_NeG4_NeC_8, df_HaPC_NeG4_NeC_8, "H0/HaPC NeG4_NeC_8")
df_d_H0HaPC_NeG1_NeC_4 = build_df_dist_couple(df_H0_NeG1_NeC_4, df_HaPC_NeG1_NeC_4, "H0/HaPC NeG1_NeC_4")
df_d_H0HaPC_NeG4_NeC_2 = build_df_dist_couple(df_H0_NeG4_NeC_2, df_HaPC_NeG4_NeC_2, "H0/HaPC NeG4_NeC_2")
......@@ -177,6 +179,7 @@ df_d_H0H0_NeG5NeG5_NeC1 = build_df_dist_couple(df_H0_NeG5, df_H0_NeG5_NeC_1, "
df_d_H0H0_NeG1NeG1_NeC4 = build_df_dist_couple(df_H0_NeG1, df_H0_NeG1_NeC_4, "H0/H0 NeG1/NeG1_NeC_4")
df_d_H0H0_NeG4NeG4_NeC1 = build_df_dist_couple(df_H0_NeG4, df_H0_NeG4_NeC_1, "H0/H0 NeG4/NeG4_NeC_1")
df_d_H0H0_NeG4NeG4_NeC8 = build_df_dist_couple(df_H0_NeG4, df_H0_NeG4_NeC_8, "H0/H0 NeG4/NeG4_NeC_8")
df_d_H0H0_NeG4NeG4_NeC_2 = build_df_dist_couple(df_H0_NeG4, df_H0_NeG4_NeC_2, "H0/H0 NeG4/NeG4_NeC_2")
df_d_H0H0_NeG2NeG2_NeC_4 = build_df_dist_couple(df_H0_NeG2, df_H0_NeG2_NeC_4, "H0/H0 NeG2/NeG2_NeC_4")
......@@ -185,6 +188,7 @@ df_d_H0H0_NeG4NeG4_NeC_6 = build_df_dist_couple(df_H0_NeG4, df_H0_NeG4_NeC_6,
df_d_H0_NeG1_HaPC_NeG1_NeC_4 = build_df_dist_couple(df_H0_NeG1, df_HaPC_NeG1_NeC_4, "H0 NeG1/HaPC NeG1_NeC_4")
df_d_H0_NeG2_HaPC_NeG2_NeC_4 = build_df_dist_couple(df_H0_NeG2, df_HaPC_NeG2_NeC_4, "H0 NeG2/HaPC NeG2_NeC_4")
df_d_H0_NeG4_HaPC_NeG4_NeC_6 = build_df_dist_couple(df_H0_NeG4, df_HaPC_NeG4_NeC_6, "H0 NeG4/HaPC NeG4_NeC_6")
df_d_H0_NeG4_HaPC_NeG4_NeC_8 = build_df_dist_couple(df_H0_NeG4, df_HaPC_NeG4_NeC_8, "H0 NeG4/HaPC NeG4_NeC_8")
df_d = rbind.data.frame(
df_d_H0HaPCOC_NeG1,
......@@ -201,11 +205,13 @@ df_d = rbind.data.frame(
df_d_H0H0_NeG1NeG1_NeC5,
df_d_H0H0_NeG5NeG5_NeC1,
df_d_H0HaPC_NeG4_NeC_1,
df_d_H0HaPC_NeG4_NeC_8,
df_d_H0HaPC_NeG1_NeC_4,
df_d_H0HaPC_NeG4_NeC_2,
df_d_H0HaPC_NeG2_NeC_4,
df_d_H0HaPC_NeG4_NeC_6,
df_d_H0H0_NeG4NeG4_NeC1,
df_d_H0H0_NeG4NeG4_NeC8,
df_d_H0H0_NeG1NeG1_NeC4,
df_d_H0H0_NeG4NeG4_NeC_2,
df_d_H0H0_NeG2NeG2_NeC_4,
......@@ -213,7 +219,8 @@ df_d = rbind.data.frame(
df_d_H0_NeG1_HaPC_NeG1_NeC_4,
df_d_H0_NeG2_HaPC_NeG2_NeC_4,
df_d_H0HaPC_NeG5_indel,
df_d_H0_NeG4_HaPC_NeG4_NeC_6
df_d_H0_NeG4_HaPC_NeG4_NeC_6,
df_d_H0_NeG4_HaPC_NeG4_NeC_8
)
df_d = df_d[order(df_d$methode),]
......@@ -301,6 +308,7 @@ df_H0H0_NeG5NeG5_NeC_1 = build_df_couple(df_H0_NeG5, df_H0_NeG5_NeC_1, "H0/H0
df_H0H0_NeG1NeG1_NeC_5 = build_df_couple(df_H0_NeG1, df_H0_NeG1_NeC_5, "H0/H0 NeG1/NeG1_NeC_5")
df_H0HaPC_NeG4_NeC_1 = build_df_couple(df_H0_NeG4_NeC_1, df_HaPC_NeG4_NeC_1, "H0/HaPC NeG4_NeC_1")
df_H0HaPC_NeG4_NeC_8 = build_df_couple(df_H0_NeG4_NeC_8, df_HaPC_NeG4_NeC_8, "H0/HaPC NeG4_NeC_8")
df_H0HaPC_NeG1_NeC_4 = build_df_couple(df_H0_NeG1_NeC_4, df_HaPC_NeG1_NeC_4, "H0/HaPC NeG1_NeC_4")
df_H0HaPC_NeG4_NeC_2 = build_df_couple(df_H0_NeG4_NeC_2, df_HaPC_NeG4_NeC_2, "H0/HaPC NeG4_NeC_2")
......@@ -309,6 +317,7 @@ df_H0HaPC_NeG4_NeC_6 = build_df_couple(df_H0_NeG4_NeC_6, df_HaPC_NeG4_NeC_6, "
df_H0H0_NeG4NeG4_NeC_1 = build_df_couple(df_H0_NeG4, df_H0_NeG4_NeC_1, "H0/H0 NeG4/NeG4_NeC_1")
df_H0H0_NeG4NeG4_NeC_8 = build_df_couple(df_H0_NeG4, df_H0_NeG4_NeC_8, "H0/H0 NeG4/NeG4_NeC_8")
df_H0H0_NeG1NeG1_NeC_4 = build_df_couple(df_H0_NeG1, df_H0_NeG1_NeC_4, "H0/H0 NeG1/NeG1_NeC_4")
df_H0H0_NeG4NeG4_NeC_2 = build_df_couple(df_H0_NeG4, df_H0_NeG4_NeC_2, "H0/H0 NeG4/NeG4_NeC_2")
......@@ -319,6 +328,7 @@ df_H0H0_NeG4NeG4_NeC_6 = build_df_couple(df_H0_NeG4, df_H0_NeG4_NeC_6, "H0/H0
df_H0_NeG1_HaPC_NeG1_NeC_4 = build_df_couple(df_H0_NeG1, df_HaPC_NeG1_NeC_4, "H0 NeG1/HaPC NeG1_NeC_4")
df_H0_NeG2_HaPC_NeG2_NeC_4 = build_df_couple(df_H0_NeG2, df_HaPC_NeG2_NeC_4, "H0 NeG2/HaPC NeG2_NeC_4")
df_H0_NeG4_HaPC_NeG4_NeC_6 = build_df_couple(df_H0_NeG4, df_HaPC_NeG4_NeC_6, "H0 NeG4/HaPC NeG4_NeC_6")
df_H0_NeG4_HaPC_NeG4_NeC_8 = build_df_couple(df_H0_NeG4, df_HaPC_NeG4_NeC_8, "H0 NeG4/HaPC NeG4_NeC_8")
df_H0HaPC_NeG5_indel = build_df_couple(df_H0_NeG5_indel, df_HaPC_NeG5_indel, "H0/HaPC NeG5_indel")
......@@ -338,6 +348,7 @@ df_l = list(df_H0HaPCOC_NeG1, df_H0HaPC_NeG1, df_H0HaPC_NeG2, df_H0HaPC_NeG3,
df_H0_NeG2_HaPC_NeG2_NeC_4,
df_H0H0_NeG4NeG4_NeC_6,
df_H0_NeG4_HaPC_NeG4_NeC_6,
df_H0HaPC_NeG4_NeC_8, df_H0_NeG4_HaPC_NeG4_NeC_8,df_H0H0_NeG4NeG4_NeC_8,
df_H0HaPC_NeG5_NeC_x2,df_H0HaPC_NeG5_indel)
df_l = df_l[-which(sapply(df_l, is.null))]
......@@ -544,9 +555,25 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
limitsize = FALSE
)
print("plot recall_precision")
if (length(meths) <= 9 & all(c("H0/HaPC NeG2","H0/HaPC NeG4","H0/HaPC NeG6","H0/H0 NeG4/NeG4_NeC_2","H0/H0 NeG4/NeG4_NeC_6","H0/H0 NeG2/NeG2_NeC_4","H0/HaPC NeG4_NeC_2","H0/HaPC NeG4_NeC_6","H0/HaPC NeG2_NeC_4","H0 NeG2/HaPC NeG2_NeC_4","H0 NeG4/HaPC NeG4_NeC_6") %in% df_out$couple)) {
couple_i = c("H0/HaPC NeG2","H0/HaPC NeG4","H0/HaPC NeG6","H0/H0 NeG4/NeG4_NeC_2","H0/H0 NeG4/NeG4_NeC_6","H0/H0 NeG2/NeG2_NeC_4","H0/HaPC NeG4_NeC_2","H0/HaPC NeG4_NeC_6","H0/HaPC NeG2_NeC_4","H0 NeG2/HaPC NeG2_NeC_4","H0 NeG4/HaPC NeG4_NeC_6")
couple_plot1 = c("H0/HaPC NeG1","H0/HaPC NeG2","H0/HaPC NeG4","H0/HaPC NeG6","NULL","NULL2")
couple_plot2 = c("H0/H0 NeG4/NeG4_NeC_2","H0/H0 NeG4/NeG4_NeC_1","H0/H0 NeG4/NeG4_NeC_6","H0/H0 NeG4/NeG4_NeC_8","H0/H0 NeG2/NeG2_NeC_4","H0/H0 NeG1/NeG1_NeC_4")
couple_plot3 = c("H0/HaPC NeG4_NeC_2","H0/HaPC NeG4_NeC_6","H0/HaPC NeG2_NeC_4","H0/HaPC NeG4_NeC_1","H0/HaPC NeG1_NeC_4","H0/HaPC NeG4_NeC_8")
couple_plot4 = c("H0 NeG1/HaPC NeG1_NeC_4","H0 NeG2/HaPC NeG2_NeC_4","H0 NeG4/HaPC NeG4_NeC_6","H0 NeG4/HaPC NeG4_NeC_8","NULL","NULL2")
couple_i = c(couple_plot1,couple_plot2,couple_plot3,couple_plot4)
print(couple_i)
print( grep("H",couple_i))
couple_i = couple_i[grep("H",couple_i)]
print(couple_i)
print(table(df_out$couple))
print(couple_i [!couple_i %in% df_out$couple])
print(all( couple_i %in% df_out$couple))
if (length(meths) <= 9 & all( couple_i %in% df_out$couple)) {
plot = ggplot(subset(df_out, couple %in% couple_i), aes(x=sensitivity, y=precision98_02, col = methode))
plot = plot + theme_bw()
plot = plot + labs(x="Sensitivity (= Recall)", y="Precision (98/2)")
......@@ -587,7 +614,7 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
plot_PR_c = function(couple_l) {
tmp_df = subset(df_out,couple%in%couple_l)
tmp_df$couple = factor( tmp_df$couple, levels=c(levels( tmp_df$couple),"to_be_rm","to_be_rm2"))
tmp_df$couple = factor( tmp_df$couple, levels=c(levels( tmp_df$couple),"to_be_rm","to_be_rm2","to_be_rm3"))
if ("NULL" %in% couple_l) {
tmp_df[dim(tmp_df)[1]+1,] = tmp_df[dim(tmp_df)[1],]
tmp_df$couple[dim(tmp_df)[1]] = "to_be_rm"
......@@ -596,6 +623,10 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
tmp_df[dim(tmp_df)[1]+1,] = tmp_df[dim(tmp_df)[1],]
tmp_df$couple[dim(tmp_df)[1]] = "to_be_rm2"
}
if ("NULL3" %in% couple_l) {
tmp_df[dim(tmp_df)[1]+1,] = tmp_df[dim(tmp_df)[1],]
tmp_df$couple[dim(tmp_df)[1]] = "to_be_rm3"
}
from_m=c("PCOC","Mutinomial_1MinusLRT", "Msd_0.05_1MinusP", "Identical_LG08", "Tdg09_1MinusLRT","Topological_LG08","diffsel_mean")
to_m=c("PCOC","Mutinomial", "msd", "Identical", "TDG09","Topological","diffsel")
tmp_df$methode = mapvalues(tmp_df$methode, from=from_m, to=to_m)
......@@ -627,11 +658,11 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
plot = plot + theme(axis.text.x = element_text(angle = 45, hjust = 1))
plot}
plot = plot_PR_c(c("H0/HaPC NeG2","H0/HaPC NeG4","H0/HaPC NeG6","H0/H0 NeG4/NeG4_NeC_2","H0/H0 NeG4/NeG4_NeC_6","H0/H0 NeG2/NeG2_NeC_4","H0/HaPC NeG4_NeC_2","H0/HaPC NeG4_NeC_6","H0/HaPC NeG2_NeC_4","H0 NeG2/HaPC NeG2_NeC_4","H0 NeG4/HaPC NeG4_NeC_6"))
plot1 = plot_PR_c(c("H0/HaPC NeG2","H0/HaPC NeG4","H0/HaPC NeG6"))
plot2 = plot_PR_c(c("H0/H0 NeG4/NeG4_NeC_2","H0/H0 NeG4/NeG4_NeC_6","H0/H0 NeG2/NeG2_NeC_4"))
plot3 = plot_PR_c(c("H0/HaPC NeG4_NeC_2","H0/HaPC NeG4_NeC_6","H0/HaPC NeG2_NeC_4"))
plot4 = plot_PR_c(c("H0 NeG2/HaPC NeG2_NeC_4","H0 NeG4/HaPC NeG4_NeC_6","NULL2"))
plot = plot_PR_c(couple_i)
plot1 = plot_PR_c(couple_plot1)
plot2 = plot_PR_c(couple_plot2)
plot3 = plot_PR_c(couple_plot3)
plot4 = plot_PR_c(couple_plot4)
legend_PR = get_legend(plot + theme(legend.position="top",
legend.text = element_text(size=10),
......@@ -667,7 +698,7 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
save_plot(paste0(opt$out,suffix,".recall_precision_ok.pdf"),
plot_recall_precision_papier_ok,
ncol = 2.5,
ncol = 4,
nrow = 4,
base_aspect_ratio = 1,
limitsize = FALSE
......@@ -941,16 +972,16 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
nrow=5)
if (is.null(plot_value_JSD)) {
plot_png = plot_grid(plot_recall_precision,plot_max_MCC,
labels = c("A", "B"),
rel_heights = c(1,1),
nrow=2
plot_png = plot_grid(plot_max_MCC,
labels = c("A"),
rel_heights = c(1),
nrow=1
)
} else {
plot_png = plot_grid(plot_recall_precision,plot_max_MCC,plot_value_JSD,plot_value_ED,
labels = c("A", "B","C","D"),
rel_heights = c(0.5,0.5,1,1),
nrow=4
plot_png = plot_grid(plot_max_MCC,plot_value_JSD,plot_value_ED,
labels = c("A", "B","C"),
rel_heights = c(0.5,1,1),
nrow=3
)
}
......@@ -961,10 +992,12 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
base_aspect_ratio = 1,
limitsize = FALSE
)
print("prep png")
save_plot(paste0(opt$out,suffix,".png"),
plot_png,
ncol = 0.4* length(unique(df_out_melt$methode)),
nrow = length(unique(df_out$couple)) * 1.5,
nrow = length(unique(df_out$couple)) * 1,
base_aspect_ratio = 1,
limitsize = FALSE
)
......
......@@ -40,8 +40,10 @@ let nodes dataset (model : Convergence_hypothesis.t) =
|H0_NeG5_NeC_1 -> [ "tree.H0_a.node_ids" ]
|HaPC_NeG1_NeC_4 -> [ "tree.Ha.node_ids" ]
|HaPC_NeG4_NeC_1 -> [ "tree.Ha.node_ids" ]
|HaPC_NeG4_NeC_8 -> [ "tree.Ha.node_ids" ]
|H0_NeG1_NeC_4 -> [ "tree.H0_a.node_ids" ]
|H0_NeG4_NeC_1 -> [ "tree.H0_a.node_ids" ]
|H0_NeG4_NeC_8 -> [ "tree.H0_a.node_ids" ]
|HaPC_NeG4_NeC_6 -> [ "tree.Ha.node_ids" ]
|HaPC_NeG4_NeC_2 -> [ "tree.Ha.node_ids" ]
|HaPC_NeG2_NeC_4 -> [ "tree.Ha.node_ids" ]
......
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