calc.otr {metaseqR} | R Documentation |
This function calculates the ratio of True Positives to the sum of False Positives and False Negatives given a matrix of p-values (one for each statistical test used) and a vector of ground truth (DE or non-DE). This function serves as a method evaluation helper.
calc.otr(truth, p, sig = 0.05)
truth |
the ground truth differential
expression vector. It should contain only
zero and non-zero elements, with zero denoting
non-differentially expressed genes and non-zero,
differentially expressed genes. Such a vector
can be obtained for example by using the
|
p |
a p-value matrix whose rows correspond
to each element in the |
sig |
a significance level (0 < |
A named list with two members. The first member is a data frame with the numbers used to calculate the TP/(FP+FN) ratio and the second member is the ratio TP/(FP+FN) for each statistical test.
Panagiotis Moulos
p1 <- 0.001*matrix(runif(300),100,3) p2 <- matrix(runif(300),100,3) p <- rbind(p1,p2) rownames(p) <- paste("gene",1:200,sep="_") colnames(p) <- paste("method",1:3,sep="_") truth <- c(rep(1,40),rep(-1,40),rep(0,20),rep(1,10), rep(2,10),rep(0,80)) names(truth) <- rownames(p) otr <- calc.otr(truth,p)