-
Notifications
You must be signed in to change notification settings - Fork 7
/
validation_rate.R
10 lines (10 loc) · 1 KB
/
validation_rate.R
1
2
3
4
5
6
7
8
9
10
load(file.path(path.diagrams, "Biomarkers_uhn_status.RData"), verbose=TRUE)
load(file.path(path.data, "PSets/GRAY_isoforms.RData"), verbose=TRUE)
xx <- names(biomarkers)#c("AZD6244","Erlotinib", "lapatinib", "paclitaxel")
cells <- sapply(xx, function(x){length(which(GRAY@sensitivity$info$drugid == x))})
training <- sapply(xx, function(x){table(biomarkers[[x]]$type)["isoform"]})
prevalidation<- sapply(xx, function(x){length(which(biomarkers[[x]]$type =="isoform" & biomarkers[[x]]$validation.stat == "validated"))})
finvalidation <- sapply(xx, function(x){length(which(biomarkers[[x]]$UHN.pvalue < 0.1 & !is.na(biomarkers[[x]]$UHN.pvalue)))})
finvalidation <- gsub("0", "-", finvalidation)
dd <- cbind("Compound" = names(biomarkers), "Cell lines"=cells , "Training"=training, "Pre-validation"=prevalidation, "Final Validation"=finvalidation)
xtable::print.xtable(xtable::xtable(dd, digits=0), include.rownames=FALSE, floating=FALSE, table.placement="!h", file=file.path(path.diagrams, "validation_rate.tex"), append=FALSE)