Hello
I have a design with two factors, each one with two levels. And I want to know the effect of each variable and if the interaction effect.
treatment <- c("dox_no","dox_no","dox_yes","dox_yes","dox_no","dox_no","dox_yes","dox_yes","dox_no","dox_no","dox_yes","dox_yes")
aminoacid <- c("aa_no","aa_yes","aa_no","aa_yes","aa_no","aa_yes","aa_no","aa_yes","aa_no","aa_yes","aa_no","aa_yes")
comparison <- cbind(treatment, aminoacid)
rownames(comparison) <- c(paste("RNA", c(1:12),sep=""))
comparison <- as.data.frame(comparison)
comparison$treatment <- factor(x = comparison$treatment, levels = c("dox_yes","dox_no"))
comparison$aminoacid <- factor(x = comparison$aminoacid, levels = c("aa_yes","aa_no"))
Then I describe the model; RNAtable
is a data.frame
with 12 columns (samples
) and 24015 rows (genes
)
RNAcount <- DESeqDataSetFromMatrix(countData = RNAtable, colData = comparison, design = ~ treatment + aminoacid + treatment:aminoacid)
deseq <- DESeq(RNAcount)
resultsNames(des)
"Intercept" "treatment_dox_no_vs_dox_yes" "aminoacid_aa_no_vs_aa_yes" "treatmentdox_no.aminoacidaa_no"
I believe that the effect for the aminoacidad and its differential expressed genes can be extracted such way
results(deseq, contrast = c("treatment","dox_no","dox_yes"))
Is this right? How can I get the effect for the other variable and for the interaction?
Thanks
That's the additional change due to no doxycycline combined with no amino acid compared to what would happen if those two different conditions did not interact.
Thanks, I'll change the order of the factors so it will be easier to understand what the effect of the interaction means.