Extracting sex specific differences between groups using DESeq2 interactions?
1
0
Entering edit mode
hrishi27n ▴ 20
@hrishi27n-11821
Last seen 3.2 years ago
United States

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!

deseq2 • 2.7k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 2 days ago
United States

Have you seen the examples in the man page for

?results

ADD COMMENT
0
Entering edit mode

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.

 Gr <- factor(paste0(Pheno$Condition,Pheno$Sex)) 
 dds <- DESeqDataSetFromMatrix(countData = myFile, colData = Pheno, design= ~Gr+Age)
 dds <- DESeq(dds,parallel=TRUE)
 resultsNames(dds)
[1] "Intercept"                            
[2] "Gr_UntreatedM_vs_UntreatedF"
[3] "Gr_TreatedF_vs_UntreatedF"  
[4] "Gr_TreatedM_vs_UntreatedF"  
[5] "Age" 

  So to get effect of treatment in males and females, I did the following.  Is this correct? 
  Male <- results(dds, contrast=c('Gr','TreatedM','UntreatedM'))
  Female <- results(dds, contrast=c('Gr','TreatedF','UntreatedF'))

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?

ADD REPLY
1
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

Yes, that’s the point of an interaction term — see description in vignette of interactions.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

The interaction term points to differences. You should discuss further with a statistician to best interpret your results.

ADD REPLY

Login before adding your answer.

Traffic: 862 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6