I have a question regarding contrasts in a multi-factorial design in Deseq2. I have a design that have 1 factor (Inoculation) with two levels (Inoc or No.Inoc) and another factor (Crop) with 4 levels (fallow - Fa, corn - Co, Mix 1 - M1, and mix 5 - M5). I set No.Inoc and Fa as the reference levels for their respective factors.
The design was the following:
design(degtreatMF) <- formula(~ Crop + Inoculation + Crop:Inoculation) degtreatMF <- DESeq(degtreatMF, fitType="local")
And I got the following coeficients:
resultsNames(degtreatMF)  "Intercept" "Crop_Co_vs_Fa"  "Crop_M1_vs_Fa" "Crop_M5_vs_Fa"  "Inoculation_Inoc_vs_No.Inoc" "CropCo.InoculationInoc"  "CropM1.InoculationInoc" "CropM5.InoculationInoc"
I need to find the following contrasts:
Co and Inoc vs Co and No.Inoc
M1 and Inoc vs M1 and No.Inoc
M5 and Inoc vs M5 and No.Inoc
Fa and Inoc vs Fa and No.Inoc
Now if I understood correctly, my intercept is Fa and No.Inoc and can be represented as c(1,0,0,0,0,0,0,0) while the others would be:
Fa and Inoc: (1,0,0,0,1,0,0,0)
Co and No.Inoc: (1,1,0,0,0,0,0,0)
Co and Inoc: (1,1,0,0,1,1,0,0)
M1 and No.Inoc: (1,0,1,0,0,0,0,0)
M1 and Inoc: (1,0,1,0,1,0,1,0)
M5 and No.Inoc: (1,0,0,1,0,0,0,0)
M5 and Inoc: (1,0,0,1,1,0,0,1)
Which means that I need to specifiy the following contrasts to get my expected results:
Co and Inoc vs Co and No.Inoc: c(0,0,0,0,1,1,0,0)
M1 and Inoc vs M1 and No.Inoc: c(0,0,0,0,1,0,1,0)
M5 and Inoc vs M5 and No.Inoc: c(0,0,0,0,1,0,0,1)
Fa and Inoc vs Fa and No.Inoc c(0,0,0,0,1,0,0,0)
Is that accurate?