limma fo continous variables
1
0
Entering edit mode
mia • 0
@0579fb2f
Last seen 8 weeks ago
Germany

I want to use BMI as a continuous outcome variable. Not to divide in groups. To do this, I use limma. But I am not sure limma is suitable to directly use continuous variable as outcome based on no divide groups.

If i cann't do this, and need consider for eaxmple linear regression model, what input data should i put in linear regression model? just use CPM data or use calcNormFactors() like limma package do, to adjust count then transform to CPM?

My code is as below:

design <- model.matrix(~  BMI+ age + sex + activities +
                     SBP + TG + smoking + HDL + Glu + WBC + Batch))
rownames(design) = colnames(count)

y <- voom(d, design, plot = F)

fit <- lmFit(y, design)
head(coef(fit))
tmp <- contrasts.fit(fit, coef = 2) # test "pH" coefficient
tmp <- eBayes(fit)
summary(decideTests(fit))
top.table <- topTable(tmp, sort.by = "P", n = Inf, adjust.method = "BH", coef = 2)
head(top.table, 20)
length(which(top.table$adj.P.Val < 0.05))))
rownames(design) = colnames(count)

y <- voom(d, design, plot = F)

fit <- lmFit(y, design)
head(coef(fit))
tmp <- contrasts.fit(fit, coef = 2) # test "pH" coefficient
tmp <- eBayes(fit)
summary(decideTests(fit))
top.table <- topTable(tmp, sort.by = "P", n = Inf, adjust.method = "BH", coef = 2)
head(top.table, 20)
length(which(top.table$adj.P.Val < 0.05))

sessionInfo( )
limma DEGseq • 540 views
ADD COMMENT
0
Entering edit mode
@gordon-smyth
Last seen 1 hour ago
WEHI, Melbourne, Australia

limma and voom work with any linear model. There can be any combination of continous covariates and categorical factors. The only requirement is that there should be enough samples to estimate all the model coefficients with some degrees of freedom left over to estimate the variance.

ADD COMMENT
0
Entering edit mode

Thanks for your reply, because my outcome is a continuous variable, If i want do use linear regression model, what input data should i put in linear regression model? just use CPM data or use calcNormFactors() like limma package do, to adjust count then transform to CPM or use vst in DESeq2 to adjust that?

ADD REPLY
0
Entering edit mode

Sorry, I can't make sense of what you are saying.

You say that BMI is an outcome variable, but your code shows that BMI is a covariate in the linear model, so it is a predictor and not an outcome variable.

You are using voom so you must be working with sequence read counts, which means you do not have a continuous outcome variable.

What exactly is the problem?

ADD REPLY
0
Entering edit mode

When i try to just use linear regression model, the code is as below, BMI is my outcome and its a continious variable

for (i in 12:12852){
  model_linear <- lm(BMI ~ co_data[,i] + batch + age + sex + activities +
                       SBP + TG + smoking + HDL + Glu + WBC, data = co_data) 
  outcome <- rbind(outcome, c(colnames(co_data)[i], coef(summary(model_linear))[2, c(1,2,4)]))
}
ADD REPLY
0
Entering edit mode

That doesn't have anything to do with limma.

ADD REPLY
0
Entering edit mode

May I add an in-between point of view? For each gene, the outcome is the reads count in the samples of the experiment. The design matrix specifies the covariates associated to the samples. The covariates are supposed to affect the reads count of some genes. If I simplified, I suspect that what you want to achieve is : design <- model.matrix(~BMI) in order to find genes for which the coefficient associated to BMI is statistically significant. You call BMI the outcome but it is a covariate when modelling the reads count. Hope this shortcut will help.

ADD REPLY
0
Entering edit mode

yes ,but i don't want to use limma, try to use linear regression or negative biominal to caculate significant genes, continous variable BMI is my outcome, i am not sure which i should use, cpm or normalization count , or TPM

ADD REPLY
0
Entering edit mode

yes, the follow question isn't related to limma

ADD REPLY
0
Entering edit mode

If you aren't asking about Bioconductor packages, you are off-topic for this site. You might try over on biostars.org instead.

ADD REPLY

Login before adding your answer.

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