<ol>
<li>The <span class="math-container">$log(CPM)$</span> of any low-moderately expressed gene will be negative. There is nothing unexpected there.</li>
<li>Your statistics are inappropriate for a variety of reasons. Firstly, a CPM is not a robust value that's comparable between samples (this is why CPMs aren't used for statistics). <code>edgeR</code> performs more appropriate normalization and incorporates that into its model. Secondly, though you have a fair number of replicates, edgeR is pooling information from all of the genes to better estimate the variance.</li>
</ol>

<p>I encourage you to <a href="https://www.ncbi.nlm.nih.gov/pubmed/17881408" rel="nofollow noreferrer">read the edgeR paper</a> and likely that of Limma too.</p>

CC BY-SA 4.0
2018-11-30T08:59:12.917Z
So, if I want to show boxplot of OIT3 gene. I should use only log2CPM on y-axis but should not calculate t-test with that. So, now In the above plot I should remove t-test pvalue and keep it is significant based on FC >2 and FDR < 0.05. Am I right?
beginner
CC BY-SA 4.0
2018-11-30T12:12:54.187Z
If you want to show a boxplot you should use normalized counts.
Devon Ryan
CC BY-SA 4.0
2018-11-30T12:54:55.640Z
Ok thanq very much for the answer. With edgeR how to get normalized counts?
beginner
CC BY-SA 4.0
2018-11-29T21:48:11.130Z
2018-11-29T21:48:11.130Z
Devon Ryan
<p>There is no reason your t-test should reproduce edgeR. In fact, edgeR exists because t-test is inappropriate.</p>

<p>edgeR does the tests by pooling information from all genes, because with the low number of replicates your t-test doesn't give sufficient statistical power.</p>

<p>What you need to do is: <em>check visually your gene and make a decision yourself based on graphical results and edgeR results if your gene shows biologically significant</em>.</p>

CC BY-SA 4.0
2018-11-30T08:59:22.757Z
So, if I want to show boxplot of OIT3 gene. I should use only log2CPM on y-axis but should not calculate t-test with that. So, now In the above plot I should remove t-test pvalue and keep it is significant based on FC >2 and FDR < 0.05. Am I right?
beginner
CC BY-SA 4.0
2018-11-30T03:42:18.480Z
2018-11-30T03:42:18.480Z
SmallChess
<p>I have RNA-Seq data for LUNG cancer. 370 tumor and 50 Normal. For differential analysis initially I did some filtering and kept approx. 19k genes for further analysis. I used edgeR.</p>

<p>With a FC > or &lt; 2 and FDR &lt; 0.05<br>
<code>tr &lt;- glmTreat(fit, contrast=contrast.matrix, lfc = log2(2))</code><br>
I got approx 3000 differentially expressed genes. </p>

<p>Among the 3000 differentially expressed genes I'm interested in a gene <code>OIT3</code>.</p>

<pre><code>GeneSymbol  logFC    unshrunk.logFC   logCPM          PValue      FDR
  OIT3  2.156487448  2.171599487    -0.437234244    0.000701037 0.005304312
</code></pre>

<p>I see the above gene <code>OIT3</code> is Upregulated. Why I see logCPM with negative value?</p>

<p>And I plotted the logCPM expression of the above gene and did a t-test which gave pvalue 0.1 which means not significant.</p>

<p><a href="https://i.sstatic.net/RKxhR.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/RKxhR.png" alt="Boxplot showing OIT3 logCPM expression"></a></p>

<p>1) I see the gene is differentially expressed with Differential analysis using edgeR. Why I see logCPM with negative value?</p>

<p>2) With t-test why it is not significant?</p>

CC BY-SA 4.0
2018-11-29T16:29:38.790Z
What is your design model and what is your contrast? It would help to clarify what is going on
llrs
CC BY-SA 4.0
2018-11-29T18:32:15.660Z
If a t-test gave the same results as the more sophisticated software, why would anyone use the sophisticated stuff?  At first glance, logging your data is going to knock down those high outliers, and I bet edgeR is using a normalization of raw counts, not logged ones.
swbarnes2
<r><rna-seq><rna><cancer><gene-expression>
Why the t-test for a specific gene shows different value compared to differential analysis?
# Why the t-test for a specific gene shows different value compared to differential analysis?

(Asked by: username_0 on 2018-11-29)

I have RNA-Seq data for LUNG cancer. 370 tumor and 50 Normal. For differential analysis initially I did some filtering and kept approx. 19k genes for further analysis. I used edgeR.
With a FC > or < 2 and FDR < 0.05
tr <- glmTreat(fit, contrast=contrast.matrix, lfc = log2(2))
I got approx 3000 differentially expressed genes. 
Among the 3000 differentially expressed genes I'm interested in a gene OIT3.
GeneSymbol  logFC    unshrunk.logFC   logCPM          PValue      FDR
  OIT3  2.156487448  2.171599487    -0.437234244    0.000701037 0.005304312

I see the above gene OIT3 is Upregulated. Why I see logCPM with negative value?
And I plotted the logCPM expression of the above gene and did a t-test which gave pvalue 0.1 which means not significant.

1) I see the gene is differentially expressed with Differential analysis using edgeR. Why I see logCPM with negative value?
2) With t-test why it is not significant?

**Tags:** r, rna-seq, rna, cancer, gene-expression
> **Comments:**
> **username_1**: What is your design model and what is your contrast? It would help to clarify what is going on  
> **username_2**: If a t-test gave the same results as the more sophisticated software, why would anyone use the sophisticated stuff?  At first glance, logging your data is going to knock down those high outliers, and I bet edgeR is using a normalization of raw counts, not logged ones.  

---

## 2 answers

### Answer by username_3 on 2018-11-29. Score: 3 | Accepted answer

1. The $log(CPM)$ of any low-moderately expressed gene will be negative. There is nothing unexpected there.
2. Your statistics are inappropriate for a variety of reasons. Firstly, a CPM is not a robust value that's comparable between samples (this is why CPMs aren't used for statistics). `edgeR` performs more appropriate normalization and incorporates that into its model. Secondly, though you have a fair number of replicates, edgeR is pooling information from all of the genes to better estimate the variance.

I encourage you to [read the edgeR paper](https://www.ncbi.nlm.nih.gov/pubmed/17881408) and likely that of Limma too.

> **Comments:**
> **username_0**: So, if I want to show boxplot of OIT3 gene. I should use only log2CPM on y-axis but should not calculate t-test with that. So, now In the above plot I should remove t-test pvalue and keep it is significant based on FC >2 and FDR < 0.05. Am I right?  
> **username_3**: If you want to show a boxplot you should use normalized counts.  
> **username_0**: Ok thanq very much for the answer. With edgeR how to get normalized counts?  

---

### Answer by username_4 on 2018-11-30. Score: 4

There is no reason your t-test should reproduce edgeR. In fact, edgeR exists because t-test is inappropriate.

edgeR does the tests by pooling information from all genes, because with the low number of replicates your t-test doesn't give sufficient statistical power.

What you need to do is: *check visually your gene and make a decision yourself based on graphical results and edgeR results if your gene shows biologically significant*.

> **Comments:**
> **username_0**: So, if I want to show boxplot of OIT3 gene. I should use only log2CPM on y-axis but should not calculate t-test with that. So, now In the above plot I should remove t-test pvalue and keep it is significant based on FC >2 and FDR < 0.05. Am I right?  

---

