Hello,
i am using DESeq2 to analyse an experiment with two conditions and three groups, as described in "Example 3" in the ?results help page.
I started the analysis by testing for an interaction effect with the following code:
## Example 3: two conditions, three groups, with interaction terms
dds <- makeExampleDESeqDataSet(n=100,m=18) dds$group <- factor(rep(rep(c("X","Y","Z"),each=3),2)) design(dds) <- ~ group + condition + group:condition dds <- DESeq(dds) resultsNames(dds) ## Interaction effect with LRT test group.x.cond <- nbinomLRT(dds,reduced=~group + condition) group.x.cond.res <- results(group.x.cond) tab.group.x.cond <- table(group.x.cond.res$padj < 0.05) tab.group.x.cond
In much the same way as here in the example data, i did not found any gene showing a significant interaction effect in my real data set.
Consequently, i set-up a new full model without interaction term:
## New model without interaction term: design(dds) <- ~ group + condition dds <- DESeq(dds) resultsNames(dds)
I have now three questions:
1. Is there a way to test for a condition effect in a specific group (say Z) based on the new model, as it is described in the ?results help for a model with interaction term?
2. In my own data set, if i set-up a full model with interaction term, and test for treatment effects in specific groups, the number of genes showing a significant treatment effect is much lower compared to the number of genes showing a treatment main effect? I am grateful for any comments on possible reasons for this observation.
3. Is there a way to test for a main effect for group based based on contrasts, i.e. not with a LRT test, but with a WALD test?
Many thanks for any comments!
Dear Michael Love,
I got 2 questions about 2-way factorial design on DESeq2. I understand what the interaction term answers. If it is significant, it means the condition effect is different across genotypes. But, I don't understand which pair-wise comparison this " results(dds, name="genotypeII.conditionB") " for?
For example, the results as below, it means the condition effect is different across genotypes for these genes, right? But, which comparison these 106 genes are significantly differently expressed between at FDR 0.05?
The second question is how should I code the contrast (fix a level for one factor) for each of 6 pair-wise comparisons: conditionAgenotypeI VS conditionAgenotypeII, conditionBgenotypeI VS conditionBgenotypeII, conditionAgenotypeI VS conditionBgenotypeI, conditionAgenotypeII VS conditionBgenotypeII, conditionAgenotypeI VS conditionBgenotypeII, and conditionAgenotypeII VS conditionBgenotypeI?
For these 2 questions, I got stuck with applying post-hoc test (https://www.sheffield.ac.uk/polopoly_fs/1.536444!/file/MASH_2way_ANOVA_in_R.pdf) to DESeq2 in a word.
Thanks a lot!
For statistical consultation on how to set up and interpret designs in linear model, I recommend to work with a local statistician. I only have sufficient time to answer software related support posts.
My confusion was fixed by reading "Contrast" and "Interaction" parts here https://www.bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#contrasts. Thanks!