I also read in vignette and many post about multiple factor design but I still don't get it.What I want is to compare between the same cell type and also in the same day but different in heat condition. For example
Day0cellABCheatC VS Day0cellABCheatH
So I design a condition as follow which I'm not sure it correct or not.
ddsHTSeq <- DESeqDataSetFromHTSeqCount(sampleTable = sampleTable, directory = dir, design= ~ ~ cell+Day+heat+cell:heat)
here is my data look like
as.data.frame(colData(dds)) Day cell heat sizeFactor D0_ABC_C1.sort_new_count D0 ABC C 0.7940138 D0_ABC_C2.sort_new_count D0 ABC C 1.2122551 D0_RST_C1.sort_new_count D0 RST C 1.1625389 D0_RST_C2.sort_new_count D0 RST C 1.0165686 D13_ABC_C1.sort_new_count D13 ABC C 0.8062614 D13_ABC_C2.sort_new_count D13 ABC C 0.7919916 D13_ABC_H1.sort_new_count D13 ABC H 0.5067959 D13_ABC_H2.sort_new_count D13 ABC H 3.0570842 D13_RST_C1.sort_new_count D13 RST C 0.1802654 D13_RST_C2.sort_new_count D13 RST C 0.9946196 D13_RST_H1.sort_new_count D13 RST H 4.9916143 D13_RST_H2.sort_new_count D13 RST H 1.2102286 D6_ABC_C1.sort_new_count D6 ABC C 2.4271542 D6_ABC_C2.sort_new_count D6 ABC C 0.8863761 D6_ABC_H1.sort_new_count D6 ABC H 1.0265614 D6_ABC_H2.sort_new_count D6 ABC H 0.6471705 D6_RST_C1.sort_new_count D6 RST C 2.8035811 D6_RST_C2.sort_new_count D6 RST C 0.9791049 D6_RST_H1.sort_new_count D6 RST H 0.7122750 D6_RST_H2.sort_new_count D6 RST H 0.5222761
and the resultsNames(dds) is
"Intercept" "cell_RST_vs_ABC" "Day_D13_vs_D0" "Day_D6_vs_D0" "heat_H_vs_C" "cellRST.heatH"
My question is if I want to select the result like Day0cellABCheatC VS Day0cellABCheatH and Day6.cellABC.heatC VS Day6.cellABC.heatH. How do I get the result that I want
I try the following command but it give me an error
res<-results(dds, contrast = list(c("DayD13.cellABC.heatC","DayD13.cellABC.heatH")), alpha=0.05)
Error in checkContrast(contrast, resNames) :
all elements of the contrast as a list of length 2 should be elements of 'resultsNames(object)