Skip to content

DESeq2 lfcShrink option#151

Merged
HelenaLC merged 12 commits into
develfrom
lfc
Jun 4, 2026
Merged

DESeq2 lfcShrink option#151
HelenaLC merged 12 commits into
develfrom
lfc

Conversation

@HelenaLC

@HelenaLC HelenaLC commented Jun 4, 2026

Copy link
Copy Markdown
Owner

No description provided.

@mschilli87

Copy link
Copy Markdown

Thank you for continuing to maintain and further improve muscat. ❤️

@HelenaLC HelenaLC merged commit 85db626 into devel Jun 4, 2026
19 of 21 checks passed
@mertcan-demir

Copy link
Copy Markdown

Hi, thanks for adding this feature and still maintain the package! One thing I noticed, when lfcShrink = TRUE with apeglm, lfcShrink() returns s-values (if I am correct) in the padj slot, not BH-adjusted p-values. These then get renamed to p_adj.loc in muscat's output, which could mislead into interpreting them as standard FDR. Might be worth either documenting this or extracting the original p-values from results() separately when shrinkage is enabled.

@plger

plger commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Hi,
Are you sure about this? lfcShrink() has the svalue argument set to FALSE by default (and we're not changing it), so it shouldn't actually do that, and in my hands the p-values and adjusted p-values are no different with/without shrinkage.

@mertcan-demir

Copy link
Copy Markdown

See now, you are completely right. I misremembered the default behavior of lfcShrink(), my apologies. Thanks for clarifying.

@mertcan-demir

Copy link
Copy Markdown

Hi all, again it’s me! I had some time to try the commit. I’m using pbDS() with DESeq2 and a contrast matrix, something like,

res <- muscat::pbDS(
  pb,
  method = "DESeq2",
  design = design_matrix,
  contrast = contrast_matrix,
  lfcShrink = "ashr"
)

This currently fails for me with,

Error in DESeq2::lfcShrink(y, coef = coef[[c]], type = lfcShrink): 
  object 'coefAlpha' not found

I checked the commit and if I understand correctly, the DESeq2 helper switches from DESeq2::results(y, contrast[, c]) to DESeq2::lfcShrink(y, coef = coef[[c]], type = lfcShrink) when we set shrinkage. So for the contrast inputs coef is not available and ashr ends up failing. The apeglm incompatibility with contrast-matrix input is already documented, but it looks like contrast-matrix input also cannot currently proceed with lfcShrink = "ashr". Is the intended design that shrinkage is only supported for the coef inputs? Just wanted to check whether I’m understanding this correctly before working around it downstream.

Thank you so much again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants