Question: Three way-interaction on voom (limma) data, including a factor with > 2 levels
0
David Rengel70 wrote:

Hi,

I am treating some RNASeq data whose experimental design includes three factors. I am interested, at first, in retrieving those genes showing the triple interaction, using voom + lmFit. I’ve read several posts on the matter, but none answered my question, so much so considering that one of my factors (i.e. time) presents multiple levels, and not just two. Is there any way to get the triple interaction out of this? IF so, should I always go through the makeContrast option and not writing the model as in “~factor1*factor2*factor3”?

I paste a code here below. Any help will be much appreciated. Thanks a lot.

David

design.factor <- paste(rep(c("Mock","Bact"),each=30),

rep(rep(c("in","out"),each=15),2),

rep(rep(c("0h","1h","2h","4h","6h"),each=3),2),sep=".")

library(edgeR)

dge <- DGEList(counts=counts, group=design.factor)

dge <- calcNormFactors(dge)

library(limma)

dge.voom <- voom(dge,plot=TRUE)

design=model.matrix(~0+design.factor)

fit <- lmFit (dge.voom,design)

Answer: Three way-interaction on voom (limma) data, including a factor with > 2 levels
2
Aaron Lun25k wrote:

The interpretation of the three-way interaction is the same regardless of how many levels you have. Let's consider the Mock:out:1h interaction term. This represents the combined effect of the 3 "treatments", i.e.,

Mock.out.1h  # triple treatment
- Bact.in.0h # no treatment

... minus the sum of the individual effects of each treatment in the double-treated groups, i.e.,

Mock.in.1h + Mock.out.0h + Bact.out.1h    # double-treated
- (Mock.in.0h + Bact.out.0h + Bact.in.1h) # single-treated

(The dot-separated names refer to groups in design.factor.) Here, a non-zero interaction term indicates that there is some extra effect from doing all three treatments together, compared to taking the sum of the individual effects. If the individual effects are not obvious, consider that Mock.in.1h - Mock.in.0h is the 1h effect; Mock.out.0h - Bact.out.0h is the Mock effect; and Bact.out.1h - Bact.in.1h is the out effect. Of course, Mock.in.1h - Bact.in.1h is an equally good Mock effect, and so on; you can subtract any single-treated group from any double-treated group to get one of the individual effects.

So, you can just stitch up the above terms into a single makeContrasts call:

(Mock.out.1h - Bact.in.0h)
- ((Mock.in.1h + Mock.out.0h + Bact.out.1h)
- (Mock.in.0h + Bact.out.0h + Bact.in.1h))

A bit more typing and prone to coding mistakes; but it is more explicit, which makes it easier to interpret.

Hi Aaron,

Thanks for such a helpful answer. Actually, I had started with a linear approach because I cuold not see how to implement a triple interaction on edgeR. HOwever, provided that I may do so with makeContrasts; I'd rather stick to the original edgeR pipeline. What do ou think? Thanks again.

David

How you parameterize your design matrix is independent of the choice between limma or edgeR. Any design matrix and contrasts that work for one analysis pipeline will work for the other.

Thanks a lot.

Best,

David

Answer: Three way-interaction on voom (limma) data, including a factor with > 2 levels
0
David Rengel70 wrote:

This anwser was deleted and added as a comment above