Interaction terms in DESEQ2 with 3 factors
1
2
Entering edit mode
8.3 years ago
denalitastic ▴ 30

Hello, I have been trying to figure out how to deal with combining interaction terms in Deseq2. I have tried all posts and the tutorials including the manual but none try exactly what I am looking for.

My design is as follows

design = ~cell + drug + time + drug:time

Drug: V,L,T
Time: 0,1,2,6,12,24,48
cell: A ,B

I am interested in the difference of differences. Basically I am looking for what genes are regulated differently between 2 treatments or between 1 treatment vs the other 2 across time points as the condition effect. I would also like to interrogate the same question by pooling some time points. So for example for drug T i have the condition effect of early vs late (early being time points 1 and 6 combined) and late being (24 and 48 combined). And how does this compare to the case of drug L for the same condition efffect. All this while controlling for cell type. My solution is using the design above. Assume here that I have made L drug my reference.

this is from resultsNames

 [1] "Intercept"          "cell_A_vs_B" "drug_V_vs_L"     "drug_T_vs_L"   
 [5] "time_1_vs_0"        "time_6_vs_0"        "time_12_vs_0"     "time_24_vs_0  
 [9] "time_48_vs_0"       "drugV.time1"      "drugT.time1"     "drugV.time6"     
[13] "drugT.time6"     "drugV.time12"     "drugT.time12"    "drugV.time24"    
[17] "drugT.time24"    "drugV.time48"     "drugT.time48"

late vs early condition , T drug vs L drug (L is reference level)

contrast = list(c("drugT.time48", "drugT.time24"), c("drugT.time1","drugT.time6")), listValues = c(0.5,-0.5)

For 48hrs vs early for V vs L (L is reference)

contrast = list(c("drugV.time48"), c("drugV.time1","drugV.time6")), listValues = c(1,-0.5)

What if i wanted condition effect of Late vs Early and the difference and T & V combined vs L? My guess is this. (where L is reference)

c("drugT.time48", "drugT.time24", "drugV.time48", "drugV.time24"), c("drugT.time1", "drugT.time6", "drugV.time1", "drugV.time6"), listValues = c(0.25,-0.25)

Is this correct? Are there other methods of doing this. What if I made V my reference and asked the same questions. This seems more complicating but it might help explicate the DESeq syntax. I can add anything to this post that is necessary.

Thanks for any help you can provide!

RNA-Seq R • 2.4k views
ADD COMMENT
0
Entering edit mode

Don't use [CODE] tags. Instead format code in your post by highlighting the relevant text and then clicking "1010010" button in the editor.

ADD REPLY
3
Entering edit mode
8.3 years ago

I didn't go through your design so I'm not exactly answering your question, sorry, but I have a couple of suggestions.

  • Have a look at the edgeR manual section 3.3.1 (Defining each treatment combination as a group). There is a very nice general solution for dealing with more complex designs and contrasts. It might be directly applicable to DESeq, not sure though.

  • I would suggest you add to your count matrix some "control" mock genes that behave like positive and negative controls. In other words, just add a fake gene that you expect to be picked up by your design as differentially expressed and a fake gene that is not expected to be detected as DE. This will give you some reassurance that the design is correct. I found this strategy quite useful and I try to use it quite often if I can. It is a sort of equivalent of unit tests and test driven development frequently used in software engineering.

ADD COMMENT

Login before adding your answer.

Traffic: 1177 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