differentialabundance icon indicating copy to clipboard operation
differentialabundance copied to clipboard

Support for linear mixed effects models via DREAM

Open grst opened this issue 11 months ago • 3 comments

Description of feature

In #325/#339, an attempt was made to add support for limma mixed models. However, I believe this approach is not ideal for the following reasons

  • Limma supports only one random effect variable
  • It requires to manually combine multiple experimental factors into a single variable, therefore making it cumbersome to use

Alternatively, I propose to add support for a linear mixed effects model that generalizes to an arbitrary number of random effects and allows to specify random effect variables using Wilkinson formulas, e.g. ~ timepoint + (1 | patient_id).

An obvious candidate would be DREAM which is a generalization of limma/voom for random effects. It's certainly a good choice for gene expression data as it also does the empirical bayes shrinkage of gene dispersions.

However, there's also other models that could be condidered, e.g. MRMM, or plain lme4 models.

Depends on #362 for the Wilkinson formulae Mixed effects models are also a way of addressing technical replicates -> fixes https://github.com/nf-core/differentialabundance/issues/220

CC @apeltzer @tschwarzl @nschcolnicov @atrigila @alanmmobbs93

grst avatar Dec 02 '24 09:12 grst

IMO DREAM is the prime candidate for mixed effect models on expression data.

  • [ ] create module for DREAM. It should work farily similar as the limma module
  • [ ] add DREAM to differential subworkflow.

grst avatar Dec 20 '24 10:12 grst

@nschcolnicov @atrigila @grst @apeltzer The basic module and a preliminary position within the workflow is completed. I'll work on defining some parameters that can be used to customize the modeling in Dream (like limma and deseq2). Later, we need to update the yml structure to decide how/when to call this module with the formula/contrasts definition. I think it can be used in parallel with deseq2 when there's no random variables associated as well. Just to open debate

alanmmobbs93 avatar Dec 30 '24 12:12 alanmmobbs93

Let's keep this open until it's actually in the pipeline

grst avatar Mar 26 '25 07:03 grst

This is now merged in dev #446

grst avatar May 21 '25 08:05 grst