Why does the DESEQ2 lfcshrink function results not include the stat variable
1
0
Entering edit mode
divercory • 0
@divercory-23162
Last seen 4.7 years ago

Hi Michael or DESEQ2 community,

First, sorry, I'm not sure why the images don't load, but if you right click on them they will.

When I use the DESEQ2 results() function I get a variable called stat, which is useful for GSEA. Results function produces stats column

When I run lfcshrink on the DESEQ2 dataset the stat column isn't there. It also isn't there in the screen shot in the vignette enter image description here

When I use the code from this post to generate an example dataset and run lfcshrink on it the stat column is there: dds <- makeExampleDESeqDataSet(betaSD=1) dds <- DESeq(dds, betaPrior = FALSE) res <- results(dds) res.shr <- lfcShrink(dds=dds, coef=2, res=res) Generated example, lfcShrink() applied

What determines if the stat column is present in the results of lfcshrink or not and how to I make sure it is present? I'm interested in this because, from what I have read, the stat column is useful for GSEA analysis (fGSEA package) and from what I have found and is posted in the vignette I get the impression it is best to use shrinkage for downstream analysis. Thanks for your help!

Cory

deseq2 stat lfcshrink • 22k views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 21 hours ago
United States

Log fold change shrinkage is for posterior estimation of the effect size. You get the posterior mean or mode and the posterior SD (although it is labelled lfcSE to not break downstream workflows, its metadata description is "posterior SD").

If you run with type="normal" (which now generates a note to switch to another shrinkage type), you will get a stat column for backward compatibility.

If you run type="apeglm" or "ashr" you do not get a stat column because these don't really make sense in the context of the posterior quantities that are returned.

For GSEA, you could use the LFC in my opinion. The reason why many downstream software recommend using Wald statistics is for shrinkage of noisy LFC estimates, but we have taken care of that directly in DESeq2.

ADD COMMENT

Login before adding your answer.

Traffic: 570 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