ahmohamed / lipidr

Data Mining and Analysis of Lipidomics datasets in R
https://www.lipidr.org/
Other
27 stars 13 forks source link

Batch effect #32

Closed DavidGO464 closed 2 years ago

DavidGO464 commented 2 years ago

Hi

I wonder how lipidr can manage the batch effect. I have a dataset of more than 1500 lipids and 200+ samples, but this is a merge of 6 batches.

thanks for your answer

ahmohamed commented 2 years ago

Hi David, Sounds exciting!

Two options, both are borrowed from limma package. 1. limma::removeBatchEffects which corrects your numerical matrix for batch effects.

  1. Include batch in your design matrix (https://www.lipidr.org/reference/de_analysis.html):
    design <- model.matrix(~ batch + group, data = colData(data_normalized))
    de_design(data, design)