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
f23e90fe
Commit
f23e90fe
authored
Aug 13, 2018
by
Carine Rey
Browse files
add an argument (e) to Msd
parent
c82b037a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
12 deletions
+21
-12
lib/convergence_detection.ml
lib/convergence_detection.ml
+1
-1
lib/pipeline.ml
lib/pipeline.ml
+3
-4
lib/scripts/calc_t_per_meth.R
lib/scripts/calc_t_per_meth.R
+7
-3
lib/scripts/merge_det_results.py
lib/scripts/merge_det_results.py
+9
-3
lib/scripts/plot_sens_spe_all_trees.R
lib/scripts/plot_sens_spe_all_trees.R
+1
-1
No files found.
lib/convergence_detection.ml
View file @
f23e90fe
...
...
@@ -72,7 +72,7 @@ let merge_results ?fna_infos ~res_by_tools () : text_file workflow =
|
`Topological_WAG
_
->
string
"--topological_WAG"
|
`Tdg09
_
->
string
"--tdg09"
|
`Multinomial
_
->
string
"--multinomial"
|
`Msd
_
->
string
"--msd"
|
`Msd
(
w
,
e
)
->
string
(
sprintf
"--msd %f"
e
)
in
seq
~
sep
:
" "
[
opt
;
dep
w
]
)
...
...
lib/pipeline.ml
View file @
f23e90fe
...
...
@@ -254,13 +254,12 @@ let derive_from_det_meth ~det_meth ~(dataset : Dataset.t) ~preview =
let
derive_from_dataset
~
dataset
~
preview
~
fast_mode
=
let
det_meths
=
[
[
(
[
`Identical_LG
;
`Topological_LG
;
`Multinomial
;
`Pcoc
;
]
;
]
@
List
.
map
[
0
.
05
;
1
.
]
(
fun
x
->
`Msd
x
))
;
if
preview
then
[]
else
...
...
@@ -273,7 +272,7 @@ let derive_from_dataset ~dataset ~preview ~fast_mode=
if
fast_mode
then
[]
else
(
[
`Diffsel
;
`Pcoc_C60
]
@
List
.
map
[
0
.
05
;
0
.
1
;
0
.
5
;
1
.
]
(
fun
x
->
`Msd
x
))
;
[
`Diffsel
;
`Pcoc_C60
]
;
]
|>
List
.
concat
in
let
res_by_tools
=
List
.
map
det_meths
~
f
:
(
fun
det_meth
->
...
...
lib/scripts/calc_t_per_meth.R
View file @
f23e90fe
...
...
@@ -293,6 +293,7 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
nb_c
=
length
(
unique
(
df_out
$
couple
))
colors
=
c
(
c
(
"#984EA3"
,
"#4AA947"
,
"#377EB8"
,
"#E41A1C"
,
"#F5BE5B"
,
"#90EE90"
,
"#8B6914"
)[
1
:
nb_c
],
c
(
"#7F7F7F"
,
"#ADD8E6"
))
colors2
=
c
(
"#984EA3"
,
"#4AA947"
,
"#377EB8"
,
"#E41A1C"
,
"#F5BE5B"
,
"#90EE90"
,
"#8B6914"
,
"#7F7F7F"
,
"#ADD8E6"
)
if
(
!
is.null
(
meths
))
{
...
...
@@ -356,7 +357,7 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
plot
=
plot
+
theme
(
legend.position
=
"top"
)
plot
=
plot
+
ylim
(
c
(
0
,
1
))
+
xlim
(
c
(
0
,
1
))
plot
=
plot
+
guides
(
fill
=
FALSE
)
plot
=
plot
+
scale_color_manual
(
values
=
colors
)
plot
=
plot
+
scale_color_manual
(
values
=
colors
2
)
#plot = plot + geom_point(size=1, alpha=alpha)
plot
=
plot
+
geom_step
(
direction
=
"vh"
,
size
=
0.5
,
alpha
=
alpha
)
plot
=
plot
+
geom_hline
(
aes
(
yintercept
=
0.9
),
col
=
"black"
,
size
=
0.5
,
show.legend
=
NA
,
linetype
=
"dashed"
)
...
...
@@ -400,6 +401,7 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
df_out_melt2
=
subset
(
df_out_melt2
,
variable
==
"specificity"
)
df_out_melt2
$
FPR
=
1
-
df_out_melt2
$
value
if
(
length
(
df_out_melt2
$
methode
)
>
0
){
df_recall_sup09_per_meth2
=
subset
(
df_recall_sup09_per_meth
,
couple
%in%
c
(
"H0/HaPC NeG5"
,
"H0/HaPC NeG5_NeC_div2"
,
"H0/HaPC NeG5_NeC_x2"
))
df_recall_sup09_per_meth2
$
couple
=
gsub
(
"/HaPC "
,
""
,
df_recall_sup09_per_meth2
$
couple
)
...
...
@@ -426,7 +428,9 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
base_aspect_ratio
=
1.5
,
limitsize
=
FALSE
)
}
else
{
plot_FPR
=
NULL
}
print
(
"plot per indicator"
)
...
...
@@ -566,7 +570,7 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
plot_out
(
df_out
,
df_d
,
df_recall_sup09_per_meth
,
suffix
=
""
)
condensed_meths
=
c
(
"PCOC"
,
"Diffsel_mean"
,
"Identical_LG08"
,
"Mutinomial_1MinusLRT"
,
"Tdg09_1MinusFDR"
,
"Msd_1MinusP"
,
"Topological_LG08"
)
condensed_meths
=
c
(
"PCOC"
,
"Diffsel_mean"
,
"Identical_LG08"
,
"Mutinomial_1MinusLRT"
,
"Tdg09_1MinusFDR"
,
"Msd_1MinusP"
,
"
Msd_0.01_1MinusP"
,
"Msd_0.05_1MinusP"
,
"Msd_0.10_1MinusP"
,
"Msd_0.50_1MinusP"
,
"Msd_1.00_1MinusP"
,
"
Topological_LG08"
)
plot_out
(
df_out
,
df_d
,
df_recall_sup09_per_meth
,
meths
=
condensed_meths
,
suffix
=
"_condensed"
)
...
...
lib/scripts/merge_det_results.py
View file @
f23e90fe
...
...
@@ -72,7 +72,7 @@ availableOptions.add_argument('--tdg09', type=str,
help
=
"tdg09 output name"
,
default
=
None
)
availableOptions
.
add_argument
(
'--multinomial'
,
type
=
str
,
help
=
"multinomial output name"
,
default
=
None
)
availableOptions
.
add_argument
(
'--msd'
,
type
=
str
,
availableOptions
.
add_argument
(
'--msd'
,
type
=
str
,
action
=
"append"
,
nargs
=
2
,
help
=
"msd output name"
,
default
=
None
)
availableOptions
.
add_argument
(
'--fna_infos'
,
type
=
str
,
help
=
"fna_infos output name"
,
default
=
None
)
...
...
@@ -144,8 +144,14 @@ if args.tdg09 :
df_tdg09
=
pd
.
read_csv
(
args
.
tdg09
,
sep
=
"
\t
"
)
if
args
.
msd
:
df_msd
=
pd
.
read_csv
(
args
.
msd
,
sep
=
"
\t
"
)
df_msd
.
rename
(
columns
=
{
'1MinusP'
:
'Msd_1MinusP'
},
inplace
=
True
)
print
(
args
.
msd
)
df_msd_l
=
[]
for
(
e
,
f
)
in
args
.
msd
:
df_msd_tmp
=
pd
.
read_csv
(
f
,
sep
=
"
\t
"
)
df_msd_tmp
.
rename
(
columns
=
{
'1MinusP'
:
'Msd_%s_1MinusP'
%
(
e
[
0
:
4
])},
inplace
=
True
)
df_msd_l
.
append
(
df_msd_tmp
)
df_msd
=
reduce
(
lambda
x
,
y
:
pd
.
merge
(
x
,
y
,
on
=
'Sites'
,
how
=
'outer'
),
df_msd_l
)
if
args
.
multinomial
:
df_multinomial
=
pd
.
read_csv
(
args
.
multinomial
,
sep
=
"
\t
"
)
...
...
lib/scripts/plot_sens_spe_all_trees.R
View file @
f23e90fe
...
...
@@ -46,7 +46,7 @@ files_df_ok = data.frame(files= paste0(input_dir,"/",files), tree = gsub(".tsv",
}
else
{
stop
(
"ERROR no input files"
)
}
condensed_meths
=
c
(
"PCOC"
,
"Diffsel_mean"
,
"Identical_LG08"
,
"Mutinomial_1MinusLRT"
,
"Tdg09_1MinusFDR"
,
"Msd_1MinusP"
,
"Topological_LG08"
)
condensed_meths
=
c
(
"PCOC"
,
"Diffsel_mean"
,
"Identical_LG08"
,
"Mutinomial_1MinusLRT"
,
"Tdg09_1MinusFDR"
,
"Msd_1MinusP"
,
"
Msd_0.01_1MinusP"
,
"Msd_0.05_1MinusP"
,
"Msd_0.10_1MinusP"
,
"Msd_0.50_1MinusP"
,
"Msd_1.00_1MinusP"
,
"
Topological_LG08"
)
read_dir
=
function
(
x
)
{
file
=
x
[
"files"
]
...
...
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