Question: Trying to simplify Interaction analysis with edger, and propably failing to do so?
gravatar for David Rengel
19 months ago by
David Rengel70
European Union
David Rengel70 wrote:


I am running a 3-factor analysis on RNA-Seq data. Plants have been inoculated with either bacteria or a mock solution; different timepoints after inoculation have been harvested and, finally, at every timepoint, two different tissues have been harvested: the directly inoculated tissue (“IN” tissue) and the surrounding tissue to this one (“OUT” tissue). Thus, the three factors are: time, inoculation and tissue.

This design provides loads of possible contrasts when going through edger and, hence, I’d like to simplify or to “compile” certain contrasts.  For instance: when looking at the interaction between tissue and time (at timepoint Tx as compared to T0), I might look at what happens when bacteria are inoculated OR when Mock solution is inoculated. Like this:

Tissue:Tx_Bact = ((Bact_IN.Tx – Bact_OUT.Tx) - (Bact_IN.T0 – Bact_OUT.T0))

Tissue:Tx_Mock = ((Mock_IN.Tx – Mock_OUT.Tx) - (Mock_IN.T0 – Mock_OUT.T0))

However, in order to simplify things, I thought we were not necessarily interested in the interaction when Mock itself is concerned, but only in comparison with the interaction when bacteria are inoculated.  In other words, I thought it’d be a good idea to subtract the Tissue:Tx_Mock interaction to the Tissue:Tx_Bact interaction, in order to get genes that are specific to the tissue:Tx interaction only when bacteria is inoculated. Like this:

Tissue:Tx_Compiled = ((Bact_IN.Tx – Bact_OUT.Tx) - (Bact_IN.T0 – Bact_OUT.T0)) - ((Mock_IN.Tx – Mock_OUT.Tx) - (Mock_IN.T0 – Mock_OUT.T0))

What do I get in summary with those contrasts?

  • I only get Tissue:Tx_Mock DEGs at the first timepoint. This is OK, it makes sense in our system. Most of those genes (85% out of 554) are also Tissue:Tx_Bact at the same timepoint.  Interestingly though, I do not get Tissue:Tx_Compiled DEGs at the first timepoint.


  • From the second timepoint on, I only get Tissue:Tx_Bact AND/OR Tissue:Tx_Compiled DEGsAt every timepoint I get ~1K Tissue:Tx_Compiled DEGs and ~5K Tissue:Tx_Bact DEGsAlso, 99% of the former are included within the latter.

Is my way of reasoning “interactions” as it should? Am I really looking with Tissue:Tx_Compiled at the interaction when bacteria are involved because I subtract the “Mock” inoculation?

I hope all this is clear enough. I thank you for any advice you could provide me with.



ADD COMMENTlink modified 19 months ago • written 19 months ago by David Rengel70

I think you have a typo in your contrasts, because as written, they all sum to zero.

ADD REPLYlink written 19 months ago by Ryan C. Thompson7.4k

Indeed, sorry about that. I've corrected it. Thanks.

ADD REPLYlink written 19 months ago by David Rengel70
Answer: Trying to simplify Interaction analysis with edger, and propably failing to do s
gravatar for Ryan C. Thompson
19 months ago by
Scripps Research, La Jolla, CA
Ryan C. Thompson7.4k wrote:

So if I understand your contrast correctly, you want to identify genes that respond differently in each tissue at a given time point, where that differential response is specific to the bacterial treatment, not the mock treatment. If so, I believe you have the correct contrast. Keep in mind, however, that a contrast involving so many groups inherits all the random noise from all of those groups, so your power to detect differential expression on this large contrast may be limited.

Another tool you can use to compare contrasts is limma's genas function, which evaluates the degree to which two contrasts are consistent with each other. This can help you determine the degree to which Tissue:Tx_Bact and Tissue:Tx_Mock are similar or different at a given time point. (Note that if you used edgeR for your differential expression analysis, you'll need to re-fit the same model with voom and limma to use genas.)

ADD COMMENTlink modified 19 months ago • written 19 months ago by Ryan C. Thompson7.4k

Yes, just to second Ryan, your contrast seems correct. You are basically testing the three-way interaction term:

Bact_IN.Tx – Mock_OUT.T0 # Combined effect of three factors
= Bact_OUT.Tx + Bact_IN.T0 + Mock_IN_Tx - Bact_OUT.T0 - Mock_OUT.Tx - Mock_IN.T0
# sum of individual effects in double-treated vs. single-treated groups.

I wouldn't worry about the noise. If this is the contrast of interest, you'll just have to live with it. Of course, interactions are notoriously difficult to interpret, and it would be a good idea to report log-fold changes for individual pairwise contrasts. Otherwise, translating a positive (three-way) interaction term into a biological conclusion would be very difficult.

ADD REPLYlink modified 19 months ago • written 19 months ago by Aaron Lun25k

Ryan and Aaron,

Thanks for your very helpful remarks, as ever. I will have a look at geneas, of which I was unaware. I am not up to date on limma for RNA-Seq, even though I have used it in the past. Concerning the 3-way contrast, I will use it but also will look at doubles etc. When I deal with interaction, even if it is only double, I never mention FCs since I think it is, at best, misleading.



ADD REPLYlink written 19 months ago by David Rengel70
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 307 users visited in the last hour