Question: DESeq2: interaction term as in limma
gravatar for sbcn
9 months ago by
sbcn50 wrote:


In limma's documentation, the interaction term is described as:
"The first of these questions relates to the WT.S vs WT.U comparison and the second to Mu.S vs Mu.U . The third relates to the difference of differences, i.e., (Mu.S-Mu.U)-(WT.S-WT.U) , which is called the interaction term."

I want to perform the same analysis using DESeq2 (on RNA-seq data).
I have 2 cell types: A and B
for each cell type, I have a KO of a protein and a control (no KO)
I looked at the vignette and at ?results, but I have some doubt regarding what would be equivalent to limma's interaction term (A_ko-A_control)-(B_ko-B_control)

Could someone tell me if the following attempt is correct:

dds <- makeExampleDESeqDataSet(n=100,m=12)

dds$celltype <- factor(c(rep("A",6), rep("B", 6)))
dds$protein <- factor(rep(c(rep("ko",3), rep("control", 3)), 2))

design(dds) <- ~ celltype + protein + celltype:protein

dds <- DESeq(dds)

res <- results(dds, contrast=list( c("protein_ko_vs_control","celltypeB.proteinko") ))

Thanks a lot!


ADD COMMENTlink modified 9 months ago by Simon Anders3.4k • written 9 months ago by sbcn50
gravatar for Simon Anders
9 months ago by
Simon Anders3.4k
Zentrum für Molekularbiologie, Universität Heidelberg
Simon Anders3.4k wrote:

Nearly correct.

The last line should be:

res <- results( dds, name="celltypeB.proteinko" )


Have a look at resultsNames:

> resultsNames(dds)
[1] "Intercept"             "celltype_B_vs_A"       "protein_ko_vs_control"
[4] "celltypeB.proteinko"  


Celltype_B_vs_A is the difference between the cell lines A and B in control (B_ctrl - A_ctrl), and protein_ko_vs_control is the difference between the ko and ctrl in cell line A (A_ko - A_ctrl). The interaction term, celltypeB.proteinko, is the difference between the effect of the knockdown in cell line B over that in A, i.e., (B_ko - B_ctrl) - (A_ko - A_ctrl), which is what you want.

What you looked at ist the sum the last two terms, i.e., which turns out to be (B_ko - B_ctrl).

R's way of naming interaction term is a bit peculiar. Read "celltypeB.proteinko" as "the additional effect that the knockout has if done on cell line B rather than A", or, equivalently, "the additional part of the difference between A and B, when assessed in ko rather than ctrl".



ADD COMMENTlink written 9 months ago by Simon Anders3.4k

Thanks a lot Simon for your prompt answer!

It is a lot more clear now to me what each term means.

If a gene is differentially expressed in B_ko - B_ctrl but not in A_ko - A_ctrl (change in expression triggered by the KO in cell line B but not in cell line A), it will come out of the interaction analysis also as significant, correct?


ADD REPLYlink written 9 months ago by sbcn50

Not necessarily, because "absence of evidence is not evidence of absence" of an effect.

So, if the p value for (B_ko-B_ctrl) is high, this could either mean that there is no effect or that the variance is too high to tell. Hence, seeing a significant p value for (A_ko-A_ctrl) but not for (B_ko-B_ctrl) does not imply that there is a difference between (A_ko-A_ctrl) and (B_ko-B_ctrl).

This is precisely the reason why you have to test for significance of interaction and why it would be incorrect to simply run the analysis independently on the A and the B samples and look at the genes appearing only in one of the two results lists.

ADD REPLYlink written 9 months ago by Simon Anders3.4k

Thank you Simon for the clarification. Then the interaction is indeed what I am looking for.



ADD REPLYlink written 9 months ago by sbcn50
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.2.0
Traffic: 162 users visited in the last hour