owkin / PyDESeq2

A Python implementation of the DESeq2 pipeline for bulk RNA-seq DEA.
https://pydeseq2.readthedocs.io/en/latest/
MIT License
573 stars 60 forks source link

Simplify naming convention conversion between pydeseq2 and formulaic #272

Open jeandut opened 4 months ago

jeandut commented 4 months ago

This information is already available from formulaic directly. When design is your design matrix, there is

design.model_spec.variable_terms

and

design.model_spec.term_variables

to map from variables to formulae terms and vice versa.

_Originally posted by @grst in https://github.com/owkin/PyDESeq2/pull/181#discussion_r1549442869_

The complex logic used to handle interaction terms could indeed be simplified (as long as this logic is still needed).