pydeseq2

Differential gene expression analysis (Python DESeq2). Identify DE genes from bulk RNA-seq counts, Wald tests, FDR correction, volcano/MA plots, for RNA-seq analysis.

Category

Other Tools

Install

Hot:6

Download and extract to your skills directory

Copy command and send to OpenClaw for auto-install:

Download and install this skill https://openskills.cc/api/download?slug=k-dense-ai-scientific-skills-pydeseq2&locale=en&source=copy

PyDESeq2 - Python differential gene expression analysis tool

Overview of capabilities


PyDESeq2 is a Python implementation of DESeq2, designed for differential expression analysis of bulk RNA-seq data. It performs a complete transcriptome analysis workflow from data loading to result visualization without relying on an R environment, and supports multi-factor designs, batch effect control, and Wald tests.

Suitable scenarios

1. RNA-seq differential expression analysis


When you need to compare gene expression differences under different experimental conditions (e.g., drug-treated vs. control), PyDESeq2 can automatically perform data normalization, statistical testing, and multiple hypothesis correction, outputting a reliable list of differentially expressed genes.

2. Multi-factor experimental designs


It supports complex experimental scenarios and can analyze the effects of multiple variables on gene expression simultaneously. For example, when accounting for batch effects, you can control technical variation using a design formula like ~batch + condition to accurately identify biological differences.

3. Migrating bioinformatics analyses from R to Python


If you are familiar with the R version of DESeq2 but want to work in the Python ecosystem, PyDESeq2 provides the same core algorithms and integrates seamlessly with common Python libraries such as pandas and AnnData, making it easy to build a complete Python analysis pipeline.

Core features

1. Full DESeq2 workflow


Implements all key steps of DESeq2: size factor normalization, dispersion estimation, Wald test, and FDR correction (Benjamini-Hochberg). Supports low-count filtering, outlier detection (Cook's distance), and LFC shrinkage (apeGLM).

2. Flexible statistical analyses


Supports both single-factor and multi-factor experimental designs and can include continuous covariates (e.g., age) and categorical variables (e.g., batch). Provides contrast testing functionality, allowing flexible specification of comparison groups, and generates complete result tables containing log2FC, pvalue, and padj.

3. Result visualization


Includes built-in functions to generate volcano plots and MA plots for intuitive visualization of statistical significance and expression changes of differentially expressed genes. Supports further customization of visualizations using matplotlib and seaborn, suitable for publication figures and result presentation.

Frequently asked questions

What type of data is PyDESeq2 suitable for?


PyDESeq2 is specifically intended for differential expression analysis of bulk RNA-seq count data. Inputs should be a non-negative integer gene count matrix (samples × genes) and experimental metadata. It is not suitable for single-cell RNA-seq data (tools like scanpy are recommended) or for already normalized expression data (e.g., TPM/FPKM).

How are batch effects handled in experiments?


Include the batch variable in the design formula to control for batch effects, for example design="~batch + condition". PyDESeq2 will model batch variation first and then test the condition effect, thereby correcting for technical differences. It is recommended to first check samples to ensure that batch and experimental condition are not confounded.

What is the difference between padj and pvalue in the results?


pvalue is the raw p-value from the Wald test, while padj is the adjusted p-value after Benjamini-Hochberg FDR correction. When determining whether a gene is significantly differentially expressed, use padj < 0.05 as the threshold; this controls the false discovery rate at 5% and helps avoid many false positives.