Hi All,
I am facing problem while calculating AUC using pROC package (R/Bioconductor) . My data consists of 21 samples (nrow) of which 13 disease and 8 control ~34500 Column of Probe_ID
(affy_Id
s).
My Goal is to calculate AUC of each Probe_Id(genes) using Disease V/s Column. i.e AUC fo individual genes.
I have processed the file and used the following code
install.packages("pROC")
library(pROC)
auc_ci_results <-sapply(3:ncol(res),function(i){roc(as.factor(res$X.Status.),as.numeric(res[,i]),auc=T,ci=T)})
write.table(auc_ci_results,file="auc_ci_only.txt",row.names=T, sep="\t")
Please Note: res
is my matrix of 22 Rows and 34500 Cols It looks like:
Sample Status Probe_ID 1
"GSM333437" Disease -0.53953211
"GSM333436" Control -0.3076905
"GSM333450" Disease -0.41491226
(I have 34500 columns like this, each column is a Probe id)
When I executed the code above, I got the following output:
AUC 0.682692307692308 0.413461538461538 0.759615384615385 0.615384615384615 0.826923076923077 0.740384615384615
CI c(0.44468236738601, c(0.52852770916173, c(0.44468236738601, c(0.617953423075478, c(0.617953423075478, c(0.617953423075478,
0.682692307692308, 0.759615384615385, 0.682692307692308, 0.826923076923077 0.826923076923077, 0.826923076923077,
0.920702247998605) 0.990703060069039) 0.920702247998605) 1) 1) 1)
I got 7 AUC values.
Requirement: I need individual AUC values for each GENES.
Please help me out, I tried all possible ways to solve, but failed. Please let me know where I am going wrong.
Thanks a lot, your help means a lot to me,
Thanks in advance
-Ateeq