Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit 3062eefd authored by Carine Rey's avatar Carine Rey
Browse files

new plots

parent 41678e0c
......@@ -387,8 +387,46 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
)
} else {
plot_recall_precision_papier = NULL
}
}
print("plot FPR")
x_labs = "Threshold"
y_labs = "FP Rate (1 -Spe)"
df_out_melt2 = subset(df_out_melt,couple%in%c("H0/HaPC NeG5", "H0/HaPC NeG5_NeC_div2" , "H0/HaPC NeG5_NeC_x2"))
df_out_melt2$couple = gsub("/HaPC ","",df_out_melt2$couple)
df_out_melt2 = subset(df_out_melt2, variable == "specificity")
df_out_melt2$FPR = 1 - df_out_melt2$value
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)
plot = ggplot(df_out_melt2, aes(x=threshold, y=FPR, col=couple))
plot = plot + theme_bw()
plot = plot + theme(legend.position="top",
legend.background = element_rect(fill="white", size=0.5, linetype="solid", colour ="black")) +
guides(colour = guide_legend(override.aes = list(alpha = 1), nrow=2))
plot = plot + guides(fill=FALSE) + theme(legend.position="top")
plot = plot + labs(x=x_labs, y=y_labs)
plot = plot + ylim(c(0,1)) + xlim(c(0,1))
plot = plot + geom_step(size=1, alpha=alpha)
plot = plot + scale_color_manual(values=colors)
plot = plot + geom_vline( data = df_recall_sup09_per_meth2 , aes(xintercept = threshold, col=couple), size = 0.5, show.legend = NA,linetype="dashed")
plot = plot + facet_grid(. ~ methode, scales="free")
plot = plot + theme(axis.text.x = element_text(angle = 45, hjust = 1))
plot_FPR = plot
save_plot(paste0(opt$out,suffix,".FPR.pdf"),
plot_FPR,
ncol = 0.4 * length(unique(df_out_melt$methode)),
nrow = 1,
base_aspect_ratio = 1.5,
limitsize = FALSE
)
print("plot per indicator")
x_labs = "Threshold"
......@@ -508,16 +546,16 @@ plot_out = function(df_out, df_d , df_recall_sup09_per_meth, meths = NULL, suffi
# nrow=7
# )
plot = plot_grid(plot_recall_precision,plot_recall_precision_papier,plot_max_MCC,
labels = c("A", "A'", "B"),
rel_heights = c(length(unique(df_out$couple))*0.8,2,4),
nrow=3
plot = plot_grid(plot_recall_precision,plot_recall_precision_papier,plot_max_MCC,plot_FPR,
labels = c("A", "A'", "B","B'"),
rel_heights = c(length(unique(df_out$couple))*0.8,2,4,2),
nrow=4
)
save_plot(paste0(opt$out,suffix,".pdf"),
plot,
ncol = 0.4* length(unique(df_out_melt$methode)),
nrow = length(unique(df_out$couple)) * 0.5 + 1 + 1 ,
nrow = length(unique(df_out$couple)) * 0.5 + 1 + 1 +1 ,
base_aspect_ratio = 1,
limitsize = FALSE
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment