Question: how DESeq calculates p-value ?
0
gravatar for Giard
3.3 years ago by
Giard10
france
Giard10 wrote:

Hi everyone,

I am in a basic level of statistics and using DESeq package for RNA-seq. I don't understand how DESeq calculates p-value exactly. If we simplify statistics, for two sample mean comparison we either use z-test or t-test, right? 

How about in DESeq? 

In DESeq paper : 

                 H°: qiA = qiB    means   Hª: qiA != qiB   

So: 

                KiA = sum(Kij) , KiB = sum(Kij)

Finally,

                Pi  =  sum p(a,b) / sum p(a,b)     //sorry I couldn't write the notations well as there is no enough options here. 

1- So please someone can explain how this can be calculated? 

2- Does DESeq use Negative Binomial to estimate Mean and Varience then plug these two in t-test to calculate p-value? 

Thanks for any useful info. Through your answers, we can discuss it more. 

Yours,

Giard

 

 

ADD COMMENTlink modified 3.3 years ago by Ryan C. Thompson7.3k • written 3.3 years ago by Giard10

This is just a DESeq question so I'm removing the DESeq2 tag.

ADD REPLYlink written 3.3 years ago by Michael Love23k

I wonder if DESeq2 changed p-value computation compared to DESeq? 

If it is changed, how DESeq2 does it then? Because after all we will be used the latest which is DESeq2. 

ADD REPLYlink written 3.3 years ago by Giard10

By default it will perform a wald test

ADD REPLYlink written 3.3 years ago by Steve Lianoglou12k
1

I really don't get it. thousands of researchers using and asking about expression analysis and DESeq while no one can give a proper explanation on basic questions. 

@ at least thanks for those above who tried to say some. 

ADD REPLYlink written 3.3 years ago by Giard10
2

I don't understand why you sound so upset.

As Steve pointed out, the p value calculation in DESeq2 is entirely different from the one described in the 2010 paper on DESeq-1.

Hence, I am hesitant spending time writing an answer to your question if you are not interested in it anyway, as you have stated yourself, above.

I assume that you have just mistakenly read the wrong paper, i.e., spend time trying to understand our 2010 Genome Biology paper, when you should have been reading our 2015 Genome Biology paper. Please read it and come back if you have questions.

And if you really need to know about DESeq-1, please ask again.

 

ADD REPLYlink written 3.3 years ago by Simon Anders3.5k

Thanks Simon, I don't have a right to be upset as I am one of those looking for help NOT bossing around :)

As I am new into this and watched some tutorials as well as starting with DESeq-1, that is why I am so willing to understand it first then go to DESeq-2. 

To state it again, in addition to the main question, I am trying to see how P-value calculated when we have(estimated) Mean and Variance from the data? as I gave an example above that for newbie statistics, one can calculate p-value by having Mean and Variance. So what and how was used here in DESeq-1 to calculate that p-value? 

Appreciated

ADD REPLYlink written 3.3 years ago by Giard10
1

Calculating a p-value does not always involve calculating a mean and variance, and a mean and variance estimated from the data are certainly not sufficient to calculate a p-value, especially in the case of RNA-seq read counts, which are not normally distributed. Calculating a p-value involves calculating a test statistic from the data and then comparing it to the distribution of that statistic under the null hypothesis. Specifically, you want to find the "tail probability", i.e. the probability that the null distribution is at least as extreme as the observed test statistic. This means that any method that provides a test statistic and a null distribution to compare it against can be used to obtain a p-value. The DESeq 1 paper describes one such method. However, as other have advised, DESeq2 doesn't really build on the methods of DESeq 1, so understanding DESeq 1 is not much of a stepping stone to DESeq2. The DESeq2 paper and manual together provide an excellent and self-contained description of the DESeq2 method, and would be a good starting point. If you have some more time, I would recommend introducing yourself to linear models, then reading about the limma package (which is based on linear models with some genomics-specific tweaks), and then reading the latest papers about DESeq2 and edgeR, which are two similar methods, both based on generalized linear models.

