Hello,
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)
[1] "Intercept" "Condition_treated_vs_untreated"
[3] "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?
Thanks!
Micheal thanks for the reply. I read the results section and now things are a little more clear. So I ended up combining groups into a single factor.
How do I get the comparison between Untreated and Treated not taking sex into consideration? Also, is this a correct way to account for age?
To not take the sex into consideration I’d use a model that removes the sex variable. But I don’t know if this is a bad assumption for your system. That’s outside the scope of the kind of support I am able to provide. That’s how most control for age, but again what design you chose to model your data is up to you.
Hi Michael,
Similar question with this post. but additionally when we want to know if the treatment effect is gender dependent, is it more reasonable to include the interaction term in the design, rather than combining treatment and gender into a single factor?
Thanks in advance.
Yes, that’s the point of an interaction term — see description in vignette of interactions.
Thanks for your quick reply.
The final question. when I combine the treatment and gender into one factor, I got about one hundred DEGs (FemaleTreated vs FemaleUntreated and MaleTreated vs MaleUntreated ). But there is only several DEGs when I include the interaction term. Can i still say the treatment effect is gender specific?
Gratefully, Yao
The interaction term points to differences. You should discuss further with a statistician to best interpret your results.