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!
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?
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.
Thank you Simon for the clarification. Then the interaction is indeed what I am looking for.