<p>I was wondering if there is something I am doing wrong when trying to
calculate True positive rate, TPR with your function
this is what I am doing:</p>

<pre><code>&gt; head(qq)
    chr   pos    gene_id       pval_nominal pval_ret  META
1: chr1 54490 ENSG00000227232     0.608495 0.783778 0.7733204
2: chr1 58814 ENSG00000227232     0.295211 0.897582 0.6970567
3: chr1 60351 ENSG00000227232     0.439788 0.867959 0.7525581
4: chr1 61920 ENSG00000227232     0.319528 0.601809 0.4407018
5: chr1 63671 ENSG00000227232     0.237739 0.988039 0.8626555
6: chr1 64931 ENSG00000227232     0.276679 0.907037 0.6971364

library(qvalue)
pvals=qq<span class="math-container">$META
qval_obj=qvalue(pvals) #is false discovery rate
pi1=1-qval_obj$</span>pi0 #TPR
&gt; pi1
[1] 0.08827036
</code></pre>

<p>It is very unlikely that TPR would be this small, can you please advise?</p>

<p>I do have 59981 META p values in this data frame.</p>

<p>IS here pi1 representing TPR value?</p>

CC BY-SA 4.0
2019-10-29T20:03:32.860Z
TPR = TP / (TP + FN), where TP = true positive, FN = false negative. You don't know whether a gene is a true positive or false negative. Do not confuse the terms. pi0 is the probability that the result comes from a null hypothesis. For differential gene expression, In simple terms, it means the proportion of genes that are not differentially expressed.
StupidWolf
CC BY-SA 4.0
2019-10-29T20:06:40.687Z
You can briefly check out pi0 here, where the qvalue package is based on (http://genomics.princeton.edu/storeylab/papers/directfdr.pdf). When doing FDR, if you use Benjamini-Hochberg, pi0 is assumed to be 1. The "qvalue" method estimates pi0 from the data and uses it estimate FDR.
StupidWolf
<r>
Calculating True Positive Rate with qvalue function
# Calculating True Positive Rate with qvalue function

(Asked by: username_0 on 2019-10-29)

I was wondering if there is something I am doing wrong when trying to
calculate True positive rate, TPR with your function
this is what I am doing:
> head(qq)
    chr   pos    gene_id       pval_nominal pval_ret  META
1: chr1 54490 ENSG00000227232     0.608495 0.783778 0.7733204
2: chr1 58814 ENSG00000227232     0.295211 0.897582 0.6970567
3: chr1 60351 ENSG00000227232     0.439788 0.867959 0.7525581
4: chr1 61920 ENSG00000227232     0.319528 0.601809 0.4407018
5: chr1 63671 ENSG00000227232     0.237739 0.988039 0.8626555
6: chr1 64931 ENSG00000227232     0.276679 0.907037 0.6971364

library(qvalue)
pvals=qq$META
qval_obj=qvalue(pvals) #is false discovery rate
pi1=1-qval_obj$pi0 #TPR
> pi1
[1] 0.08827036

It is very unlikely that TPR would be this small, can you please advise?
I do have 59981 META p values in this data frame.
IS here pi1 representing TPR value?

**Tags:** r
> **Comments:**
> **username_1**: TPR = TP / (TP + FN), where TP = true positive, FN = false negative. You don't know whether a gene is a true positive or false negative. Do not confuse the terms. pi0 is the probability that the result comes from a null hypothesis. For differential gene expression, In simple terms, it means the proportion of genes that are not differentially expressed.  
> **username_1**: You can briefly check out pi0 here, where the qvalue package is based on (http://genomics.princeton.edu/storeylab/papers/directfdr.pdf). When doing FDR, if you use Benjamini-Hochberg, pi0 is assumed to be 1. The "qvalue" method estimates pi0 from the data and uses it estimate FDR.  

---

## 0 answers

