saeyslab / multinichenetr

MultiNicheNet: a flexible framework for differential cell-cell communication analysis from multi-sample multi-condition single-cell transcriptomics data
GNU General Public License v3.0
107 stars 14 forks source link

Random effects covariates #63

Closed tomthomas3000 closed 4 months ago

tomthomas3000 commented 4 months ago

Thank you for making such a useful package. Quick query: at present there does not seem to be a way of treating covariates as random effects. Could this be a future enhancement? I am guessing that I can simply make the necessary adjustments in muscat_de.R? Many thanks.

browaeysrobin commented 4 months ago

Hi @tomthomas3000

You are correct that in the current implementation, there is no direct way of treating covariates as random effects. This is because we are making use of a pseudobulking+EdgeR framework that does not make use of mixed models. While developing the package, we did not integrate the muscat cell-level mixed models in our framework because of high computational time and code problems in assessing complex contrasts/designs.

In theory, this could be a future enhancement - just like any other improvement at the DE level. Feel free to open a pull request with new functionalities, as long as the DE function fits within the inputs and outputs of the entire pipeline. For us, this is not a priority though, which makes it very unlikely we will work on this given all other priorities ;-).