Basically, the only reason to use DESeq 1 now that DESeq2 is available is if you already did some analysis with DESeq 1 and therefore have to continue your analysis with it for the sake of consistency (e.g. being able to compare results to a previous experiment).

ADD REPLYlink written 3.3 years ago by Ryan C. Thompson7.3k

Thanks. I would definitely follow your suggested topics. But I'd like to take the chance and asking a couple of more questions related, please: 

1- You mentioned that estimated Mean and Variance are not used to calculate p-value, then why are they estimated in the first place if they are not plugged(used) in the test statistics for p-value calculation(testing differential expression)? namely, If count reads and condition replicates not used for this, then what are used in test statistics and p-value? 

Note: I think Mean and Variance were used to model Negative Binomial Distribution. And what is the benefit of modelling NB if not used in differential expression testing, don't know. 

2- Examples of test statistics used to whether to reject Null hypothesis(finding p-value) are t-statistics, z-statistics, chi-square,...etc. Which test statistics used here in DESeq-1 then? 

 

ADD REPLYlink written 3.3 years ago by Giard10

1. I said that not all p-value calculations involve a mean and variance, and that an estimated mean and variance by themselves are never sufficient by themselves to calculate a p-value. I didn't say that estimated mean and variance were never used for calculating p-values. I didn't go into the details of the DESeq 1 calculation, but its calculations do involve the mean and variance of the estimated negative binomial distribution (although the NB is typically described in terms of dispersion instead of variance, where variance = mean + dispersion * mean^2). Regardless, there are quite a few steps in between estimating the distributional parameters and calculating the p-value, so the p-value is not calculated directly from the mean and variance.

2. DESeq 1 doesn't use any of those test statistics. It defines a custom test statistic designed specifically for RNA-seq count data, and the paper fully describes all the properties of this statistic required to perform differential expression testing. This is one reason you probably shouldn't start your learning with DESeq 1. limma is probably the easiest to understand. For RNA-seq, all the cleverness of limma goes into the variance estimation, and the test statistic is just a t-statistic (or F-statistic). edgeR and DESeq2 can both use a likelihood ratio test, which has an (asymtotically) chi-square test statistic. (They both also have other tests as well, but the LRT is probably the most well-known one.)

ADD REPLYlink written 3.3 years ago by Ryan C. Thompson7.3k

Thanks for that. Time to start my journey toward limma and DESeq-2. 

 

 

ADD REPLYlink modified 3.3 years ago • written 3.3 years ago by Giard10

I think the question is good and justified for the p value calculation in DESeq-1. In the paper from 2010 and in the supplementary 1 section D it is very hard to understand how do you get the p value of your DE-test. Its not really clear how you get all the values in the example. So its could be interesting also for me , how it work....

ADD REPLYlink written 12 months ago by xd_d0
Answer: how DESeq calculates p-value ?
0
gravatar for Ryan C. Thompson
3.3 years ago by
The Scripps Research Institute, La Jolla, CA
Ryan C. Thompson7.3k wrote:

If you're just getting into RNA-seq, I would recommend against using DESeq 1. DESeq2 is the successor and is significantly more accurate, not to mention simpler to use. DESeq2 uses either a Wald test or a likelihood ratio test, depending on which one you tell it to use. I'm not actually familiar with the pre-GLM methods of either DESeq or edgeR, as I have always used the GLM methods because they have increased flexibility to model complex designs, and because it is easy to understand GLMs conceptually as a generalization of linear models to non-normal distributions. Regardless, I can definitely tell you that DESeq 1 is not performing a t test.

ADD COMMENTlink modified 3.3 years ago • written 3.3 years ago by Ryan C. Thompson7.3k

Thanks for your recommendation and information. 

ADD REPLYlink written 3.3 years ago by Giard10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 167 users visited in the last hour