Search
Question: DESEq2: Two factor design without interaction
0
gravatar for hwildha
3.6 years ago by
hwildha0
Germany
hwildha0 wrote:

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!

ADD COMMENTlink modified 3.6 years ago • written 3.6 years ago by hwildha0
0
gravatar for Michael Love
3.6 years ago by
Michael Love20k
United States
Michael Love20k wrote:

1) The "condition effect for a specific group" can be found either i) by including an interaction term, or ii) by making a new factor variable which consists of unique combinations of group and condition, e.g.:

dds$var = factor(paste0(dds$group, dds$condition))
dds = DESeq(dds)
results(dds, contrast=c("var", "ZB", "ZA"))

(i) makes it easier to test for differences in the condition effect across groups and to pull out the main effect, (ii) makes it easier to test the condition effect in each group.

2) I wonder if you are testing only the interaction term(s). Contrasts involving only the interaction term(s) are tests for whether the condition effect is different in a specific group or across groups. In order to test the condition effect in a specific group, you add the interaction term to the main effect.

Remember: there can be a large condition effect, but it is not different across groups. In this case, the main effect is large, but the interaction terms are small. If the contrast only involves the interaction terms you are not asking, what is the effect, but are the effects different across groups.

3) Yes, with the formula with interactions this is easy. Just use the default DESeq() pipeline, (don't put in test="LRT" or the reduced formula), and then 

results(dds, contrast=c("condition", "B", "A"))

or whatever your condition levels are.

ADD COMMENTlink modified 3.6 years ago • written 3.6 years ago by Michael Love20k
0
gravatar for hwildha
3.6 years ago by
hwildha0
Germany
hwildha0 wrote:

Dear Michael,

thanks for your comments.

Add1) Do you think it is valid to include an interaction term, if the result of the LRT is telling me that there is no evidence for an interaction term for any gene?

Add 3) In my third question:

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

i was actually not asking for the main effect for factor "condition", but for factor "group", which has three levels.

Best, Henning

 

ADD COMMENTlink written 3.6 years ago by hwildha0

1) yes you can include interaction terms even if they are not significant in the LRT. It could be that individual terms are significant, although the LRT (which tests all terms together) is not.

3) Yes, you can just substitute group for condition in the results() call, and the two groups you want to compare.

ADD REPLYlink written 3.6 years ago by Michael Love20k
Please log in to add an answer.

Help
Access

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