How to use limma to find differentially expressed genes in response to a continuous variable
Entering edit mode
8 weeks ago
pairedttest ▴ 30

So I have 250 samples, and each of the samples has a "score" which is a continuous distribution of floating point numbers. I have followed the typical limma-voom workflow ( up to the point where it is time to fit the linear model and make contrasts.

My model matrix is

mm <- model.matrix(~score + subtype)

Where subtype is a covariate because we assume cell subtype is a confounding variable. Anyway, I fit the linear model with

fit <- lmFit(y, mm)

Now I want to test to see which genes are correlated with the score variable. However, I am not sure how to make a contrast for this, since I am not contrasting two different variables and am instead measuring gene expression against a continuous variable. Does anyone have any insights here please?

limma voom R • 458 views
Entering edit mode
8 weeks ago
Gordon Smyth ★ 7.2k

There's no need for form a contrast because the score variable is already in the model. A continuous variable is its own contrast. Just run the usual limma pipeline and test for score:

fit <- eBayes(fit)
topTable(fit, coef="score")

Login before adding your answer.

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