I am trying to figure out which shrinkage estimater the current DESeq2 version is using in the results(..) function.
The original 2014 paper describes that an adaptive Normal distribution is used as a prior, and the current vignette explains the newly avaiable shrinkage estimators (the new default is apeglm):
In DESeq2 version 1.18, we include two additional adaptive shrinkage estimators, available via the type argument of lfcShrink. For more details, see ?lfcShrink
The options for type are:
apeglm is the adaptive t prior shrinkage estimator from the apeglm package (Zhu, Ibrahim, and Love 2018). As of version 1.28.0, it is the default estimator.
ashr is the adaptive shrinkage estimator from the ashr package (Stephens 2016). Here DESeq2 uses the ashr option to fit a mixture of Normal distributions to form the prior, with method="shrinkage".
normal is the the original DESeq2 shrinkage estimator, an adaptive Normal distribution as prior.
However, I noticed following result tables giving me very different different Log2-FCs for following variables.
res <- results(dds,contrast=c("treatment","1_microM_48","1_microM_24"))
resSLFC <- lfcShrink(dds,coef="treatment_1_microM_48_vs_1_microM_24",type="apeglm",res=res)
Has anyone else noticed this? Any help is greatly appreciated!
If I run deseq with the betaPrior=TRUE option, then the prior used in apeglm packages would be used?
So where is the difference between res and resSLFC in following example:
Please use the formatting bar (especially the
code
option) to present your post better. I've done it for you this time.Thank you!
I am new to biostars, thank you for pointing that out!
This option is (from what I understand) a legacy option from the time when the shrinkage was part of the standard workflow via
DESeq()
. These days one should use thelfcShrink
function as clearly described in the manual, and I strongly suggest you follow it. SoDESeq()
with default setting, thenresults()
and thenlfcShrink
with one of the three options as you like.