I am posting an example from elsewhere to see if my understanding of interaction term interpretation is right.
dds <- makeExampleDESeqDataSet(n=10000,m=12) dds$condition <- factor( c( rep("Ctrl",6), rep("Trt",6) ) ) dds$genotype <- factor(rep(rep(c("WT","MU"),each=3),2)) colnames(dds) <- paste(as.character( dds$genotype),as.character( dds$condition),rownames(colData(dds)), sep="_" ) colnames(dds) = gsub("sample","",colnames(dds)) #check reference levels dds$genotype = relevel( dds$genotype, "WT") dds$genotype = relevel( dds$genotype, "Ctrl") design(dds) <- ~ genotype + condition + genotype:condition dds <- DESeq(dds) resultsNames(dds) ##  "Intercept" "genotype_MU_vs_WT" ##  "condition_Trt_vs_Ctrl" "genotypeMU.conditionTrt"
# effect of treatment in wild type
res = results(dds, contrast=c("condition","Trt","Ctrl")) # Here, the interpretation in straight forward (padj <0.05, and logfold change<1 for down regulated, and >1 for up regulated), and will be resSig_trtvsctrl <- subset(res_D2, padj < 0.05) down_regulated_trtvsctrl <-subset(resSig_trtvsctrl ,log2FoldChange < 1) up_regulated_trtvsctrl <-subset(resSig_trtvsctrl ,log2FoldChange > 1)
#difference between mutant and wild-type without treatment? (this will be straight forward interpretationas well and extracting up and downregulated list as above?)
res = results(dds, contrast=c("genotype","MU","WT"))
But for the below 3 cases that includes an interaction term, I am confused about extracting the up and down regulated gene lists.
#Effect of treatment in mutant
res <- results(dds, list( c("condition_Trt_vs_Ctrl","genotypeMU.conditionTrt") )) ix = which.min(res$padj) # most significant baseMean log2FoldChange p-value padj gene5102 18.690 4.757 1.60e-06 0.015
How do we interpret in this case because it includes an interaction term? Do we say gene5102 is downregulated expressed between Mutrt vs Muctrl? Although the sign of logfold change is positive, should I take the opposite sign for interpretation purpose? In such a case, how do I get the list of upregulated and downregulated genes
resSig_MutrtvsMuctrl <- subset(res_D2, padj < 0.05) down_regulated_MutrtvsMuctrl <-subset(resSig_MutrtvsMuctrl ,log2FoldChange **>** **1**) up_regulated_MutrtvsMuctrl <-subset(resSig_MutrtvsMuctrl ,log2FoldChange **< 1**)
#difference between mutant and wild-type with treatment?
res = results(dds, list( c("genotype_MU_vs_WT","genotypeMU.conditionTrt") ))
#different response in genotypes (interaction term)
res = results(dds, name="genotypeMU.conditionTrt")