Question: Three way-interaction on voom (limma) data, including a factor with > 2 levels
0
gravatar for David Rengel
2.5 years ago by
David Rengel70
European Union
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)

rnaseq limma anova voom • 649 views
ADD COMMENTlink modified 2.5 years ago • written 2.5 years ago by David Rengel70
Answer: Three way-interaction on voom (limma) data, including a factor with > 2 levels
2
gravatar for Aaron Lun
2.5 years ago by
Aaron Lun25k
Cambridge, United Kingdom
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.

ADD COMMENTlink modified 2.5 years ago • written 2.5 years ago by Aaron Lun25k

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

ADD REPLYlink modified 2.5 years ago • written 2.5 years ago by David Rengel70

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. 

ADD REPLYlink written 2.5 years ago by Aaron Lun25k

Thanks a lot. 

Best,

David

ADD REPLYlink written 2.5 years ago by David Rengel70
Answer: Three way-interaction on voom (limma) data, including a factor with > 2 levels
0
gravatar for David Rengel
2.5 years ago by
David Rengel70
European Union
David Rengel70 wrote:

This anwser was deleted and added as a comment above

ADD COMMENTlink modified 2.5 years ago • written 2.5 years ago by David Rengel70
Please log in to add an answer.

Help
Access

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