# Why the t-test for a specific gene shows different value compared to differential analysis?

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?

• What is your design model and what is your contrast? It would help to clarify what is going on – llrs Nov 29 '18 at 16:29
• 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 Nov 29 '18 at 18:32

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 and likely that of Limma too.

• 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 Nov 30 '18 at 8:59
• If you want to show a boxplot you should use normalized counts. – Devon Ryan Nov 30 '18 at 12:12
• Ok thanq very much for the answer. With edgeR how to get normalized counts? – beginner Nov 30 '18 at 12:54

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.

• 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 Nov 30 '18 at 8:59