Hi,
I have a gene expression dataset that is equivalent to Example 3 in your ?results help page: 3 temperatures (cold, room, warm) and 2 conditions (control, treatment).
I ran DESeq2 with the following design: ~temperature + condition + temperature:condition. I have three research questions:
(1) Which genes are differentially expressed between control samples of the three different temperatures?
(before editing: What is the effect of the temperature on the control?)
results(dds, name="temperature_cold_vs_room", alpha=0.05, pAdjustMethod="BH") results(dds, name="temperature_warm_vs_room", alpha=0.05, pAdjustMethod="BH")
(2) Which genes are differentially expressed between control and treatment samples in a given temperature?
(before editing: What is the effect of the treatment for each temperature?)
results(dds, name="condition_treatment_vs_control", alpha=0.05, pAdjustMethod="BH") results(dds, contrast=list(c("condition_treatment_vs_control", "temperaturecold.conditiontreatment")), alpha=0.05, pAdjustMethod="BH") results(dds, contrast=list(c("condition_treatment_vs_control", "temperaturewarm.conditiontreatment")), alpha=0.05, pAdjustMethod="BH")
(3) The expression of which genes changes upon treatment, but changes differently depending on the temperature?
(before editing: What is the effect of the temperature on the treatment?)
results(dds, name="temperaturecold.conditiontreatment", alpha=0.05, pAdjustMethod="BH") results(dds, name="temperaturewarm.conditiontreatment", alpha=0.05, pAdjustMethod="BH")
Could you confirm that what I am doing is correct? And finally, for question 1, I don't know yet how to extract the respective results for warm versus cold?
Many thanks in advance,
Katrin
-- Edit: I have edited the wording of my questions, trying to make the questions more concise.
Dear Sebastian,
Thanks a lot for taking the time.
Yes. My reference level is room temperature. So it is easy to get "temperaturecoldvsroom" and "temperaturewarmvsroom". But there is no warm versus cold, as the comparisons are against the reference level.
True. However, we thought it would be good for the project to stick to one analysis if possible. The 3. question is essential, so we decided to go for the interaction design. And the results function seemed to provide results for the 1. and 2. question as well.
No, not yet.
You are right. I am not sure either. As I understand it, the interaction term, e.g. "temperaturewarm.conditiontreatment", describes how warm temperature influences gene expression changes between control and treatment seen in the reference room temperature. How about this phrasing: The expression of which genes is changing differently upon treatment depending on temperature?
As I said, you can test any difference, as long as the factor levels are in the resultsNames. So
temperature_cold_vs_warm
orc("temperature", "cold", "warm")
should work, given the right design. This is much easier using the concatenation approach.I think "sticking to one analysis" is unnecessary. If you want to answer a question, design your analysis as suitable as possible. If your main biological question is whether the temperature influences treatment effects, then the interaction term will tell you that. More accurately, the interaction term will give you significance only for genes that diverge from the reference temperature in their response to the treatment.
I would take care to separate other questions from that, e.g. if the controls already respond to temperature changes. Think about this: If this was your only question, you could easily just do the experiment without the treatment, and do a simple design to find the answer.