PyDESeq2 is a Python implementation of the DESeq2 method for differential expression analysis (DEA) with bulk RNA-seq data. It enables researchers to perform single-factor and multi-factor designs, Wald tests with multiple testing correction, and optional LFC shrinkage. The library is actively maintained, with version 0.5.4 being the latest stable release, and it is part of the scverse ecosystem, integrating with AnnData for data handling.
pip install pydeseq2Verified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates a typical PyDESeq2 workflow for differential expression analysis. It covers loading data, initializing a `DeseqDataSet` with a `formulaic` design string, running the DESeq2 pipeline, performing Wald tests, and applying LFC shrinkage. Results are accessible via the `DeseqStats` object's `results_df` attribute.
Upgrade your Python environment to 3.11 or higher.
Update your `DeseqDataSet` initialization to use a `formulaic` string (e.g., `design='~condition + batch'`). Ensure your Python version is >=3.11.
If accessing 1D variables, check `dds.obs` or `dds.var` instead of `dds.obsm` or `dds.varm`.
Upgrade PyDESeq2 to v0.5.4 or newer to ensure full compatibility with pandas 3.x.
Consult the PyDESeq2 documentation for specific implementation details and known differences if comparing results with R's DESeq2.
Install the package using pip: 'pip install pydeseq2'.
Update the import statement to: 'from pydeseq2 import DeseqDataSet'.
Provide the design as a string formula, e.g., 'design="~ condition"'.
Upgrade your Python environment to version 3.11 or higher.
Refer to the latest documentation for the correct function name and usage.