Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
VEBER Philippe
codepi
Commits
01c7a18a
Commit
01c7a18a
authored
Sep 07, 2018
by
Carine Rey
Browse files
add new hypo (work still in progress)
parent
3351182b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
128 additions
and
70 deletions
+128
-70
lib/convergence_hypothesis.ml
lib/convergence_hypothesis.ml
+12
-12
lib/pipeline.ml
lib/pipeline.ml
+16
-16
lib/post_analyses.ml
lib/post_analyses.ml
+29
-29
lib/scripts/calc_t_per_meth.R
lib/scripts/calc_t_per_meth.R
+67
-9
lib/tree_dataset.ml
lib/tree_dataset.ml
+4
-4
No files found.
lib/convergence_hypothesis.ml
View file @
01c7a18a
...
...
@@ -22,10 +22,10 @@ type t =
|
HaPC_NeG5_NeC_1
|
H0_NeG1_NeC_5
|
H0_NeG5_NeC_1
|
HaPC_NeG
2
_NeC_4
|
HaPC_NeG4_NeC_
2
|
H0_NeG
2
_NeC_4
|
H0_NeG4_NeC_
2
|
HaPC_NeG
1
_NeC_4
|
HaPC_NeG4_NeC_
1
|
H0_NeG
1
_NeC_4
|
H0_NeG4_NeC_
1
let
string_of_model
m
=
match
m
with
|
H0_NeG1
->
"H0_NeG1"
...
...
@@ -47,10 +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_NeG
2
_NeC_4
->
"HaPC_NeG
2
_NeC_4"
|
HaPC_NeG4_NeC_
2
->
"HaPC_NeG4_NeC_
2
"
|
H0_NeG
2
_NeC_4
->
"H0_NeG
2
_NeC_4"
|
H0_NeG4_NeC_
2
->
"H0_NeG4_NeC_
2
"
|
HaPC_NeG
1
_NeC_4
->
"HaPC_NeG
1
_NeC_4"
|
HaPC_NeG4_NeC_
1
->
"HaPC_NeG4_NeC_
1
"
|
H0_NeG
1
_NeC_4
->
"H0_NeG
1
_NeC_4"
|
H0_NeG4_NeC_
1
->
"H0_NeG4_NeC_
1
"
let
assign
k
v
=
seq
~
sep
:
"="
[
string
k
;
v
]
...
...
@@ -125,9 +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_NeG
2
_NeC_4
->
bpp_config_HaPC_F_Ne
|
HaPC_NeG4_NeC_
2
->
bpp_config_HaPC_F_Ne
|
H0_NeG
2
_NeC_4
->
bpp_config_H0_F_Ne
|
H0_NeG4_NeC_
2
->
bpp_config_H0_F_Ne
|
HaPC_NeG
1
_NeC_4
->
bpp_config_HaPC_F_Ne
|
HaPC_NeG4_NeC_
1
->
bpp_config_HaPC_F_Ne
|
H0_NeG
1
_NeC_4
->
bpp_config_H0_F_Ne
|
H0_NeG4_NeC_
1
->
bpp_config_H0_F_Ne
;
]
lib/pipeline.ml
View file @
01c7a18a
...
...
@@ -82,10 +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
.
|
HaPC_NeG
2
_NeC_4
->
2
.
|
HaPC_NeG4_NeC_
2
->
4
.
|
H0_NeG
2
_NeC_4
->
2
.
|
H0_NeG4_NeC_
2
->
4
.
|
HaPC_NeG
1
_NeC_4
->
1
.
|
HaPC_NeG4_NeC_
1
->
4
.
|
H0_NeG
1
_NeC_4
->
1
.
|
H0_NeG4_NeC_
1
->
4
.
in
let
ne_c
=
match
model
with
|
H0_NeG1
->
ne_g
...
...
@@ -107,10 +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
.
|
HaPC_NeG
2
_NeC_4
->
4
.
|
HaPC_NeG4_NeC_
2
->
2
.
|
H0_NeG
2
_NeC_4
->
4
.
|
H0_NeG4_NeC_
2
->
2
.
|
HaPC_NeG
1
_NeC_4
->
4
.
|
HaPC_NeG4_NeC_
1
->
1
.
|
H0_NeG
1
_NeC_4
->
4
.
|
H0_NeG4_NeC_
1
->
1
.
in
let
ne_a
=
match
model
with
|
H0_NeG1
->
ne_g
...
...
@@ -132,10 +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
|
HaPC_NeG
2
_NeC_4
->
ne_g
|
HaPC_NeG4_NeC_
2
->
ne_g
|
H0_NeG
2
_NeC_4
->
ne_g
|
H0_NeG4_NeC_
2
->
ne_g
|
HaPC_NeG
1
_NeC_4
->
ne_g
|
HaPC_NeG4_NeC_
1
->
ne_g
|
H0_NeG
1
_NeC_4
->
ne_g
|
H0_NeG4_NeC_
1
->
ne_g
in
let
profile_f
=
profile
.
profile_f
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
HaPC_NeG5_NeC_1
;
H0_NeG1_NeC_5
;
H0_NeG5_NeC_1
;
HaPC_NeG
2
_NeC_4
;
HaPC_NeG4_NeC_
2
;
H0_NeG
2
_NeC_4
;
H0_NeG4_NeC_
2
;
HaPC_NeG
1
_NeC_4
;
HaPC_NeG4_NeC_
1
;
H0_NeG
1
_NeC_4
;
H0_NeG4_NeC_
1
;
]
);
(
if
ne_test
then
...
...
lib/post_analyses.ml
View file @
01c7a18a
...
...
@@ -75,10 +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_NeG
2
_NeC_4_mr
~
h0_NeG
2
_NeC_4_mr
~
h0_NeG4_NeC_
2
_mr
~
haPC_NeG4_NeC_
1
_mr
~
haPC_NeG
1
_NeC_4_mr
~
h0_NeG
1
_NeC_4_mr
~
h0_NeG4_NeC_
1
_mr
~
haPC_NeG5_indel_mr
()
:
post_analyses_dir
directory
workflow
=
let
env
=
Env
.
env_r
in
...
...
@@ -98,10 +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_NeG
2
_NeC_4_res"
,
haPC_NeG
2
_NeC_4_mr
);
(
"--H0_NeG
2
_NeC_4_res"
,
h0_NeG
2
_NeC_4_mr
);
(
"--HaPC_NeG4_NeC_
1
_res"
,
haPC_NeG4_NeC_
1
_mr
);
(
"--H0_NeG4_NeC_
1
_res"
,
h0_NeG4_NeC_
1
_mr
);
(
"--HaPC_NeG
1
_NeC_4_res"
,
haPC_NeG
1
_NeC_4_mr
);
(
"--H0_NeG
1
_NeC_4_res"
,
h0_NeG
1
_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
);
...
...
@@ -210,10 +210,10 @@ 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_NeG
2
_NeC_4_res
:
dataset_res
option
;
h0_NeG4_NeC_
2
_res
:
dataset_res
option
;
h0_NeG
2
_NeC_4_res
:
dataset_res
option
;
haPC_NeG4_NeC_
1
_res
:
dataset_res
option
;
haPC_NeG
1
_NeC_4_res
:
dataset_res
option
;
h0_NeG4_NeC_
1
_res
:
dataset_res
option
;
h0_NeG
1
_NeC_4_res
:
dataset_res
option
;
haPC_NeG5_NeC_1_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;
haPC_NeG5_NeC_x2_res
;
h0_NeG5_NeC_div2_res
;
h0_NeG5_NeC_x2_res
;
haPC_NeG4_NeC_
2
_res
;
haPC_NeG
2
_NeC_4_res
;
h0_NeG4_NeC_
2
_res
;
h0_NeG
2
_NeC_4_res
;
haPC_NeG4_NeC_
1
_res
;
haPC_NeG
1
_NeC_4_res
;
h0_NeG4_NeC_
1
_res
;
h0_NeG
1
_NeC_4_res
;
haPC_NeG5_NeC_1_res
;
haPC_NeG1_NeC_5_res
;
h0_NeG5_NeC_1_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_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_NeG
2
_NeC_4_mr
=
get_merged_results_opt
haPC_NeG
2
_NeC_4_res
in
let
h0_NeG
2
_NeC_4_mr
=
get_merged_results_opt
h0_NeG
2
_NeC_4_res
in
let
h0_NeG4_NeC_
2
_mr
=
get_merged_results_opt
h0_NeG4_NeC_
2
_res
in
let
haPC_NeG4_NeC_
1
_mr
=
get_merged_results_opt
haPC_NeG4_NeC_
1
_res
in
let
haPC_NeG
1
_NeC_4_mr
=
get_merged_results_opt
haPC_NeG
1
_NeC_4_res
in
let
h0_NeG
1
_NeC_4_mr
=
get_merged_results_opt
h0_NeG
1
_NeC_4_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_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;
~
h0_NeG5_NeC_x2_mr
~
h0_NeG5_indel_mr
~
haPC_NeG5_indel_mr
~
haPC_NeG4_NeC_
2
_mr
~
haPC_NeG
2
_NeC_4_mr
~
h0_NeG
2
_NeC_4_mr
~
h0_NeG4_NeC_
2
_mr
~
haPC_NeG4_NeC_
1
_mr
~
haPC_NeG
1
_NeC_4_mr
~
h0_NeG
1
_NeC_4_mr
~
h0_NeG4_NeC_
1
_mr
~
haPC_NeG5_NeC_1_mr
~
haPC_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
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_NeG
2
_NeC_4_res
=
List
.
find
dataset_results_l
(
is_hyp
~
hyp
:
"HaPC_NeG
2
_NeC_4"
)
in
let
h0_NeG4_NeC_
2
_res
=
List
.
find
dataset_results_l
(
is_hyp
~
hyp
:
"H0_NeG4_NeC_
2
"
)
in
let
h0_NeG
2
_NeC_4_res
=
List
.
find
dataset_results_l
(
is_hyp
~
hyp
:
"H0_NeG
2
_NeC_4"
)
in
let
haPC_NeG4_NeC_
1
_res
=
List
.
find
dataset_results_l
(
is_hyp
~
hyp
:
"HaPC_NeG4_NeC_
1
"
)
in
let
haPC_NeG
1
_NeC_4_res
=
List
.
find
dataset_results_l
(
is_hyp
~
hyp
:
"HaPC_NeG
1
_NeC_4"
)
in
let
h0_NeG4_NeC_
1
_res
=
List
.
find
dataset_results_l
(
is_hyp
~
hyp
:
"H0_NeG4_NeC_
1
"
)
in
let
h0_NeG
1
_NeC_4_res
=
List
.
find
dataset_results_l
(
is_hyp
~
hyp
:
"H0_NeG
1
_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
...
...
@@ -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
;
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_NeG
2
_NeC_4_res
;
h0_NeG
2
_NeC_4_res
;
h0_NeG4_NeC_
2
_res
;
haPC_NeG4_NeC_
1
_res
;
haPC_NeG
1
_NeC_4_res
;
h0_NeG
1
_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
;
h0_NeG5_indel_res
;
haPC_NeG5_indel_res
}
in
let
t_choices_max
=
t_choices_dir
/
selector
[
"out.max_MCC_per_meth.tsv"
]
in
...
...
lib/scripts/calc_t_per_meth.R
View file @
01c7a18a
...
...
@@ -7,6 +7,7 @@ library("optparse")
library
(
"reshape2"
)
library
(
"ggplot2"
)
library
(
"cowplot"
)
library
(
"flux"
)
date
=
format
(
Sys.time
(),
format
=
"%Y-%m-%d %X"
)
...
...
@@ -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
(
"--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
(
"--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"
),
...
...
@@ -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_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_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
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_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_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_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_H0HaPCOC_NeG1
,
df_d_H0HaPC_NeG1
,
...
...
@@ -155,6 +172,10 @@ df_d = rbind.data.frame(
df_d_H0HaPC_NeG1_NeC_5
,
df_d_H0H0_NeG1NeG1_NeC5
,
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
)
...
...
@@ -163,6 +184,8 @@ df_d = df_d[order(df_d$methode),]
print
(
head
(
df_d
))
print
(
tail
(
df_d
))
########################################################################
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, "
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_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"
)
...
...
@@ -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_NeG5_NeC_1
,
df_H0HaPC_NeG1_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_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
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
print
(
"plot recall_precision"
)
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
=
plot
+
theme_bw
()
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
)
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
+
labs
(
x
=
"Sensitivity (= Recall)"
,
y
=
"Precision (98/2)"
)
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
plot
=
plot
+
theme
(
axis.text.x
=
element_text
(
angle
=
45
,
hjust
=
1
))
plot
}
plot
=
plot_PR_c
(
c
(
"H0/HaPC NeG1"
,
"H0/HaPC NeG
3
"
,
"H0/HaPC NeG4"
,
"H0/
HaPC NeG5"
,
"H0/
H0 NeG
5
/NeG
5
_NeC_1"
,
"H0/H0 NeG1/NeG1_NeC_
5
"
,
"H0/HaPC NeG
5
_NeC_1"
,
"H0/HaPC NeG1_NeC_
5
"
)
)
plot1
=
plot_PR_c
(
c
(
"H0/HaPC NeG1"
,
"H0/HaPC NeG
3
"
,
"H0/HaPC NeG4"
,
"H0/HaPC NeG5"
))
plot2
=
plot_PR_c
(
c
(
"H0/H0 NeG
5
/NeG
5
_NeC_1"
,
"H0/H0 NeG1/NeG1_NeC_
5
"
))
plot3
=
plot_PR_c
(
c
(
"H0/HaPC NeG
5
_NeC_1"
,
"H0/HaPC NeG1_NeC_
5
"
))
plot
=
plot_PR_c
(
c
(
"H0/HaPC NeG1"
,
"H0/HaPC NeG
2
"
,
"H0/HaPC NeG4"
,
"H0/H0 NeG
4
/NeG
4
_NeC_1"
,
"H0/H0 NeG1/NeG1_NeC_
4
"
,
"H0/HaPC NeG
4
_NeC_1"
,
"H0/HaPC NeG1_NeC_
4
"
)
plot1
=
plot_PR_c
(
c
(
"H0/HaPC NeG1"
,
"H0/HaPC NeG
2
"
,
"H0/HaPC NeG4"
))
plot2
=
plot_PR_c
(
c
(
"H0/H0 NeG
4
/NeG
4
_NeC_1"
,
"H0/H0 NeG1/NeG1_NeC_
4"
,
"NULL
"
))
plot3
=
plot_PR_c
(
c
(
"H0/HaPC NeG
4
_NeC_1"
,
"H0/HaPC NeG1_NeC_
4"
,
"NULL
"
))
legend_PR
=
get_legend
(
plot
+
theme
(
legend.position
=
"top"
,
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
plot2
+
theme
(
legend.position
=
"none"
),
plot3
+
theme
(
legend.position
=
"none"
),
ncol
=
1
,
scale
=
1
,
labels
=
c
(
""
,
"Only
Shift
Pressure"
,
"Only Change in Selection Efficac
it
y"
,
"
Shift
Pressure & Change in Selection Efficac
it
y"
),
labels
=
c
(
""
,
"Only Pressure
Shift
"
,
"Only Change in Selection Efficacy"
,
"Pressure
Shift
& Change in Selection Efficacy"
),
align
=
"h"
,
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
save_plot
(
paste0
(
opt
$
out
,
suffix
,
".recall_precision_ok.pdf"
),
plot_recall_precision_papier_ok
,
ncol
=
0.6
*
3
,
nrow
=
2.
1
,
ncol
=
2.5
,
nrow
=
2.
5
,
base_aspect_ratio
=
1
,
limitsize
=
FALSE
)
...
...
@@ -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_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_recall_sup09_per_meth
,
file
=
paste0
(
opt
$
out
,
".recall09_per_meth.tsv"
),
row.names
=
FALSE
,
quote
=
F
,
sep
=
"\t"
)
lib/tree_dataset.ml
View file @
01c7a18a
...
...
@@ -36,10 +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_NeG
2
_NeC_4
->
[
"tree.Ha.node_ids"
]
|
HaPC_NeG4_NeC_
2
->
[
"tree.Ha.node_ids"
]
|
H0_NeG
2
_NeC_4
->
[
"tree.H0_a.node_ids"
]
|
H0_NeG4_NeC_
2
->
[
"tree.H0_a.node_ids"
]
|
HaPC_NeG
1
_NeC_4
->
[
"tree.Ha.node_ids"
]
|
HaPC_NeG4_NeC_
1
->
[
"tree.Ha.node_ids"
]
|
H0_NeG
1
_NeC_4
->
[
"tree.H0_a.node_ids"
]
|
H0_NeG4_NeC_
1
->
[
"tree.H0_a.node_ids"
]
)
let
tree
dataset
mode
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment