DESeq2 threshold-based Wald tests, before or after lfcShrink?
1
0
Entering edit mode
Lei • 0
@lei-14524
Last seen 6.4 years ago
USA

Hi,

I tried to conduct threshold-based Wald tests by using the lfcThreshold and altHypothesis arguments to the DESeq2::results function. However, I noticed in the DESeq2 (2014 Genome Biology) paper, it stated in page 6 "DESeq2 offers tests for composite null hypotheses of the form |ßir| <= theta, where ßir is the shrunken LFC from the estimation procedure described above. (See Methods for details.)". So it appears one should first get the shrunken LFC values before doing the Wald test, but after version 1.16 the shrunken LFC values can only be obtained by using a separate function lfcShrink(), which can only be run after running the results() function. So it seems there is no way to do threshold-based Wald tests on the shrunken LFC values in recent versions of DESeq2. Is my understanding correct?

I did some test runs:

res_default <- DESeq2::results(object = dds);
res_composite_null <- DESeq2::results(object = dds, lfcThreshold = 0.5, altHypothesis = "greaterAbs");
res_default_lfcShrink <- DESeq2::lfcShrink(dds = dds, coef = 2, type = 'normal', res = res_default);
res_composite_null_lfcShrink <- DESeq2::lfcShrink(dds = dds, coef = 2, type = 'normal', res = res_composite_null);

It looks like the pvalues in 'res_composite_null_lfcShrink' is exactly the same as the pvalues in 'res_composite_null', so the lfcShrink() function only changes the log2FoldChange and lfcSE columns. Is there a way to re-run the results() function on the output of lfcShrink()?

 

Thanks!

Lei

deseq2 • 1.3k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 1 hour ago
United States

hi Lei,

In version 1.16 and 1.18, the default is not to test on shrunken coefficients, but to leave shrinkage as a secondary step for ranking and visualization. lfcShrink() only moderates the effect sizes and does not change the p-values in the table.

So you test on |beta_ir| <= theta where beta_ir is the non-shrunken LFC. I want to point out that the test is perfectly valid on the non-shrunken LFC.

You are right that in these two versions, lfcShrink() does not offer a threshold test. It is one of my main todos in this devel cycle to implement lfcThreshold within lfcShrink() (see this note to myself) but I haven't done it yet. (And then, in future workflows, when we do want to replace p-values of MLE coefficients with inference on the shrunken LFCs, we will be outputting posterior tail areas and "s-values" instead of p-values and adjusted p-values.)

ADD COMMENT
0
Entering edit mode

Hi Michael,

Thanks a lot for the quick answer. It is re-assuring to know that the test is perfectly valid on the non-shrunken LFC. Do you have a rough idea on what would be a good cutoff value on the non-shrunken LFC, if I intend to perform the test |beta_ir| > log2(1.5) where beta_ir is the shrunken LFC (i.e. is there a way to map the cutoff value of log2(1.5) on the shrunken LFC to the non-shrunken ones)?

Best,

Lei

 

 

ADD REPLY
0
Entering edit mode

I don't think there is a good cutoff for LFC for any and all datasets. You would use the same LFC cutoff if you were testing shrunken or unshrunken LFC, this is not related the choice of cutoff.

I would take a look at the MA plot perhaps, if there wasn't already a more biologically motivated LFC cutoff.

ADD REPLY

Login before adding your answer.

Traffic: 707 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6