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
89eb09e8
Commit
89eb09e8
authored
Sep 05, 2018
by
Carine Rey
Browse files
add plot dist
parent
b99a314e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
lib/scripts/calc_t_per_meth.R
lib/scripts/calc_t_per_meth.R
+14
-12
No files found.
lib/scripts/calc_t_per_meth.R
View file @
89eb09e8
...
...
@@ -302,7 +302,7 @@ 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"
)[
1
:
nb_c
],
c
(
"#7F7F7F"
,
"#ADD8E6"
))
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"
)
if
(
!
is.null
(
meths
))
{
...
...
@@ -587,8 +587,7 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
limitsize
=
FALSE
)
if
(
all
((
df_out_melt
)
%in%
c
(
"P_JSD"
,
"P_ED"
,
"C1"
,
"C2"
,
"entropy_C1"
,
"entropy_C2"
))){
if
(
all
(
c
(
"P_JSD"
,
"P_ED"
,
"C1"
,
"C2"
,
"entropy_C1"
,
"entropy_C2"
)
%in%
colnames
(
df_d
))){
print
(
"plot value/distance"
)
...
...
@@ -672,17 +671,20 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
limitsize
=
FALSE
)
#plot = plot_grid(plot_recall_precision,plot_max_MCC,plot_value_JSD,plot_value_ED,plot_entropy_C2_C1,plot_entropy_C1,plot_entropy_C2,
# labels = c("A", "B","C","D","E","F"),
# rel_heights = c(length(unique(df_out$couple))*0.8,3,length(unique(df_out$couple))*0.8,length(unique(df_out$couple))*0.8,length(unique(df_out$couple))*0.8,length(unique(df_out$couple))*0.8,length(unique(df_out$couple))*0.8),
# nrow=7
# )
}
plot
=
plot_grid
(
plot_recall_precision
,
plot_recall_precision_papier
,
plot_max_MCC
,
plot_FPR
,
plot_FPR2
,
labels
=
c
(
"A"
,
"A'"
,
"B"
,
"B'"
,
"B''"
),
rel_heights
=
c
(
length
(
unique
(
df_out
$
couple
))
*
0.8
,
2
,
4
,
2
,
2
),
nrow
=
5
plot
=
plot_grid
(
plot_recall_precision
,
plot_max_MCC
,
plot_value_JSD
,
plot_value_ED
,
plot_entropy_C2_C1
,
plot_entropy_C1
,
plot_entropy_C2
,
labels
=
c
(
"A"
,
"B"
,
"C"
,
"D"
,
"E"
,
"F"
),
rel_heights
=
c
(
length
(
unique
(
df_out
$
couple
))
*
0.8
,
3
,
length
(
unique
(
df_out
$
couple
))
*
0.8
,
length
(
unique
(
df_out
$
couple
))
*
0.8
,
length
(
unique
(
df_out
$
couple
))
*
0.8
,
length
(
unique
(
df_out
$
couple
))
*
0.8
,
length
(
unique
(
df_out
$
couple
))
*
0.8
),
nrow
=
7
)
#plot = plot_grid(plot_recall_precision,plot_recall_precision_papier,plot_max_MCC,plot_FPR,plot_FPR2,
# labels = c("A", "A'", "B","B'","B''"),
# rel_heights = c(length(unique(df_out$couple))*0.8,2,4,2,2),
# nrow=5
# )
save_plot
(
paste0
(
opt
$
out
,
suffix
,
".pdf"
),
plot
,
...
...
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