lfcShrink doesn't work with contrasts
1
0
Entering edit mode
Assa Yeroslaviz ★ 1.5k
@assa-yeroslaviz-1597
Last seen 16 days ago
Germany

I have a dataset I'm analysing with deseq2. For plotting the data in a volcano plot I'm trying to run lfcSrhink on a contrast which somehow doesn't show on the resultNames.

This is the results of this command

[1] "Intercept"   "design_D0_KO_low_vs_D0_KO_high"  "design_D0_WT_high_vs_D0_KO_high" "design_D0_WT_low_vs_D0_KO_high"

What can I do to run e.g. KO-low vs. WT-low?

I tried to usecontrasts like in the results command.

when I run this:

> resMA <- lfcShrink(ddsMat, coef="design_D0_KO_low_vs_D0_KO_high", type="apeglm")
using 'apeglm' for LFC shrinkage. If used in published research, please cite:
    Zhu, A., Ibrahim, J.G., Love, M.I. (2018) Heavy-tailed prior distributions for
    sequence count data: removing the noise and preserving large differences.
    Bioinformatics. https://doi.org/10.1093/bioinformatics/bty895

it works.

But this command returns an error:

> resMA <- lfcShrink(ddsMat, contrast = c("design", "D0_KO_low", "D0_KO_high"), type="apeglm")
Error in lfcShrink(ddsMat, contrast = c("design", "D0_KO_low", "D0_KO_high"),  : 
  type='apeglm' shrinkage only for use with 'coef'

Is there a way to run lfcShrink withcontrast, or addcoefin theresultsNames`?

lfcShrink contrast design deseq2 • 27k views
ADD COMMENT
1
Entering edit mode
@wolfgang-huber-3550
Last seen 12 weeks ago
EMBL European Molecular Biology Laborat…

Assa,

did you have a look at http://bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#extended-section-on-shrinkage-estimators and the advice following "Although apeglm cannot be used with contrast, we note that many designs can be easily rearranged such that what was a contrast becomes its own coefficient." in particular?

Hope this helps, kind regards,

Wolfgang

ADD COMMENT

Login before adding your answer.

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