Please correct me if i am wrong, do i separately adjust for biological covariates using limma and batch effect using ComBat? what shall be performed first?
Hello,
In RNA sequencing data, I want to adjust for the covariates such as age, BMI, sex etc. I have created colData with these covariates and factorised (for binary) and scaled (for continuous) them. My concern is I have normalised the data and then applying adjustment. However, during adjustment using both voom and removeBatchEffect, will they double adjust the data or is it the right way to perform this. Please see below the functions used.
design_matrix <- model.matrix(~Age + Gender + BMI +
Batch + Condition, data=colData)
v <- voom(raw_counts, design_matrix, plot=TRUE)
fit <- lmFit(v, design_matrix)
adjusted_counts <- removeBatchEffect(v$E, covariates=phenodata[, c("Age", "BMI", "Batch")]).
This is because I wish to use this matrix for correlation studies and not for differential gene expression analysis.
Is there any other way to adjust for covariates?
Thank you,
1 answer
You apply ComBat_seq on the raw counts (your raw_counts object, probably). You can include batch effects to be removed and, optionally, biological effects to preserve. For differential expression you still work as in your post (voom on raw_counts then lmFit). Note that in this way the workflow to correct expression values is going to be completely unrelated to the differential expression workflow so there's no point in asking which one comes first.
Sure, thank you so much.
Log in to answer this question.
Cross-posted to Bioconductor https://support.bioconductor.org/p/9158852/