Commit 01c7a18a authored by Carine Rey's avatar Carine Rey
Browse files

add new hypo (work still in progress)

parent 3351182b
...@@ -22,10 +22,10 @@ type t = ...@@ -22,10 +22,10 @@ type t =
| 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_NeG1_NeC_4
| HaPC_NeG4_NeC_2 | HaPC_NeG4_NeC_1
| H0_NeG2_NeC_4 | H0_NeG1_NeC_4
| H0_NeG4_NeC_2 | H0_NeG4_NeC_1
let string_of_model m = match m with let string_of_model m = match m with
| H0_NeG1 -> "H0_NeG1" | H0_NeG1 -> "H0_NeG1"
...@@ -47,10 +47,10 @@ let string_of_model m = match m with ...@@ -47,10 +47,10 @@ let string_of_model m = match m with
| HaPC_NeG5_NeC_1 -> "HaPC_NeG5_NeC_1" | HaPC_NeG5_NeC_1 -> "HaPC_NeG5_NeC_1"
| H0_NeG1_NeC_5 -> "H0_NeG1_NeC_5" | H0_NeG1_NeC_5 -> "H0_NeG1_NeC_5"
| H0_NeG5_NeC_1 -> "H0_NeG5_NeC_1" | H0_NeG5_NeC_1 -> "H0_NeG5_NeC_1"
| HaPC_NeG2_NeC_4 -> "HaPC_NeG2_NeC_4" | HaPC_NeG1_NeC_4 -> "HaPC_NeG1_NeC_4"
| HaPC_NeG4_NeC_2 -> "HaPC_NeG4_NeC_2" | HaPC_NeG4_NeC_1 -> "HaPC_NeG4_NeC_1"
| H0_NeG2_NeC_4 -> "H0_NeG2_NeC_4" | H0_NeG1_NeC_4 -> "H0_NeG1_NeC_4"
| H0_NeG4_NeC_2 -> "H0_NeG4_NeC_2" | H0_NeG4_NeC_1 -> "H0_NeG4_NeC_1"
let assign k v = let assign k v =
seq ~sep:"=" [ string k ; v ] seq ~sep:"=" [ string k ; v ]
...@@ -125,9 +125,9 @@ let bpp_config_F nodes hyp = [ ...@@ -125,9 +125,9 @@ let bpp_config_F nodes hyp = [
| HaPC_NeG5_NeC_1 -> bpp_config_HaPC_F_Ne | HaPC_NeG5_NeC_1 -> bpp_config_HaPC_F_Ne
| H0_NeG1_NeC_5 -> bpp_config_H0_F_Ne | H0_NeG1_NeC_5 -> bpp_config_H0_F_Ne
| H0_NeG5_NeC_1 -> bpp_config_H0_F_Ne | H0_NeG5_NeC_1 -> bpp_config_H0_F_Ne
| HaPC_NeG2_NeC_4 -> bpp_config_HaPC_F_Ne | HaPC_NeG1_NeC_4 -> bpp_config_HaPC_F_Ne
| HaPC_NeG4_NeC_2 -> bpp_config_HaPC_F_Ne | HaPC_NeG4_NeC_1 -> bpp_config_HaPC_F_Ne
| H0_NeG2_NeC_4 -> bpp_config_H0_F_Ne | H0_NeG1_NeC_4 -> bpp_config_H0_F_Ne
| H0_NeG4_NeC_2 -> bpp_config_H0_F_Ne | H0_NeG4_NeC_1 -> bpp_config_H0_F_Ne
; ;
] ]
...@@ -82,10 +82,10 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr ...@@ -82,10 +82,10 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
| HaPC_NeG5_NeC_1 -> 5. | HaPC_NeG5_NeC_1 -> 5.
| H0_NeG1_NeC_5 -> 1. | H0_NeG1_NeC_5 -> 1.
| H0_NeG5_NeC_1 -> 5. | H0_NeG5_NeC_1 -> 5.
| HaPC_NeG2_NeC_4 -> 2. | HaPC_NeG1_NeC_4 -> 1.
| HaPC_NeG4_NeC_2 -> 4. | HaPC_NeG4_NeC_1 -> 4.
| H0_NeG2_NeC_4 -> 2. | H0_NeG1_NeC_4 -> 1.
| H0_NeG4_NeC_2 -> 4. | H0_NeG4_NeC_1 -> 4.
in in
let ne_c = match model with let ne_c = match model with
| H0_NeG1 -> ne_g | H0_NeG1 -> ne_g
...@@ -107,10 +107,10 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr ...@@ -107,10 +107,10 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
| HaPC_NeG5_NeC_1 -> 1. | HaPC_NeG5_NeC_1 -> 1.
| H0_NeG1_NeC_5 -> 5. | H0_NeG1_NeC_5 -> 5.
| H0_NeG5_NeC_1 -> 1. | H0_NeG5_NeC_1 -> 1.
| HaPC_NeG2_NeC_4 -> 4. | HaPC_NeG1_NeC_4 -> 4.
| HaPC_NeG4_NeC_2 -> 2. | HaPC_NeG4_NeC_1 -> 1.
| H0_NeG2_NeC_4 -> 4. | H0_NeG1_NeC_4 -> 4.
| H0_NeG4_NeC_2 -> 2. | H0_NeG4_NeC_1 -> 1.
in in
let ne_a = match model with let ne_a = match model with
| H0_NeG1 -> ne_g | H0_NeG1 -> ne_g
...@@ -132,10 +132,10 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr ...@@ -132,10 +132,10 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
| HaPC_NeG5_NeC_1 -> ne_g | HaPC_NeG5_NeC_1 -> ne_g
| H0_NeG1_NeC_5 -> ne_g | H0_NeG1_NeC_5 -> ne_g
| H0_NeG5_NeC_1 -> ne_g | H0_NeG5_NeC_1 -> ne_g
| HaPC_NeG2_NeC_4 -> ne_g | HaPC_NeG1_NeC_4 -> ne_g
| HaPC_NeG4_NeC_2 -> ne_g | HaPC_NeG4_NeC_1 -> ne_g
| H0_NeG2_NeC_4 -> ne_g | H0_NeG1_NeC_4 -> ne_g
| H0_NeG4_NeC_2 -> ne_g | H0_NeG4_NeC_1 -> ne_g
in in
let profile_f = profile.profile_f in let profile_f = profile.profile_f in
let profile_c = profile.profile_c in let profile_c = profile.profile_c in
...@@ -190,10 +190,10 @@ let derive_from_tree ~tree_dir ~tree ~profile ~preview ~use_concat ~ns ~no_Ne ~n ...@@ -190,10 +190,10 @@ let derive_from_tree ~tree_dir ~tree ~profile ~preview ~use_concat ~ns ~no_Ne ~n
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_NeG1_NeC_4 ;
HaPC_NeG4_NeC_2 ; HaPC_NeG4_NeC_1 ;
H0_NeG2_NeC_4 ; H0_NeG1_NeC_4 ;
H0_NeG4_NeC_2 ; H0_NeG4_NeC_1 ;
] ]
); );
(if ne_test then (if ne_test then
......
...@@ -75,10 +75,10 @@ let make_t_choices ?(tree_prefix="") ~haPCOC_mr ...@@ -75,10 +75,10 @@ let make_t_choices ?(tree_prefix="") ~haPCOC_mr
~haPC_NeG1_NeC_5_mr ~haPC_NeG1_NeC_5_mr
~h0_NeG1_NeC_5_mr ~h0_NeG1_NeC_5_mr
~h0_NeG5_NeC_1_mr ~h0_NeG5_NeC_1_mr
~haPC_NeG4_NeC_2_mr ~haPC_NeG4_NeC_1_mr
~haPC_NeG2_NeC_4_mr ~haPC_NeG1_NeC_4_mr
~h0_NeG2_NeC_4_mr ~h0_NeG1_NeC_4_mr
~h0_NeG4_NeC_2_mr ~h0_NeG4_NeC_1_mr
~haPC_NeG5_indel_mr () : post_analyses_dir directory workflow = ~haPC_NeG5_indel_mr () : post_analyses_dir directory workflow =
let env = Env.env_r in let env = Env.env_r in
...@@ -98,10 +98,10 @@ let make_t_choices ?(tree_prefix="") ~haPCOC_mr ...@@ -98,10 +98,10 @@ let make_t_choices ?(tree_prefix="") ~haPCOC_mr
("--HaPC_NeG5_NeC_x2_res" , haPC_NeG5_NeC_x2_mr ); ("--HaPC_NeG5_NeC_x2_res" , haPC_NeG5_NeC_x2_mr );
("--H0_NeG5_NeC_div2_res" , h0_NeG5_NeC_div2_mr ); ("--H0_NeG5_NeC_div2_res" , h0_NeG5_NeC_div2_mr );
("--H0_NeG5_NeC_x2_res" , h0_NeG5_NeC_x2_mr ); ("--H0_NeG5_NeC_x2_res" , h0_NeG5_NeC_x2_mr );
("--HaPC_NeG4_NeC_2_res" , haPC_NeG4_NeC_2_mr ); ("--HaPC_NeG4_NeC_1_res" , haPC_NeG4_NeC_1_mr );
("--H0_NeG4_NeC_2_res" , h0_NeG4_NeC_2_mr ); ("--H0_NeG4_NeC_1_res" , h0_NeG4_NeC_1_mr );
("--HaPC_NeG2_NeC_4_res" , haPC_NeG2_NeC_4_mr ); ("--HaPC_NeG1_NeC_4_res" , haPC_NeG1_NeC_4_mr );
("--H0_NeG2_NeC_4_res" , h0_NeG2_NeC_4_mr ); ("--H0_NeG1_NeC_4_res" , h0_NeG1_NeC_4_mr );
("--HaPC_NeG5_NeC_1_res" , haPC_NeG5_NeC_1_mr ); ("--HaPC_NeG5_NeC_1_res" , haPC_NeG5_NeC_1_mr );
("--H0_NeG5_NeC_1_res" , h0_NeG5_NeC_1_mr ); ("--H0_NeG5_NeC_1_res" , h0_NeG5_NeC_1_mr );
("--HaPC_NeG1_NeC_5_res" , haPC_NeG1_NeC_5_mr ); ("--HaPC_NeG1_NeC_5_res" , haPC_NeG1_NeC_5_mr );
...@@ -210,10 +210,10 @@ type res_all_hyp = { ...@@ -210,10 +210,10 @@ type res_all_hyp = {
h0_NeG5_NeC_div2_res : dataset_res option ; h0_NeG5_NeC_div2_res : dataset_res option ;
h0_NeG5_NeC_x2_res : dataset_res option ; h0_NeG5_NeC_x2_res : dataset_res option ;
haPC_NeG4_NeC_2_res : dataset_res option ; haPC_NeG4_NeC_1_res : dataset_res option ;
haPC_NeG2_NeC_4_res : dataset_res option ; haPC_NeG1_NeC_4_res : dataset_res option ;
h0_NeG4_NeC_2_res : dataset_res option ; h0_NeG4_NeC_1_res : dataset_res option ;
h0_NeG2_NeC_4_res : dataset_res option ; h0_NeG1_NeC_4_res : dataset_res option ;
haPC_NeG5_NeC_1_res : dataset_res option ; haPC_NeG5_NeC_1_res : dataset_res option ;
haPC_NeG1_NeC_5_res : dataset_res option ; haPC_NeG1_NeC_5_res : dataset_res option ;
...@@ -235,10 +235,10 @@ let make_t_choices_per_couple ~tree_prefix {ha_PCOC_res; ...@@ -235,10 +235,10 @@ let make_t_choices_per_couple ~tree_prefix {ha_PCOC_res;
haPC_NeG5_NeC_x2_res ; haPC_NeG5_NeC_x2_res ;
h0_NeG5_NeC_div2_res ; h0_NeG5_NeC_div2_res ;
h0_NeG5_NeC_x2_res ; h0_NeG5_NeC_x2_res ;
haPC_NeG4_NeC_2_res; haPC_NeG4_NeC_1_res;
haPC_NeG2_NeC_4_res ; haPC_NeG1_NeC_4_res ;
h0_NeG4_NeC_2_res ; h0_NeG4_NeC_1_res ;
h0_NeG2_NeC_4_res ; h0_NeG1_NeC_4_res ;
haPC_NeG5_NeC_1_res; haPC_NeG5_NeC_1_res;
haPC_NeG1_NeC_5_res ; haPC_NeG1_NeC_5_res ;
h0_NeG5_NeC_1_res ; h0_NeG5_NeC_1_res ;
...@@ -265,10 +265,10 @@ let make_t_choices_per_couple ~tree_prefix {ha_PCOC_res; ...@@ -265,10 +265,10 @@ 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_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 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_NeG4_NeC_1_mr = get_merged_results_opt haPC_NeG4_NeC_1_res in
let haPC_NeG2_NeC_4_mr = get_merged_results_opt haPC_NeG2_NeC_4_res in let haPC_NeG1_NeC_4_mr = get_merged_results_opt haPC_NeG1_NeC_4_res in
let h0_NeG2_NeC_4_mr = get_merged_results_opt h0_NeG2_NeC_4_res in let h0_NeG1_NeC_4_mr = get_merged_results_opt h0_NeG1_NeC_4_res in
let h0_NeG4_NeC_2_mr = get_merged_results_opt h0_NeG4_NeC_2_res in let h0_NeG4_NeC_1_mr = get_merged_results_opt h0_NeG4_NeC_1_res in
let haPC_NeG5_NeC_1_mr = get_merged_results_opt haPC_NeG5_NeC_1_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 haPC_NeG1_NeC_5_mr = get_merged_results_opt haPC_NeG1_NeC_5_res in
...@@ -295,10 +295,10 @@ let make_t_choices_per_couple ~tree_prefix {ha_PCOC_res; ...@@ -295,10 +295,10 @@ let make_t_choices_per_couple ~tree_prefix {ha_PCOC_res;
~h0_NeG5_NeC_x2_mr ~h0_NeG5_NeC_x2_mr
~h0_NeG5_indel_mr ~h0_NeG5_indel_mr
~haPC_NeG5_indel_mr ~haPC_NeG5_indel_mr
~haPC_NeG4_NeC_2_mr ~haPC_NeG4_NeC_1_mr
~haPC_NeG2_NeC_4_mr ~haPC_NeG1_NeC_4_mr
~h0_NeG2_NeC_4_mr ~h0_NeG1_NeC_4_mr
~h0_NeG4_NeC_2_mr ~h0_NeG4_NeC_1_mr
~haPC_NeG5_NeC_1_mr ~haPC_NeG5_NeC_1_mr
~haPC_NeG1_NeC_5_mr ~haPC_NeG1_NeC_5_mr
~h0_NeG1_NeC_5_mr ~h0_NeG1_NeC_5_mr
...@@ -326,10 +326,10 @@ let get_t_choices ~tree_prefix ~(dataset_results_l: dataset_res list) : t_choice ...@@ -326,10 +326,10 @@ 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_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 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_NeG4_NeC_1_res = List.find dataset_results_l (is_hyp ~hyp: "HaPC_NeG4_NeC_1" ) in
let haPC_NeG2_NeC_4_res = List.find dataset_results_l (is_hyp ~hyp: "HaPC_NeG2_NeC_4" ) in let haPC_NeG1_NeC_4_res = List.find dataset_results_l (is_hyp ~hyp: "HaPC_NeG1_NeC_4" ) in
let h0_NeG4_NeC_2_res = List.find dataset_results_l (is_hyp ~hyp: "H0_NeG4_NeC_2" ) in let h0_NeG4_NeC_1_res = List.find dataset_results_l (is_hyp ~hyp: "H0_NeG4_NeC_1" ) in
let h0_NeG2_NeC_4_res = List.find dataset_results_l (is_hyp ~hyp: "H0_NeG2_NeC_4" ) 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 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 haPC_NeG1_NeC_5_res = List.find dataset_results_l (is_hyp ~hyp: "HaPC_NeG1_NeC_5" ) in
...@@ -346,7 +346,7 @@ let get_t_choices ~tree_prefix ~(dataset_results_l: dataset_res list) : t_choice ...@@ -346,7 +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; 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_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_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_NeG4_NeC_1_res; haPC_NeG1_NeC_4_res; h0_NeG1_NeC_4_res; h0_NeG4_NeC_1_res;
haPC_NeG5_NeC_1_res; haPC_NeG1_NeC_5_res; h0_NeG1_NeC_5_res; h0_NeG5_NeC_1_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 h0_NeG5_indel_res;haPC_NeG5_indel_res} in
let t_choices_max = t_choices_dir / selector ["out.max_MCC_per_meth.tsv"] in let t_choices_max = t_choices_dir / selector ["out.max_MCC_per_meth.tsv"] in
......
...@@ -7,6 +7,7 @@ library("optparse") ...@@ -7,6 +7,7 @@ library("optparse")
library("reshape2") library("reshape2")
library("ggplot2") library("ggplot2")
library("cowplot") library("cowplot")
library("flux")
date = format(Sys.time(), format="%Y-%m-%d %X") date = format(Sys.time(), format="%Y-%m-%d %X")
...@@ -30,6 +31,11 @@ option_list = list( ...@@ -30,6 +31,11 @@ option_list = list(
make_option(c("--HaPC_NeG1_NeC_5_res" ) , type="character", default=NA, help="merged_results HaPC_NeG1_NeC_5_res" , metavar="character"), make_option(c("--HaPC_NeG1_NeC_5_res" ) , type="character", default=NA, help="merged_results HaPC_NeG1_NeC_5_res" , metavar="character"),
make_option(c("--H0_NeG1_NeC_5_res" ) , type="character", default=NA, help="merged_results H0_NeG1_NeC_5_res" , metavar="character"), make_option(c("--H0_NeG1_NeC_5_res" ) , type="character", default=NA, help="merged_results H0_NeG1_NeC_5_res" , metavar="character"),
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_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"),
make_option(c("--H0_NeG5_indel_res" ) , type="character", default=NA, help="merged_results H0_NeG5_indel_res" , metavar="character"), make_option(c("--H0_NeG5_indel_res" ) , type="character", default=NA, help="merged_results H0_NeG5_indel_res" , metavar="character"),
make_option(c("--HaPC_NeG5_indel_res" ) , type="character", default=NA, help="merged_results HaPC_NeG5_indel_res" , metavar="character"), make_option(c("--HaPC_NeG5_indel_res" ) , type="character", default=NA, help="merged_results HaPC_NeG5_indel_res" , metavar="character"),
make_option(c("--HaPCOC" ) , type="character", default=NA, help="merged_results HaPCOC" , metavar="character"), make_option(c("--HaPCOC" ) , type="character", default=NA, help="merged_results HaPCOC" , metavar="character"),
...@@ -95,6 +101,11 @@ df_H0_NeG5_NeC_1 = read_hyp(opt$H0_NeG5_NeC_1 ) ...@@ -95,6 +101,11 @@ df_H0_NeG5_NeC_1 = read_hyp(opt$H0_NeG5_NeC_1 )
df_HaPC_NeG1_NeC_5 = read_hyp(opt$HaPC_NeG1_NeC_5 ) df_HaPC_NeG1_NeC_5 = read_hyp(opt$HaPC_NeG1_NeC_5 )
df_H0_NeG1_NeC_5 = read_hyp(opt$H0_NeG1_NeC_5 ) 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_NeG1_NeC_4 = read_hyp(opt$HaPC_NeG1_NeC_4 )
df_H0_NeG1_NeC_4 = read_hyp(opt$H0_NeG1_NeC_4 )
df_HaPC_NeG5_indel = read_hyp(opt$HaPC_NeG5_indel_res ) df_HaPC_NeG5_indel = read_hyp(opt$HaPC_NeG5_indel_res )
df_H0_NeG5_indel = read_hyp(opt$H0_NeG5_indel_res ) df_H0_NeG5_indel = read_hyp(opt$H0_NeG5_indel_res )
...@@ -137,11 +148,17 @@ df_d_H0HaPC_NeG5_NeC_x2 = build_df_dist_couple(df_H0_NeG5_NeC_x2, df_HaPC_NeG5 ...@@ -137,11 +148,17 @@ df_d_H0HaPC_NeG5_NeC_x2 = build_df_dist_couple(df_H0_NeG5_NeC_x2, df_HaPC_NeG5
df_d_H0HaPC_NeG5_NeC_1 = build_df_dist_couple(df_H0_NeG5_NeC_1, df_HaPC_NeG5_NeC_1, "H0/HaPC NeG5_NeC_1") df_d_H0HaPC_NeG5_NeC_1 = build_df_dist_couple(df_H0_NeG5_NeC_1, df_HaPC_NeG5_NeC_1, "H0/HaPC NeG5_NeC_1")
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_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_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_NeG5_indel = build_df_dist_couple(df_H0_NeG5_indel, df_HaPC_NeG5_indel, "H0/HaPC NeG5_indel") df_d_H0HaPC_NeG5_indel = build_df_dist_couple(df_H0_NeG5_indel, df_HaPC_NeG5_indel, "H0/HaPC NeG5_indel")
df_d_H0H0_NeG1NeG1_NeC5 = build_df_dist_couple(df_H0_NeG1, df_H0_NeG1_NeC_5, "H0/H0 NeG1/NeG1_NeC_5") df_d_H0H0_NeG1NeG1_NeC5 = build_df_dist_couple(df_H0_NeG1, df_H0_NeG1_NeC_5, "H0/H0 NeG1/NeG1_NeC_5")
df_d_H0H0_NeG5NeG5_NeC1 = build_df_dist_couple(df_H0_NeG5, df_H0_NeG5_NeC_1, "H0/H0 NeG5/NeG5_NeC_1") df_d_H0H0_NeG5NeG5_NeC1 = build_df_dist_couple(df_H0_NeG5, df_H0_NeG5_NeC_1, "H0/H0 NeG5/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 = rbind.data.frame( df_d = rbind.data.frame(
df_d_H0HaPCOC_NeG1, df_d_H0HaPCOC_NeG1,
df_d_H0HaPC_NeG1, df_d_H0HaPC_NeG1,
...@@ -155,6 +172,10 @@ df_d = rbind.data.frame( ...@@ -155,6 +172,10 @@ df_d = rbind.data.frame(
df_d_H0HaPC_NeG1_NeC_5, df_d_H0HaPC_NeG1_NeC_5,
df_d_H0H0_NeG1NeG1_NeC5, df_d_H0H0_NeG1NeG1_NeC5,
df_d_H0H0_NeG5NeG5_NeC1, df_d_H0H0_NeG5NeG5_NeC1,
df_d_H0HaPC_NeG4_NeC_1,
df_d_H0HaPC_NeG1_NeC_4,
df_d_H0H0_NeG4NeG4_NeC2,
df_d_H0H0_NeG2NeG2_NeC4,
df_d_H0HaPC_NeG5_indel df_d_H0HaPC_NeG5_indel
) )
...@@ -163,6 +184,8 @@ df_d = df_d[order(df_d$methode),] ...@@ -163,6 +184,8 @@ df_d = df_d[order(df_d$methode),]
print(head(df_d)) print(head(df_d))
print(tail(df_d)) print(tail(df_d))
######################################################################## ########################################################################
print("prep df") print("prep df")
...@@ -239,6 +262,12 @@ df_H0HaPC_NeG1_NeC_5 = build_df_couple(df_H0_NeG1_NeC_5, df_HaPC_NeG1_NeC_5, " ...@@ -239,6 +262,12 @@ df_H0HaPC_NeG1_NeC_5 = build_df_couple(df_H0_NeG1_NeC_5, df_HaPC_NeG1_NeC_5, "
df_H0H0_NeG5NeG5_NeC_1 = build_df_couple(df_H0_NeG5, df_H0_NeG5_NeC_1, "H0/H0 NeG5/NeG5_NeC_1") df_H0H0_NeG5NeG5_NeC_1 = build_df_couple(df_H0_NeG5, df_H0_NeG5_NeC_1, "H0/H0 NeG5/NeG5_NeC_1")
df_H0H0_NeG1NeG1_NeC_5 = build_df_couple(df_H0_NeG1, df_H0_NeG1_NeC_5, "H0/H0 NeG1/NeG1_NeC_5") 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_NeG1_NeC_4 = build_df_couple(df_H0_NeG1_NeC_4, df_HaPC_NeG1_NeC_4, "H0/HaPC NeG1_NeC_4")
df_H0H0_NeG4NeG4_NeC_1 = build_df_couple(df_H0_NeG4, df_H0_NeG4_NeC_1, "H0/H0 NeG4/NeG4_NeC_1")
df_H0H0_NeG1NeG1_NeC_4 = build_df_couple(df_H0_NeG1, df_H0_NeG1_NeC_4, "H0/H0 NeG1/NeG1_NeC_4")
df_H0HaPC_NeG5_indel = build_df_couple(df_H0_NeG5_indel, df_HaPC_NeG5_indel, "H0/HaPC NeG5_indel") df_H0HaPC_NeG5_indel = build_df_couple(df_H0_NeG5_indel, df_HaPC_NeG5_indel, "H0/HaPC NeG5_indel")
...@@ -246,6 +275,8 @@ df_l = list(df_H0HaPCOC_NeG1, df_H0HaPC_NeG1, df_H0HaPC_NeG2, df_H0HaPC_NeG3, ...@@ -246,6 +275,8 @@ df_l = list(df_H0HaPCOC_NeG1, df_H0HaPC_NeG1, df_H0HaPC_NeG2, df_H0HaPC_NeG3,
df_H0HaPC_NeG4, df_H0HaPC_NeG5, df_H0HaPC_NeG5_NeC_div2, df_H0HaPC_NeG4, df_H0HaPC_NeG5, df_H0HaPC_NeG5_NeC_div2,
df_H0HaPC_NeG5_NeC_1,df_H0HaPC_NeG1_NeC_5, df_H0HaPC_NeG5_NeC_1,df_H0HaPC_NeG1_NeC_5,
df_H0H0_NeG5NeG5_NeC_1, df_H0H0_NeG1NeG1_NeC_5, df_H0H0_NeG5NeG5_NeC_1, df_H0H0_NeG1NeG1_NeC_5,
df_H0HaPC_NeG4_NeC_1,df_H0HaPC_NeG1_NeC_4,
df_H0H0_NeG4NeG4_NeC_1, df_H0H0_NeG1NeG1_NeC_4,
df_H0HaPC_NeG5_NeC_x2,df_H0HaPC_NeG5_indel) df_H0HaPC_NeG5_NeC_x2,df_H0HaPC_NeG5_indel)
df_l = df_l[-which(sapply(df_l, is.null))] df_l = df_l[-which(sapply(df_l, is.null))]
...@@ -325,6 +356,26 @@ df_recall_sup09_per_meth = do.call(rbind, lapply(split(df_out,paste0(df_out$meth ...@@ -325,6 +356,26 @@ df_recall_sup09_per_meth = do.call(rbind, lapply(split(df_out,paste0(df_out$meth
print(df_recall_sup09_per_meth) print(df_recall_sup09_per_meth)
print("calc auc")
df_auc = do.call(rbind, lapply(split(df_out,paste0(df_out$methode,df_out$couple)),
function(x) {
print(x)
R = x$sensitivity
P = x$precision98_02
R = R[! is.na(P)]
P = P[! is.na(P)]
print(R)
print(P)
auc = auc(x = R, y = P, dens = 0)
df= data.frame(methode =x$methode[1] ,couple =x$couple[1] ,auc=auc)
return(df)
}))
df_auc = df_auc[order(df_auc$couple),]
print(df_auc)
######################################################################## ########################################################################
...@@ -390,7 +441,7 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi ...@@ -390,7 +441,7 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
print("plot recall_precision") print("plot recall_precision")
if (length(meths) <= 9) { if (length(meths) <= 9) {
couple_i = c("H0/HaPC NeG1","H0/HaPC NeG3","H0/HaPC NeG4","H0/HaPC NeG5","H0/H0 NeG5/NeG5_NeC_1","H0/H0 NeG1/NeG1_NeC_5", "H0/HaPC NeG5_NeC_1","H0/HaPC NeG1_NeC_5") couple_i = c("H0/HaPC NeG1","H0/HaPC NeG2","H0/HaPC NeG3","H0/HaPC NeG4","H0/HaPC NeG5","H0/H0 NeG5/NeG5_NeC_1","H0/H0 NeG1/NeG1_NeC_5", "H0/HaPC NeG5_NeC_1","H0/HaPC NeG1_NeC_5","H0/H0 NeG5/NeG4_NeC_1","H0/H0 NeG3/NeG1_NeC_4", "H0/HaPC NeG4_NeC_1","H0/HaPC NeG1_NeC_4")
plot = ggplot(subset(df_out, couple %in% couple_i), aes(x=sensitivity, y=precision98_02, col = methode)) plot = ggplot(subset(df_out, couple %in% couple_i), aes(x=sensitivity, y=precision98_02, col = methode))
plot = plot + theme_bw() plot = plot + theme_bw()
plot = plot + labs(x="Sensitivity (= Recall)", y="Precision (98/2)") plot = plot + labs(x="Sensitivity (= Recall)", y="Precision (98/2)")
...@@ -429,7 +480,12 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi ...@@ -429,7 +480,12 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
) )
plot_PR_c = function(couple_l) { plot_PR_c = function(couple_l) {
plot = ggplot(subset(df_out,couple%in%couple_l), aes(x=sensitivity, y=precision98_02, col = methode)) tmp_df = subset(df_out,couple%in%couple_l)
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"
}
plot = ggplot(tmp_df, aes(x=sensitivity, y=precision98_02, col = methode))
plot = plot + theme_bw() plot = plot + theme_bw()
plot = plot + labs(x="Sensitivity (= Recall)", y="Precision (98/2)") plot = plot + labs(x="Sensitivity (= Recall)", y="Precision (98/2)")
plot = plot + theme(legend.position="top") plot = plot + theme(legend.position="top")
...@@ -443,10 +499,10 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi ...@@ -443,10 +499,10 @@ 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 + theme(axis.text.x = element_text(angle = 45, hjust = 1))
plot} plot}
plot = plot_PR_c(c("H0/HaPC NeG1","H0/HaPC NeG3","H0/HaPC NeG4","H0/HaPC NeG5","H0/H0 NeG5/NeG5_NeC_1","H0/H0 NeG1/NeG1_NeC_5", "H0/HaPC NeG5_NeC_1","H0/HaPC NeG1_NeC_5")) plot = plot_PR_c(c("H0/HaPC NeG1","H0/HaPC NeG2","H0/HaPC NeG4","H0/H0 NeG4/NeG4_NeC_1","H0/H0 NeG1/NeG1_NeC_4", "H0/HaPC NeG4_NeC_1","H0/HaPC NeG1_NeC_4")
plot1 = plot_PR_c(c("H0/HaPC NeG1","H0/HaPC NeG3","H0/HaPC NeG4","H0/HaPC NeG5")) plot1 = plot_PR_c(c("H0/HaPC NeG1","H0/HaPC NeG2","H0/HaPC NeG4"))
plot2 = plot_PR_c(c("H0/H0 NeG5/NeG5_NeC_1","H0/H0 NeG1/NeG1_NeC_5")) plot2 = plot_PR_c(c("H0/H0 NeG4/NeG4_NeC_1","H0/H0 NeG1/NeG1_NeC_4","NULL"))
plot3 = plot_PR_c(c("H0/HaPC NeG5_NeC_1","H0/HaPC NeG1_NeC_5")) plot3 = plot_PR_c(c("H0/HaPC NeG4_NeC_1","H0/HaPC NeG1_NeC_4","NULL"))
legend_PR = get_legend(plot + theme(legend.position="top", legend_PR = get_legend(plot + theme(legend.position="top",
legend.text = element_text(size=10), legend.text = element_text(size=10),
...@@ -461,7 +517,7 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi ...@@ -461,7 +517,7 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
plot2 + theme(legend.position="none"), plot2 + theme(legend.position="none"),
plot3 + theme(legend.position="none"), plot3 + theme(legend.position="none"),
ncol = 1, scale = 1, ncol = 1, scale = 1,
labels = c("","Only Shift Pressure","Only Change in Selection Efficacity","Shift Pressure & Change in Selection Efficacity"), labels = c("","Only Pressure Shift","Only Change in Selection Efficacy","Pressure Shift & Change in Selection Efficacy"),
align = "h", align = "h",
rel_heights = c( 0.3, 0.7,0.7,0.7), rel_heights = c( 0.3, 0.7,0.7,0.7),
...@@ -471,8 +527,8 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi ...@@ -471,8 +527,8 @@ 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"), save_plot(paste0(opt$out,suffix,".recall_precision_ok.pdf"),
plot_recall_precision_papier_ok, plot_recall_precision_papier_ok,
ncol = 0.6* 3, ncol = 2.5,
nrow = 2.1, nrow = 2.5,
base_aspect_ratio = 1, base_aspect_ratio = 1,
limitsize = FALSE limitsize = FALSE
) )
...@@ -775,5 +831,7 @@ plot_out(df_out, df_d, df_recall_sup09_per_meth, meths=condensed_meths, suffix= ...@@ -775,5 +831,7 @@ plot_out(df_out, df_d, df_recall_sup09_per_meth, meths=condensed_meths, suffix=
write.table(df_d, file=paste0(opt$out,".complete_d.tsv"), row.names=FALSE, quote=F, sep = "\t") write.table(df_d, file=paste0(opt$out,".complete_d.tsv"), row.names=FALSE, quote=F, sep = "\t")
write.table(df_out, file=paste0(opt$out,".complete.tsv"), row.names=FALSE, quote=F, sep = "\t") write.table(df_out, file=paste0(opt$out,".complete.tsv"), row.names=FALSE, quote=F, sep = "\t")
write.table(df_auc, file=paste0(opt$out,".auc.tsv"), row.names=FALSE, quote=F, sep = "\t")
write.table(subset(df_auc, methode %in% condensed_meths), file=paste0(opt$out,".auc_condensed.tsv"), row.names=FALSE, quote=F, sep = "\t")
write.table(df_max_mcc_per_method, file=paste0(opt$out,".max_MCC_per_meth.tsv"), row.names=FALSE, quote=F, sep = "\t") write.table(df_max_mcc_per_method, file=paste0(opt$out,".max_MCC_per_meth.tsv"), row.names=FALSE, quote=F, sep = "\t")
write.table(df_recall_sup09_per_meth, file=paste0(opt$out,".recall09_per_meth.tsv"), row.names=FALSE, quote=F, sep = "\t") write.table(df_recall_sup09_per_meth, file=paste0(opt$out,".recall09_per_meth.tsv"), row.names=FALSE, quote=F, sep = "\t")
...@@ -36,10 +36,10 @@ let nodes dataset (model : Convergence_hypothesis.t) = ...@@ -36,10 +36,10 @@ let nodes dataset (model : Convergence_hypothesis.t) =
|HaPC_NeG5_NeC_1 -> [ "tree.Ha.node_ids" ] |HaPC_NeG5_NeC_1 -> [ "tree.Ha.node_ids" ]
|H0_NeG1_NeC_5 -> [ "tree.H0_a.node_ids" ] |H0_NeG1_NeC_5 -> [ "tree.H0_a.node_ids" ]
|H0_NeG5_NeC_1 -> [ "tree.H0_a.node_ids" ] |H0_NeG5_NeC_1 -> [ "tree.H0_a.node_ids" ]
|HaPC_NeG2_NeC_4 -> [ "tree.Ha.node_ids" ] |HaPC_NeG1_NeC_4 -> [ "tree.Ha.node_ids" ]
|HaPC_NeG4_NeC_2 -> [ "tree.Ha.node_ids" ] |HaPC_NeG4_NeC_1 -> [ "tree.Ha.node_ids" ]
|H0_NeG2_NeC_4 -> [ "tree.H0_a.node_ids" ] |H0_NeG1_NeC_4 -> [ "tree.H0_a.node_ids" ]
|H0_NeG4_NeC_2 -> [ "tree.H0_a.node_ids" ] |H0_NeG4_NeC_1 -> [ "tree.H0_a.node_ids" ]
) )
let tree dataset mode = 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