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
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
VEBER Philippe
codepi
Commits
bbdeaa4b
Commit
bbdeaa4b
authored
Sep 11, 2018
by
Carine Rey
Browse files
fix error if preview
parent
0009f51e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
lib/scripts/calc_t_per_meth.R
lib/scripts/calc_t_per_meth.R
+18
-5
No files found.
lib/scripts/calc_t_per_meth.R
View file @
bbdeaa4b
...
...
@@ -405,7 +405,20 @@ df_auc = subset(df_auc, methode %in% condensed_meths)
df_auc
$
auc_rank
=
unlist
(
tapply
(
df_auc
$
auc
,
df_auc
$
couple
,
function
(
x
){
rank
(
-
x
)}))
df_auc
$
auc2_rank
=
unlist
(
tapply
(
df_auc
$
auc2
,
df_auc
$
couple
,
function
(
x
){
rank
(
-
x
)}))
df_auc
$
best_R_90_P_rank
=
unlist
(
tapply
(
df_auc
$
best_R_90_P
,
df_auc
$
couple
,
function
(
x
){
rank
(
-
x
)}))
print
(
df_auc
)
df_auc
$
string_auc
=
paste0
(
df_auc
$
auc_rank
,
" ("
,
round
(
df_auc
$
auc
,
3
),
")"
)
df_auc
$
string_auc2
=
paste0
(
df_auc
$
auc_rank
,
" ("
,
round
(
df_auc
$
auc2
,
3
),
")"
)
df_auc
$
string_best_R_90_P
=
paste0
(
df_auc
$
best_R_90_P_rank
,
" ("
,
round
(
df_auc
$
best_R_90_P
,
3
),
")"
)
df_only_auc
=
dcast
(
df_auc
,
methode
~
couple
,
value.var
=
"string_auc"
)
colnames
(
df_only_auc
)[
1
]
=
"methode\auc"
df_only_auc2
=
dcast
(
df_auc
,
methode
~
couple
,
value.var
=
"string_auc2"
)
colnames
(
df_only_auc2
)[
1
]
=
"methode\auc2"
df_only_string_best_R_90_P
=
dcast
(
df_auc
,
methode
~
couple
,
value.var
=
"string_best_R_90_P"
)
colnames
(
df_only_string_best_R_90_P
)[
1
]
=
"methode\best_R_90_P"
print
(
df_only_auc
)
########################################################################
...
...
@@ -471,7 +484,7 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
)
print
(
"plot recall_precision"
)
if
(
length
(
meths
)
<=
9
)
{
if
(
length
(
meths
)
<=
9
&
all
(
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"
)
%in%
df_out
$
couple
)
)
{
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
()
...
...
@@ -862,8 +875,8 @@ 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_
auc
,
file
=
paste0
(
opt
$
out
,
".auc_condensed.tsv"
),
row.names
=
FALSE
,
quote
=
F
,
sep
=
"\t"
)
write.table
(
df_
only_auc2
,
append
=
FALSE
,
file
=
paste0
(
opt
$
out
,
".auc
_condensed
.tsv"
),
row.names
=
FALSE
,
quote
=
F
,
sep
=
"\t"
)
write.table
(
df_only_auc
,
append
=
T
,
file
=
paste0
(
opt
$
out
,
".auc_condensed.tsv"
),
row.names
=
FALSE
,
quote
=
F
,
sep
=
"\t"
)
write.table
(
df_
only_string_best_R_90_P
,
append
=
T
,
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"
)
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