I am very new to using interactions using DESeq2 and handling multi-factor design. I have two groups 'Treated' and 'Untreated' which include both males and females in both groups. First, I am interested in looking into comparing treated vs untreated without considering sex specific effects. And in the next comparison look at differences between treated and untreated for males and females independently.
Ideally, for sex-specific results I would just subset the data by sex and then run the analysis separately for each sex but I guess there is a better way to do this. I have age of the patients, so I want to control for age.
The following is my code:
dds <- DESeqDataSetFromMatrix(countData = myFile, colData = Pheno, design= ~ Condition + Age + Sex + Condition:Sex) resultsNames(dds)  "Intercept" "Condition_treated_vs_untreated"  "Age" "Sex_M_vs_F" "Condition.Sex_M"
What is the best way to write a contrast to get 'Treated vs Untreated' comparison and then same comparison but individually for both sexes?