Hello everyone,
I have an experiment with a 2 x 2 factor design, with condition having two levels (N vs NN) , and treatment having control (C) and stress (S) levels. I want to analyze the interaction effect so I run
design(dds) <- ~ condition + treatment + condition:treatment
dds <- DESeq(dds)
resultsNames(dds)
which returned the following
"Intercept" "condition_NN_vs_N" "treatment_S_vs_C" "conditionNN.treatmentS"
Therefore, to analyze the interaction I run
res1 <- results(dds_pol_nod, name = "conditionNN.treatmentS")
where by reading DESeq2 vignette and ?results example 3, I interpret that "conditionNN.treatmentS" means analyzing if the effect of treatment S vs treatment C in condition NN is different of the effect of treatment S vs C in condition N.
Then, I want to know how many genes of that interaction have a padj under than 0.05, so I do
padj.cutoff <- 0.05
res1 %>%
as.data.frame() %>%
pull(padj) -> p1
which(p1< padj.cutoff) %>% length()
obtaining
897
After that, I want to analyze the opposite, if the effect of condition NN vs N in treatment S is different from that in treatment C, so I changed the design as below
design(dds) <- ~ treatment + condition + treatment:condition
dds <- DESeq(dds)
resultsNames(dds)
"Intercept" "treatment_S_vs_C" "condition_NN_vs_N" "treatmentS.conditionNN"
analyze the interaction by
res1 <- results(dds_pol_nod, name = "treatmentS.conditionNN")
obtain the amount of genes that have a padj under than 0.05 but still obtaining
897
How could it be possible? I was expecting to see a different number. Am I misunderstanding something?
Regards, Mauro
Yes, we made the same reasoning and reached the same.
Even seeing the questions in ABCD terms are the same, they aren't in biological terms.
How can I analyze both effects?