4.3 Log2 Fold Change Shrinkage

What is this step and why do we need it?

After running DESeq2, every gene gets a raw log2 fold change (LFC) estimate. For lowly expressed genes, these estimates are unreliable — a gene with 1 count in control and 3 in treatment looks like a 3-fold change, but this is just noise from low counts.

lfcShrink() corrects this using empirical Bayes shrinkage: it pulls noisy estimates (low counts, high uncertainty) toward zero, while leaving well-supported fold changes (high counts, consistent signal) largely unchanged. Think of it as a confidence-weighted adjustment.

⭐ Important: shrinkage does not change your p-values or which genes are significant — those come from the results() call above. Shrunken LFCs are used exclusively for ranking and visualisation (volcano plot, heatmap).

Why apeglm? Three shrinkage methods exist in DESeq2: - apeglm — most accurate for simple two-group comparisons like ours ✅ - ashr — more flexible; needed when comparing two non-reference groups - normal — the original method, now outdated and not recommended

For a treatment vs control design in E. coli, apeglm is the right choice. See Zhu et al., 2019 for benchmarks.

res_shrunk <- lfcShrink(dds,
                        coef  = "condition_treatment_vs_control",
                        type  = "apeglm")

summary(res_shrunk)
## 
## out of 3698 with nonzero total read count
## adjusted p-value < 0.1
## LFC > 0 (up)       : 865, 23%
## LFC < 0 (down)     : 977, 26%
## outliers [1]       : 0, 0%
## low counts [2]     : 0, 0%
## (mean count < 5)
## [1] see 'cooksCutoff' argument of ?results
## [2] see 'independentFiltering' argument of ?results