What's Changed
This version marks a shift towards [`formulaic`](https://github.com/matthewwardrop/formulaic) designs, i.e. formula like `"~condition + treatment"`, `"~condition + condition:treatment"`, `"~condition + exp(cofactor)"`, etc.
BREAKING CHANGE
python 3.9 is no longer supported.
`DeseqDataSet`
* Designs should now be provided to `DeseqDataSet` using the `design` argument, either in the form of a string representing a `formulaic` formula (e.g. `"~condition + treatment"`, `"~condition + condition:treatment"`, `"~condition + exp(cofactor)"`...), or an ndarray directly corresponding to a design matrix.
* `design_factors` is still supported but throws a `DeprecationWarning`
* `continuous_factors` is deprecated, as continuous type inference is handled by `formulaic`
* `ref_level` is deprecated
* Due to new decorated methods, `DeseqDataSet` is no longer picklable. A `to_picklable_anndata()` method was added to allow users to pickle results for later use.
`DeseqStats`
* Default contrasts are no longer supported, as they lead to too many errors
* Contrasts may be provided as before for categorical variables (e.g. `["treatment", "test", "control"]`), or directly in the form of a contrast vector (a numpy array).
* For now, contrasts for continuous variables are directly specified with a contrast vector.
* `lfc_shrink` no longer supports a default `coef` argument
Changelog
* ENH Generic design support using `formulaic` by BorisMuzellec in https://github.com/owkin/PyDESeq2/pull/328
* MAINT Deprecated `pandas.DataFrameGroupBy.grouper` by BorisMuzellec in https://github.com/owkin/PyDESeq2/pull/332
**Full Changelog**: https://github.com/owkin/PyDESeq2/compare/v0.4.12...v0.5.0pre1
Acknowledgements
jeandut worked on a first version of `formulaic` support in 181.
Thanks grst and umarteauowkin for your reviews and suggestions!