Question: missing coeeficients in resultsNames(dds)
gravatar for Assa Yeroslaviz
12 months ago by
Assa Yeroslaviz1.4k
Assa Yeroslaviz1.4k wrote:

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

design deseq2 • 605 views
ADD COMMENTlink modified 12 months ago • written 12 months ago by Assa Yeroslaviz1.4k
gravatar for _r_am
12 months ago by
Baylor College of Medicine, Houston, TX
_r_am32k wrote:

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.

ADD COMMENTlink written 12 months ago by _r_am32k

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.

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.

ADD REPLYlink modified 12 months ago • written 12 months ago by Assa Yeroslaviz1.4k

See my answer here: A: type='apeglm' shrinkage only for use with 'coef'

ADD REPLYlink written 5 days ago by ATpoint44k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 989 users visited in the last hour