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
6481fe5d
Commit
6481fe5d
authored
Sep 06, 2018
by
Carine Rey
Browse files
add NeG1_NeC_5 NeG5_NeC_1
parent
6145bbaf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
4 deletions
+86
-4
lib/convergence_hypothesis.ml
lib/convergence_hypothesis.ml
+12
-1
lib/pipeline.ml
lib/pipeline.ml
+16
-0
lib/post_analyses.ml
lib/post_analyses.ml
+32
-0
lib/scripts/calc_t_per_meth.R
lib/scripts/calc_t_per_meth.R
+22
-3
lib/tree_dataset.ml
lib/tree_dataset.ml
+4
-0
No files found.
lib/convergence_hypothesis.ml
View file @
6481fe5d
...
...
@@ -18,7 +18,10 @@ type t =
|
HaPCOC
|
HaPC_NeG5_NeC_div2
|
HaPC_NeG5_NeC_x2
|
HaPC_NeG1_NeC_5
|
HaPC_NeG5_NeC_1
|
H0_NeG1_NeC_5
|
H0_NeG5_NeC_1
let
string_of_model
m
=
match
m
with
|
H0_NeG1
->
"H0_NeG1"
...
...
@@ -36,6 +39,10 @@ let string_of_model m = match m with
|
HaPC_NeG5_NeC_x2
->
"HaPC_NeG5_NeC_x2"
|
H0_NeG5_NeC_div2
->
"H0_NeG5_NeC_div2"
|
H0_NeG5_NeC_x2
->
"H0_NeG5_NeC_x2"
|
HaPC_NeG1_NeC_5
->
"HaPC_NeG1_NeC_5"
|
HaPC_NeG5_NeC_1
->
"HaPC_NeG5_NeC_1"
|
H0_NeG1_NeC_5
->
"H0_NeG1_NeC_5"
|
H0_NeG5_NeC_1
->
"H0_NeG5_NeC_1"
let
assign
k
v
=
seq
~
sep
:
"="
[
string
k
;
v
]
...
...
@@ -106,5 +113,9 @@ let bpp_config_F nodes hyp = [
|
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
;
]
lib/pipeline.ml
View file @
6481fe5d
...
...
@@ -77,6 +77,10 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
|
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
.
|
_
->
1
.
in
let
ne_c
=
match
model
with
...
...
@@ -94,6 +98,10 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
|
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_5
->
5
.
|
H0_NeG5_NeC_1
->
1
.
|
_
->
ne_g
in
let
ne_a
=
match
model
with
...
...
@@ -111,6 +119,10 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
|
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
|
_
->
ne_g
in
let
profile_f
=
profile
.
profile_f
in
...
...
@@ -160,6 +172,10 @@ let derive_from_tree ~tree_dir ~tree ~profile ~preview ~use_concat ~ns ~no_Ne ~n
HaPC_NeG5_NeC_x2
;
H0_NeG5_NeC_div2
;
H0_NeG5_NeC_x2
;
HaPC_NeG1_NeC_5
;
HaPC_NeG5_NeC_1
;
H0_NeG1_NeC_5
;
H0_NeG5_NeC_1
;
]
);
(
if
ne_test
then
...
...
lib/post_analyses.ml
View file @
6481fe5d
...
...
@@ -70,6 +70,10 @@ let make_t_choices ?(tree_prefix="") ~haPCOC_mr
~
h0_NeG5_NeC_div2_mr
~
h0_NeG5_NeC_x2_mr
~
h0_NeG5_indel_mr
~
haPC_NeG5_NeC_1_mr
~
haPC_NeG1_NeC_5_mr
~
h0_NeG1_NeC_5_mr
~
h0_NeG5_NeC_1_mr
~
haPC_NeG5_indel_mr
()
:
post_analyses_dir
directory
workflow
=
let
env
=
Env
.
env_r
in
...
...
@@ -89,6 +93,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_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
);
(
"--H0_NeG1_NeC_5_res"
,
h0_NeG1_NeC_5_mr
);
(
"--H0_NeG5_indel_res"
,
h0_NeG5_indel_mr
);
(
"--HaPC_NeG5_indel_res"
,
haPC_NeG5_indel_mr
);
(
"--HaPCOC"
,
haPCOC_mr
);
...
...
@@ -193,6 +201,11 @@ type res_all_hyp = {
h0_NeG5_NeC_div2_res
:
dataset_res
option
;
h0_NeG5_NeC_x2_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
;
h0_NeG1_NeC_5_res
:
dataset_res
option
;
h0_NeG5_indel_res
:
dataset_res
option
;
haPC_NeG5_indel_res
:
dataset_res
option
;
}
...
...
@@ -208,6 +221,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_NeG5_NeC_1_res
;
haPC_NeG1_NeC_5_res
;
h0_NeG5_NeC_1_res
;
h0_NeG1_NeC_5_res
;
h0_NeG5_indel_res
;
haPC_NeG5_indel_res
;
}
=
...
...
@@ -230,6 +247,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_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
let
h0_NeG5_NeC_1_mr
=
get_merged_results_opt
h0_NeG5_NeC_1_res
in
let
h0_NeG5_indel_mr
=
get_merged_results_opt
h0_NeG5_indel_res
in
let
haPC_NeG5_indel_mr
=
get_merged_results_opt
haPC_NeG5_indel_res
in
...
...
@@ -250,6 +272,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_NeG5_NeC_1_mr
~
haPC_NeG1_NeC_5_mr
~
h0_NeG1_NeC_5_mr
~
h0_NeG5_NeC_1_mr
()
...
...
@@ -272,6 +298,11 @@ let get_t_choices ~tree_prefix ~(dataset_results_l: dataset_res list) : t_choice
let
haPC_NeG5_NeC_x2_res
=
List
.
find
dataset_results_l
(
is_hyp
~
hyp
:
"HaPC_NeG5_NeC_x2"
)
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
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
let
h0_NeG1_NeC_5_res
=
List
.
find
dataset_results_l
(
is_hyp
~
hyp
:
"H0_NeG1_NeC_5"
)
in
let
h0_NeG5_indel_res
=
List
.
find
dataset_results_l
(
is_hyp
~
hyp
:
"H0_NeG5_0.33_i"
)
in
let
haPC_NeG5_indel_res
=
List
.
find
dataset_results_l
(
is_hyp
~
hyp
:
"HaPC_NeG5_0.33_i"
)
in
...
...
@@ -283,6 +314,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_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
let
t_choices_recall09
=
t_choices_dir
/
selector
[
"out.recall09_per_meth.tsv"
]
in
...
...
lib/scripts/calc_t_per_meth.R
View file @
6481fe5d
...
...
@@ -25,6 +25,11 @@ option_list = list(
make_option
(
c
(
"--HaPC_NeG5_NeC_x2_res"
)
,
type
=
"character"
,
default
=
NA
,
help
=
"merged_results HaPC_NeG5_NeC_x2_res"
,
metavar
=
"character"
),
make_option
(
c
(
"--H0_NeG5_NeC_div2_res"
)
,
type
=
"character"
,
default
=
NA
,
help
=
"merged_results H0_NeG5_NeC_div2_res"
,
metavar
=
"character"
),
make_option
(
c
(
"--H0_NeG5_NeC_x2_res"
)
,
type
=
"character"
,
default
=
NA
,
help
=
"merged_results H0_NeG5_NeC_x2_res"
,
metavar
=
"character"
),
make_option
(
c
(
"--HaPC_NeG5_NeC_1_res"
)
,
type
=
"character"
,
default
=
NA
,
help
=
"merged_results HaPC_NeG5_NeC_1_res"
,
metavar
=
"character"
),
make_option
(
c
(
"--H0_NeG5_NeC_1_res"
)
,
type
=
"character"
,
default
=
NA
,
help
=
"merged_results H0_NeG5_NeC_1_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_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"
),
...
...
@@ -85,6 +90,11 @@ df_HaPC_NeG5_NeC_x2 = read_hyp(opt$HaPC_NeG5_NeC_x2 )
df_H0_NeG5_NeC_div2
=
read_hyp
(
opt
$
H0_NeG5_NeC_div2
)
df_H0_NeG5_NeC_x2
=
read_hyp
(
opt
$
H0_NeG5_NeC_x2
)
df_HaPC_NeG5_NeC_1
=
read_hyp
(
opt
$
HaPC_NeG5_NeC_1
)
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_NeG5_indel
=
read_hyp
(
opt
$
HaPC_NeG5_indel_res
)
df_H0_NeG5_indel
=
read_hyp
(
opt
$
H0_NeG5_indel_res
)
...
...
@@ -123,6 +133,9 @@ df_d_H0HaPC_NeG5 = build_df_dist_couple(df_H0_NeG5, df_HaPC_NeG5, "H0/HaPC NeG
df_d_H0HaPC_NeG5_NeC_div2
=
build_df_dist_couple
(
df_H0_NeG5_NeC_div2
,
df_HaPC_NeG5_NeC_div2
,
"H0/HaPC NeG5_NeC_div2"
)
df_d_H0HaPC_NeG5_NeC_x2
=
build_df_dist_couple
(
df_H0_NeG5_NeC_x2
,
df_HaPC_NeG5_NeC_x2
,
"H0/HaPC NeG5_NeC_x2"
)
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 NeG5_NeC_5"
)
df_d_H0HaPC_NeG5_indel
=
build_df_dist_couple
(
df_H0_NeG5_indel
,
df_HaPC_NeG5_indel
,
"H0/HaPC NeG5_indel"
)
df_d
=
rbind.data.frame
(
...
...
@@ -134,6 +147,8 @@ df_d = rbind.data.frame(
df_d_H0HaPC_NeG5
,
df_d_H0HaPC_NeG5_NeC_div2
,
df_d_H0HaPC_NeG5_NeC_x2
,
df_d_H0HaPC_NeG5_NeC_1
,
df_d_H0HaPC_NeG1_NeC_5
,
df_d_H0HaPC_NeG5_indel
)
...
...
@@ -212,11 +227,15 @@ df_H0HaPC_NeG5 = build_df_couple(df_H0_NeG5, df_HaPC_NeG5, "H0/HaPC NeG5")
df_H0HaPC_NeG5_NeC_div2
=
build_df_couple
(
df_H0_NeG5_NeC_div2
,
df_HaPC_NeG5_NeC_div2
,
"H0/HaPC NeG5_NeC_div2"
)
df_H0HaPC_NeG5_NeC_x2
=
build_df_couple
(
df_H0_NeG5_NeC_x2
,
df_HaPC_NeG5_NeC_x2
,
"H0/HaPC NeG5_NeC_x2"
)
df_H0HaPC_NeG5_NeC_1
=
build_df_couple
(
df_H0_NeG5_NeC_1
,
df_HaPC_NeG5_NeC_1
,
"H0/HaPC NeG5_NeC_1"
)
df_H0HaPC_NeG1_NeC_5
=
build_df_couple
(
df_H0_NeG1_NeC_5
,
df_HaPC_NeG1_NeC_5
,
"H0/HaPC NeG1_NeC_5"
)
df_H0HaPC_NeG5_indel
=
build_df_couple
(
df_H0_NeG5_indel
,
df_HaPC_NeG5_indel
,
"H0/HaPC NeG5_indel"
)
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_H0HaPC_NeG5_NeC_x2
,
df_H0HaPC_NeG5_indel
)
df_l
=
df_l
[
-
which
(
sapply
(
df_l
,
is.null
))]
...
...
@@ -302,8 +321,8 @@ print(df_recall_sup09_per_meth)
plot_out
=
function
(
df_out
,
df_d
,
df_recall_sup09_per_meth
,
meths
=
NULL
,
suffix
=
""
)
{
nb_c
=
length
(
unique
(
df_out
$
couple
))
colors
=
c
(
c
(
"#984EA3"
,
"#4AA947"
,
"#377EB8"
,
"#E41A1C"
,
"#F5BE5B"
,
"#90EE90"
,
"#8B6914"
,
"#BFBFBF"
)[
1
:
nb_c
],
c
(
"#7F7F7F"
,
"#ADD8E6"
))
colors2
=
c
(
"#984EA3"
,
"#4AA947"
,
"#377EB8"
,
"#E41A1C"
,
"#F5BE5B"
,
"#90EE90"
,
"#8B6914"
,
"#7F7F7F"
,
"#ADD8E6"
)
colors
=
c
(
c
(
"#984EA3"
,
"#4AA947"
,
"#377EB8"
,
"#E41A1C"
,
"#F5BE5B"
,
"#90EE90"
,
"#8B6914"
,
"#BFBFBF"
,
"#0000FF"
,
"#FFC0CB"
)[
1
:
nb_c
],
c
(
"#7F7F7F"
,
"#ADD8E6"
))
colors2
=
c
(
"#984EA3"
,
"#4AA947"
,
"#377EB8"
,
"#E41A1C"
,
"#F5BE5B"
,
"#90EE90"
,
"#8B6914"
,
"#
BFBFBF"
,
"#
7F7F7F"
,
"#ADD8E6"
)
if
(
!
is.null
(
meths
))
{
df_out
=
df_out
[
df_out
$
methode
%in%
meths
,]
...
...
@@ -360,7 +379,7 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
)
print
(
"plot recall_precision"
)
if
(
length
(
meths
)
<=
7
)
{
if
(
length
(
meths
)
<=
9
)
{
plot
=
ggplot
(
df_out
,
aes
(
x
=
sensitivity
,
y
=
precision98_02
,
col
=
methode
))
plot
=
plot
+
theme_bw
()
plot
=
plot
+
labs
(
x
=
"Sensitivity (= Recall)"
,
y
=
"Precision (98/2)"
)
...
...
lib/tree_dataset.ml
View file @
6481fe5d
...
...
@@ -32,6 +32,10 @@ let nodes dataset (model : Convergence_hypothesis.t) =
|
H0_NeG5_NeC_div2
->
[
"tree.H0_a.node_ids"
]
|
H0_NeG5_NeC_x2
->
[
"tree.H0_a.node_ids"
]
|
HaPCOC
->
[
"tree.Ha.node_ids"
]
|
HaPC_NeG1_NeC_5
->
[
"tree.Ha.node_ids"
]
|
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"
]
)
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