PyDESeq2
PyDESeq2 copied to clipboard
A Python implementation of the DESeq2 pipeline for bulk RNA-seq DEA.
**Describe the bug** Under certain circumstances, `dds.deseq2()` crashes with a `UnboundLocalError: local variable 'beta_init' referenced before assignment` (originating in [pyydeseq2/utils.py](https://github.com/owkin/PyDESeq2/blob/7a4032d6cd0948184a477a2b21cc982501552147/pydeseq2/utils.py#L562)) From what I can tell, two conditions have to be...
#### Reference Issue or PRs Fixes #280 #### What does your PR implement? Be specific. Initialize `beta_init` in irls even when the design matrix is not full rank. This prevents...
#### Reference Issue or PRs Fix #263 #### What does your PR implement? Be specific. Proposed solution : - A `self.fit_type` is defined at class initialisation and will by default...
**Is your feature request related to a problem? Please describe.** Most linear models support passing designs as design matrices and contrasts as contrast vectors. This is the "smallest common denominator"...
This PR has several purposes: - it leverages [formulaic]((https://matthewwardrop.github.io/formulaic/guides/contrasts/#treatment-aka-dummy)) to allow using interaction terms of the form `a:b:...:z`for `design_factors` and formulas based on a combination of single design factors and...
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...
[BUG] The vst() function does not work when the algorithm switches to a mean-based dispersion trend.
**Describe the bug** Calling the vst() leads to the fit_type variable being hard-coded to the chosen fit_type. Consequently when the vst_transform is called it breaks with: ` File ".venv/lib/python3.10/site-packages/pydeseq2/dds.py", line...
The original DESeq2 package enables one to specify "control genes" that are used to fit the size factors. These are genes that are not expected to be changing between samples....
**The Issue: Iterative Mode Hangs** RuntimeWarning: Every gene contains at least one zero, cannot compute log geometric means. Switching to iterative mode. But iterative mode just gets stucked, without completing:...
When I attempt to save my `DeseqDataSet` AnnData object to H5AD, errors are thrown becuase 1. `dds.varm['replaced']` 2. `dds.uns['trend_coeffs']` are stored as a `pandas.core.series.Series`, which cannot be written to H5AD...