pydeseq2

Run bulk RNA-seq differential expression with Wald statistics and FDR-adjusted p-values.

783|65|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/LeonChaoX/qinyan-academic-skills --skill pydeseq2-leonchaox
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pydeseq2
Source: https://github.com/LeonChaoX/qinyan-academic-skills/tree/main/skills/05-%E7%94%9F%E7%89%A9%E4%BF%A1%E6%81%AF%E4%B8%8E%E5%9F%BA%E5%9B%A0%E7%BB%84%E5%AD%A6/pydeseq2
Command: npx skills add https://github.com/LeonChaoX/qinyan-academic-skills --skill pydeseq2-leonchaox

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates bulk RNA-seq differential gene expression analysis, turning count matrices and sample metadata into statistically tested DE gene results with interpretable metrics and plots.

Core Features & Use Cases

  • Bulk RNA-seq DE workflow (DESeq2 in Python): Fit full pipelines from normalization through dispersion/LFC estimation for single-factor and multi-factor designs.
  • Wald testing with FDR correction: Compute log2 fold changes and adjusted p-values for differential expression discovery.
  • Result interpretation & visualization: Support volcano/MA-style diagnostics and provide troubleshooting guidance for common data and design issues.
  • Design-aware modeling: Handle batch covariates and interactions using Wilkinson-style design formulas.

Quick Start

Ask the agent to run DESeq2-style differential expression on your counts.csv and metadata.csv using the design formula "~condition" and the contrast condition treated control, then export significant genes with padj < 0.05 into a results folder.

Frequently Asked Questions about pydeseq2

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

FAQPage Schema
How do I run bulk RNA-seq differential expression in Python using count matrices?

Bulk RNA-seq differential expression converts a non-negative integer samples-by-genes counts DataFrame and matching metadata into DE gene calls. You provide a Wilkinson-style design string and contrast specification to compute Wald statistics and FDR-adjusted p-values.

Can I handle batch covariates and multi-factor designs for differential gene expression?

Yes, multi-factor designs and batch covariates are supported by specifying the appropriate Wilkinson-style design formula. This allows the model to account for confounding variables while testing your specified contrast for differential expression.

What is the best way to stabilize log2 fold changes for RNA-seq visualization?

Optional LFC shrinkage provides more stable effect sizes for bulk RNA-seq visualization and interpretation. Applying this during differential expression testing reduces noise in log2 fold change estimates for downstream diagnostic plots like volcano or MA plots.

Do I need raw integer counts to calculate FDR-adjusted p-values for DE genes?

Yes, differential expression testing requires counts as non-negative integer values in a samples-by-genes DataFrame. Normalized or non-integer inputs are not valid for computing accurate Wald statistics and FDR-adjusted p-values.

Why does my DESeq2 contrast specification fail with a single-factor design?

A valid contrast specification is required for testing differential expression even in single-factor designs. You must ensure the contrast matches a variable present in your Wilkinson-style design formula and metadata to successfully compute gene calls.

What are the limitations of using a Python DESeq2 workflow for bulk RNA-seq?

This workflow is limited to bulk RNA-seq data and requires matching sample indices between counts and metadata. It does not process single-cell RNA-seq or accept non-integer count matrices for computing Wald statistics and FDR-adjusted p-values.