Or rather, precision-recall curve.
%revisions -s -n 10
%cd ~/GIT/github/mvarbvs/dsc
Workflow is implemented in the roc
section of this notebook. We focus on PIP > 0.3.
colors = c('#348ABD', '#7A68A6', '#A60628', '#467821', '#FF0000', '#188487', '#E2A233',
'#A9A9A9', '#000000', '#FF00FF', '#FFD700', '#ADFF2F', '#00FFFF')
For causal from 1 to 5.
d1 = readRDS('susie_comparison/ROC_0622_estvar_true_two.rds')
d2 = readRDS('susie_comparison/ROC_0622_estvar_false_two.rds')
png("susie_comparison/ROC_0622_F1.png", 6, 6, units = 'in', res = 500)
plot(d1$susie$rates$Precision ~ d1$susie$rates$Recall, t="l",
col=colors[1], ylab = "Precision", xlab ="Recall", main = "Num. causal 1 to 5 pooled")
lines(d2$susie$rates$Precision ~ d2$susie$rates$Recall, col=colors[2])
lines(d1$dap$rates$Precision ~ d1$dap$rates$Recall, col=colors[3])
legend("bottomleft", legend=c("SuSiE (est_var)", "SuSiE (var(Y)))", "DAP-G"),
col=colors[1:3], lty=c(1,1,1), cex=0.8)
dev.off()
%preview susie_comparison/ROC_0622_F1.png
d3 = readRDS('susie_comparison/ROC_0622_estvar_true_all.rds')
d4 = readRDS('susie_comparison/ROC_0622_estvar_false_all.rds')
png("susie_comparison/ROC_0622_F2.png", 6, 6, units = 'in', res = 500)
plot(d3$susie$rates$Precision ~ d3$susie$rates$Recall, t="l",
col=colors[1], ylab = "Precision", xlab ="Recall",
main = "Num. causal 1 to 3 pooled")
lines(d3$dap$rates$Precision ~ d3$dap$rates$Recall,col=colors[3])
lines(d3$caviar$rates$Precision ~ d3$caviar$rates$Recall,col=colors[4])
lines(d3$finemap$rates$Precision ~ d3$finemap$rates$Recall,col=colors[7])
legend("bottomleft", legend=c("SuSiE", "DAP-G", "CAVIAR", "FINEMAP"),
col=c(colors[1], colors[3], colors[4], colors[7]), lty=c(1,1,1), cex=0.8)
dev.off()
%preview susie_comparison/ROC_0622_F2.png
convert +append susie_comparison/ROC_0622_F1.png susie_comparison/ROC_0622_F2.png susie_comparison/ROC_0622.png
%preview susie_comparison/ROC_0622.png
$Precision=\frac{TP}{TP+FP}$ which is $1-FDR$. $Recall = \frac{TP}{TP+FN}$ aka sensitivity.
png("susie_comparison/ROC_0622_F3.png", 6, 6, units = 'in', res = 500)
plot(1 - d1$susie$rates$Precision, d1$susie$rates$Recall, t="l",
col=colors[1], ylab = "Power", xlab ="FDR", main = "Num. causal 1 to 5 pooled")
lines(1 - d2$susie$rates$Precision, d2$susie$rates$Recall, col=colors[2])
lines(1 - d1$dap$rates$Precision, d1$dap$rates$Recall, col=colors[3])
legend("bottomright", legend=c("SuSiE (est_var)", "SuSiE (var(Y)))", "DAP-G"),
col=colors[1:3], lty=c(1,1,1), cex=0.8)
dev.off()
%preview susie_comparison/ROC_0622_F3.png
png("susie_comparison/ROC_0622_F4.png", 6, 6, units = 'in', res = 500)
plot(1 - d3$susie$rates$Precision, d3$susie$rates$Recall, t="l",
col=colors[1], ylab = "Power", xlab ="FDR",
main = "Num. causal 1 to 3 pooled")
lines(1 - d3$dap$rates$Precision, d3$dap$rates$Recall,col=colors[3])
lines(1 - d3$caviar$rates$Precision, d3$caviar$rates$Recall,col=colors[4])
lines(1 - d3$finemap$rates$Precision, d3$finemap$rates$Recall,col=colors[7])
legend("bottomright", legend=c("SuSiE", "DAP-G", "CAVIAR", "FINEMAP"),
col=c(colors[1], colors[3], colors[4], colors[7]), lty=c(1,1,1), cex=0.8)
dev.off()
%preview susie_comparison/ROC_0622_F4.png
convert +append susie_comparison/ROC_0622_F3.png susie_comparison/ROC_0622_F4.png susie_comparison/ROC_0622_FDR.png
%preview susie_comparison/ROC_0622_FDR.png