pydeseq2
A python implementation of DESeq2.
What it is and what it does
PyDESeq2 is a Python port of the widely-used R package DESeq2, designed to make differential expression analysis accessible to Python users working with bulk RNA-seq data. It implements statistical methods for comparing gene expression across experimental conditions, handling count normalization, dispersion estimation, and hypothesis testing. The package works with data in AnnData format and depends on standard scientific Python libraries: numpy, pandas, scipy, scikit-learn, matplotlib, and formulaic for design matrix specification.
The implementation currently covers single-factor and multi-factor experimental designs using Wald tests, matching the default behavior of DESeq2 v1.34.0. As a re-implementation from scratch rather than a direct wrapper, it may produce slightly different numerical results or lack some advanced features of the original R package. The project is actively maintained by the scverse community and welcomes feature requests via issue tracking.
Use it for:
- Compare gene expression between treatment and control groups in bulk RNA-seq experiments
- Analyze multi-factor designs (e.g., treatment × genotype) to identify condition-specific effects
- Normalize and standardize RNA-seq count data for downstream statistical testing
- Integrate differential expression results into Python-based bioinformatics pipelines using AnnData
- Identify significantly differentially expressed genes with multiple testing correction
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyDESeq2 performs differential expression analysis on bulk RNA-seq data using a Python implementation of the DESeq2 statistical method, supporting single-factor and multi-factor analysis with Wald tests.
Yes, if you work with bulk RNA-seq data in Python and need DESeq2-compatible statistical analysis. The package has low install friction, active maintenance, permissive licensing, and no known vulnerabilities. Install with caution if you require exact numerical equivalence to the original R DESeq2 or advanced features beyond Wald tests—verify feature completeness against your specific experimental design first.
Install
pydeseq2 on PyPI
pip
pip install pydeseq2uv
uv add pydeseq2poetry
poetry add pydeseq2Installing pydeseq2
Before you install
Low install friction with a pure-wheel distribution. Actively maintained as of August 2026 with recent commits; transferred to scverse community maintenance in December 2025. Tested against Python 3.11–3.13 with current versions of its eight runtime dependencies.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for academic, commercial, and proprietary projects.
Quickstart
pip install pydeseq2
import anndata
from pydeseq2.dds import DeseqDataSet
# Load count data into AnnData object
ads = anndata.read_h5ad('counts.h5ad')
# Initialize and run DESeq2 analysis
dds = DeseqDataSet(adata=ads, design_factors=['condition'])
dds.deseq2()
Requires Python 3.11 or higher; input data must be in AnnData format or convertible to it.
Verify before relying
- Completeness of feature parity with DESeq2 v1.34.0 beyond single/multi-factor Wald tests
- Performance characteristics on large-scale datasets (sample size, gene count thresholds)
- Availability of downstream analysis tools (e.g., visualization, result filtering) within the package
Package facts
| License | MIT License Copyright (c) 2022 Owkin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — anndata, formulaic-contrasts, formulaic, matplotlib, numpy, pandas, scikit-learn, scipy |
| Maintenance | actively maintained — 203 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 178,023/month — #10,202 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pydeseq2-0.5.4-py3-none-any.whl
Tags
More Information Analysis packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyarrowpyarrow provides Python bindings to Apache…
permissive · top 100 on PyPI
networkxNetworkX provides data structures and…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
snowflake-snowpark-pythonSnowpark Python provides APIs to query and…
permissive · top 1,000 on PyPI
scanpyScanpy is a toolkit for preprocessing,…
permissive · top 5,000 on PyPI
ViennaRNAViennaRNA provides Python bindings to a C…
unclear · top 15,000 on PyPI
multiqcMultiQC scans bioinformatics analysis…
copyleft · top 15,000 on PyPI
gseapyPerforms gene set enrichment analysis (GSEA) on…
permissive · top 15,000 on PyPI
cellxgene-censusProvides a Python API to query and retrieve…
permissive · top 15,000 on PyPI
gtfparseParses GTF (gene transfer format) files into…
permissive · top 15,000 on PyPI
pyhmmerPyHMMER provides Python bindings to HMMER3, a…
permissive · top 5,000 on PyPI
formulaic-contrastsBuilds arbitrary contrasts for statistical…
permissive · top 15,000 on PyPI
cobraCOBRApy is a constraint-based modeling package…
copyleft · top 15,000 on PyPI
pyensemblPyEnsembl provides a Python interface to query…
permissive · top 15,000 on PyPI