differentially expressed genes without contrasts
Entering edit mode
hoe • 0
Last seen 4.1 years ago


I'm confused about how to identify differentially expressed genes (DEGs) in a single-channel expt.

Is it possible to identify DEGs without making a contrast.matrix?

I saw examples just did:

fit <- lmFit(...)

fit <- eBayes(fit)

tt <- topTable(fit, coef=2)

All DEGs are stored in tt

However, when I looked up the limma user guide (version 2016) in section 9.6, the example used contrast.matrix.

Can someone help?

Thanks Eric.


limma toptable makecontrasts contrast matrix • 531 views
Entering edit mode
Last seen 11 months ago
Scripps Research, La Jolla, CA

If one of your model coefficients already corresponds to the hypothesis you want to test, then you do not need a contrast. Otherwise, the purpose of contrasts is to express the linear combination of coefficients that represents your hypothesis.

Entering edit mode

I think my answer can be found in chapter 9 (2016 edition) on p.40-41. For a fixed reference group, there is no need to construct a contrast.matrix because eBayes and topTable always use 'intercept' or coef=1 as the reference for comparison. For this scenario, design <- model.matrix(~conditions). conditions is a factor variable defining the experimental conditions including the reference.

However, if a fixed reference group is not applicable for your problem. More flexibility can be accommodated by building a contrast.matrix. In such case, you can contrast different experimental conditions. The design must be defined as:

design <- model.matrix(~0+conditions)

In such case, you can compare e.g. condition3-condition2, condition2-condition1, by

cont.matrix <- makeContrasts(C3vsC2=condition3-condition2, C2vsC1=condition2-condition1, levels=design)


Login before adding your answer.

Traffic: 602 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6