DESeq2 Design Model and Results Function Set-Up - How to know if using the interaction term is appropriate?
1
0
Entering edit mode
gmchaput • 0
@gmchaput-22280
Last seen 19 months ago
United States

I am having a hard time wrapping my brain around how to structure my results() and if it's even possible. Full disclosure, I posted this same question on Biostars and it was suggested I ask here for further clarification and link any additional information given here to that post as well. I am also asking some additional questions below after thinking about it more.

My design is:

design(dds) = ~ soilmoisture + fungal_tr + soilmoisture:fungal_tr

My understanding for results() is that:

(1) The fungal effect for soilmoisture W (the main effect):

results(dds2, contrast=c("fungal_tr","Fungus1","Sterile_Control")

(2) The fungal effect for soilmoisture D; this is, by definition, the main effect (W) plus the interaction term (the extra fungal effect in soilmoisture D compared to soilmoisture W):

results(dds, list(c("fungal_tr_Fungus1_vs_Sterile_Control","soilmoistureD.fungal_trFungus1"))

The two examples above always compare Fungus 1 to the Sterile Control within W or within D. However, is it possible to look at the differential expression of Fungus1 between W vs D and still account for the baseline of the Sterile Control? Basically I am interested in this:

          [D]                           [W]
(Fungus1 vs Sterile_Control) - (Fungus1 vs Sterile_Control)

I as well as the gentleman who helped me on Biostars were thinking simply calling the interaction term would accomplish this, based on the vignettes:

results(dds, name = 'fungal_tr_Fungus1.soilmoistureD')

However, I am worried the interaction term will not account for the reference level of the fungaltr(SterileControl) for each soilmoisture level (W and D).

One last question I had was that if you can use the interaction term and it does account for the reference level of the fungal_tr, how is it doing it? Is it subtracting the Sterile Control counts first? Is the subtraction it based on the Sterile Control counts or the expression change (LFC) relative to the Fungal1 in W and in D? Let me know if I need to clarify this last question! I would really like to understand the math behind how the model is working.

deseq2 rnaseq • 534 views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 2 hours ago
United States

Yes, the interaction term is that difference (refer to the diagram in the DESeq2 vignette section on interactions). It does account for the baselines (the reference level of the factors) for D and W when that difference is estimated.

Regarding "how is it doing it", for this you will have to refer to a statistical collaborator to walk through the use of interaction terms in linear models. This is beyond the scope of the software support I can provide due to limits on my time as a developer.

ADD COMMENT
0
Entering edit mode

Just to clarify so I understand your answer:

When calling the interaction term, in addition for accounting the baseline condition between the D and W treatments (the reference level being W), does it also account for ref level of fungal_tr (which is Sterile Control)?

Thank you for taking the time in answering my questions!

ADD REPLY
0
Entering edit mode

Yes, I think also I answered that above...

ADD REPLY

Login before adding your answer.

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