Three way-interaction on voom (limma) data, including a factor with > 2 levels
2
0
Entering edit mode
David R ▴ 90
@david-rengel-6321
Last seen 11 months ago
European Union

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 voom anova • 2.3k views
ADD COMMENT
2
Entering edit mode
Aaron Lun ★ 28k
@alun
Last seen 4 hours ago
The city by the bay

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

Thanks a lot. 

Best,

David

ADD REPLY
0
Entering edit mode

Dear Aaron Lun, do you have a source (textbook, manual) teaching the parametrization of such contrast matrices? I've already read Limma's reference manual, this reference and this one. But they do not included three-way interactions or more than two factor variables when building contrast matrices.

I'm asking because of all related posts here you're always very knowledgeable.

Thank you very much.

ADD REPLY
0
Entering edit mode
David R ▴ 90
@david-rengel-6321
Last seen 11 months ago
European Union

This anwser was deleted and added as a comment above

ADD COMMENT

Login before adding your answer.

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