Greetings. I have an experiment exposing cells to temperature and pollutants. Two factors x two levels per factor. Factor 1 is temperature with two levels (cold (reference level) vs hot). Then factor2 is pollution with two levels (no_pollution (reference level) vs pollution). So 4 conditions: cold non polluted (CNP), cold polluted (CP), hot non polluted (HNP), hot polluted (HP). I have hopefully understood the contrasts correctly as laid out below, but please correct me if not. I am particularly interested in interactive stressor effects so have used a two factor design.
Question: I am wondering if there is a way in the results() function to get the contrast for HP (combined heat and pollution) vs CNP (the ref level for both factors)? From the DESeq2 vignette, this would be the equivalent of genotypeII.treated vs genotypeI.Control). Thanks in advance!
coldata_int$temp <- factor(coldata_int$temp, levels=c("cold","hot"))
coldata_int$pollution <- factor(coldata_int$pollution, levels=c("non_polluted","polluted"))
> dds_int <- DESeqDataSetFromTximport(genes.salmon, coldata_int, ~pollution + temp + pollution:temp)
#1. temp effects within non-polluted ref level
> res_HNPvCNP <- results(dds_int, contrast=c("temp","hot","cold"))
#2. then temp within polluteds: hot poll. vs cold poll.
> res_HPvCP <- results(dds_int, list(c("temp_hot_vs_cold", "pollutionpolluted.temphot")))
#3. pollution within cold ref-level, cold polluted vs non-polluted
> res_CPvCNP <- results(dds_int, contrast=c("pollution","polluted","non_polluted"))
#4. pollution but within hot groups- hot polluted vs hot non-polluted
> res_HPvHNP <- results(dds_int, list(c("pollution_polluted_vs_non_polluted", "pollutionpolluted.temphot")))
#interaction alone -difference of differences temp response difference in polluted vs not - L2FC HP vs CP vs L2FC HNP vs CNP.
> res_interaction <- results(dds_int, name="pollutionpolluted.tempnot")