Hello,
I kindly ask for help comparing the interactions terms between two groups. I have two groups (two conditions/types) and two treatments. the meta data is as follows
sample type treatment
1 Control_ND_1 Control ND
2 Control_ND_2 Control ND
3 Control_ND_3 Control ND
4 Control_ND_4 Control ND
5 Control_D_1 Control D
6 Control_D_2 Control D
7 Control_D_3 Control D
8 Control_D_4 Control D
9 Injured_ND_1 Injured ND
10 Injured_ND_2 Injured ND
11 Injured_ND_3 Injured ND
12 Injured_ND_4 Injured ND
13 Injured_D_1 Injured D
14 Injured_D_2 Injured D
15 Injured_D_3 Injured D
16 Injured_D_4 Injured D
D represents a special diet, and ND represents normal diet.
I want to compare the difference in gene expression between the Injured Group With Special Diet vs. Control Group with no diet (ND).
Running DESeq as follows:
dds$treatment = relevel( dds$treatment, "ND") #Setting references
dds$type=relevel(dds$type,"Control") #Setting references
design(dds)<- ~ type + treatment + type:treatment
res <- DESeq2(dds)
The result names of res are:
"Intercept"
"type_Injured_vs_Control"
"treatment_D_vs_ND"
"typeInjured.treatmentD"
How would I use the results function to compare the Injured_D group vs. Control_ND group? I want to see the combined effect of having a special diet and being injured relative to the control group (injured) that has a normal diet. This is essentially comparing Samples #1-4 vs. Samples #13-16
Thank you so much!!!
Thank you so much for your helpful reply. To make sure I understood it, we combine the treatment and type variable into one variable (let's call it group). Thus, we have the following meta data.
Then, we run the following:
Then, to get the comparison we wanted (InjuredD vs. ControlND), we simply run:
Is the right approach? Your advice and help is truly appreciated.
That's just what the vignette shows.