pydeseq2

Perform differential expression analysis on bulk RNA-seq data with PyDESeq2.

1|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/Victory-Hugo/S2-Agent-Skill --skill pydeseq2-victory-hugo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pydeseq2
Source: https://github.com/Victory-Hugo/S2-Agent-Skill/tree/main/skills/genomics/pydeseq2
Command: npx skills add https://github.com/Victory-Hugo/S2-Agent-Skill --skill pydeseq2-victory-hugo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pydeseq2, pandas, matplotlib, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a Python-based workflow to perform differential expression analysis on bulk RNA-seq data, enabling researchers to replace manual, ad-hoc pipelines with a reproducible, end-to-end DE analysis using PyDESeq2.

Core Features & Use Cases

  • Single-factor and multi-factor experimental design support for flexible modeling of condition, batch, age, and other covariates.
  • End-to-end DE analysis: normalization, dispersion estimation, log-fold changes, Wald tests, multiple testing correction (BH), and optional LFC shrinkage for visualization.
  • CLI/script-based workflow with run_deseq2_analysis.py for batch processing and easy integration into pipelines.

Quick Start

  • Install required packages: pip install pydeseq2 pandas numpy scipy matplotlib
  • Prepare counts.csv and metadata.csv in a samples × genes and samples × variables format (transpose if needed)
  • Run the provided script: python scripts/run_deseq2_analysis.py --counts counts.csv --metadata metadata.csv --design "~condition" --contrast condition treated control --output results/
  • After run, results will be saved to the output folder, including deseq2_results.csv, significant_genes.csv, and volcano/ma plots when requested.

Frequently Asked Questions about pydeseq2

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run differential expression analysis on bulk RNA-seq data in Python?

To perform differential expression analysis on bulk RNA-seq data, prepare a samples-by-genes counts CSV and a metadata CSV, then run the provided Python script with your design formula and contrast variables to generate normalized results and significance plots.

What is LFC shrinkage used for in RNA-seq differential expression workflows?

LFC shrinkage in RNA-seq differential expression is an optional step that refines log-fold change estimates for visualization, complementing Wald tests and BH multiple testing correction to produce more reliable significant gene lists.

Can I model multiple covariates like batch and age for RNA-seq differential expression?

Yes, RNA-seq differential expression analysis supports multi-factor experimental designs, allowing you to model multiple covariates like batch, age, and condition simultaneously alongside single-factor comparisons in Python.

Does PyDESeq2 support Wald tests and BH correction for RNA-seq analysis?

Yes, PyDESeq2 supports Wald tests and BH multiple testing correction for RNA-seq analysis, delivering end-to-end normalization, dispersion estimation, and significance testing to produce a ready-to-use differential expression results dataframe.

What is the best way to integrate DESeq2 analysis into a Python-based RNA-seq pipeline?

The best way to integrate DESeq2 analysis into a Python-based RNA-seq pipeline is via a CLI script that batch processes counts and metadata CSVs, automatically outputting differential expression results and volcano or MA plots.

What file formats do I need for bulk RNA-seq differential expression analysis?

For bulk RNA-seq differential expression analysis, you need a counts CSV formatted as samples by genes and a metadata CSV formatted as samples by variables, transposing the data if necessary before running the analysis.