missing coeeficients in resultsNames(dds)
Entering edit mode
15 months ago
Assa Yeroslaviz ★ 1.5k

I have the following design matrix

> colData(ddsMat)
DataFrame with 8 rows and 9 columns
sample  names   day condition   differentiated  rep ReadSums    design  sizeFactor
<character> <character> <factor>    <factor>    <factor>    <integer>   <character> <factor>    <numeric>
D0_MAEAKO_High_1    1   D0_MAEAKO_High_1    D0  KO  high    1   71041314    D0_KO_high  0.80109874
D0_MAEAKO_High_2    2   D0_MAEAKO_High_2    D0  KO  high    2   62294732    D0_KO_high  0.688588086
D0_MAEAKO_Low_1 3   D0_MAEAKO_Low_1 D0  KO  low 1   52015191    D0_KO_low   0.703319202
D0_MAEAKO_Low_2 4   D0_MAEAKO_Low_2 D0  KO  low 2   61838744    D0_KO_low   0.789337824
D0_WT_High_1    5   D0_WT_High_1    D0  WT  high    1   102380876   D0_WT_high  1.351169557
D0_WT_High_2    6   D0_WT_High_2    D0  WT  high    2   83154046    D0_WT_high  1.094416169
D0_WT_Low_1 7   D0_WT_Low_1 D0  WT  low 1   126036956   D0_WT_low   1.594154982
D0_WT_Low_2 8   D0_WT_Low_2 D0  WT  low 2   120620158   D0_WT_low   1.502663581

To run the DGE analysis I created the DESeq2 object

ddsMat <- DESeqDataSetFromMatrix(countData = counts,
                             colData = coldata,
                             design = ~design)

But now when I check for the resultsNames I see only these:

[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"

I would like to analyze multiple possibilities, e.g. "KO-low vs. KO-high" (coeff=2) or "WT-high vs. KO-high" (coeff=3), but also such as "WT-low vs. WT-high" or "KO-low vs. WT-low".

IS there any reason why I don't see them in the list of resultsNames? Can they be coerced into the list? I would to use the lfcShrink command which can't use the contrast option as opposed to the results command.

any ideas?

thanks Assa

deseq2 design • 784 views
Entering edit mode
15 months ago
Ram 32k

I think you can always use contrast() to generate custom results. resultsNames are a few examples that DESeq2 generates - it is not an exhaustive list.

Entering edit mode

This is not true.

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'

which surprisingly clear.

Entering edit mode

Login before adding your answer.

Traffic: 2347 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6