How to use limma to find differentially expressed genes in response to a continuous variable
1
0
Entering edit mode
8 months 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 (https://ucdavis-bioinformatics-training.github.io/2018-June-RNA-Seq-Workshop/thursday/DE.html) 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 • 859 views
ADD COMMENT
4
Entering edit mode
8 months ago
Gordon Smyth ★ 7.7k

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")
ADD COMMENT

Login before adding your answer.

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