Claude Skill MartBrowse skillsWhat is a Skill?
Back to list

PyDESeq2 Differential Expression

Run a complete bulk RNA-seq differential expression analysis in Python with PyDESeq2, from raw counts to volcano plots.

Data & AnalyticsAdvanced33,0303,248AI score 8/10Last updated: Aug 9, 2026

What it does

Gives Claude a full playbook for differential expression (DE) analysis of bulk RNA-seq counts using PyDESeq2, the Python port of DESeq2.

  • Loads counts/metadata, fixes orientation (samples × genes), filters low-count genes
  • Builds formulaic designs (~condition, ~batch + condition, interaction terms) with explicit reference levels
  • Fits size factors, dispersions and the GLM, then runs Wald tests with Benjamini-Hochberg FDR control
  • Applies apeGLM LFC shrinkage for ranking and plotting
  • Produces volcano plots, MA plots and QC checks (p-value and dispersion distributions)
  • Exports CSV results and portable AnnData/H5AD; ships a CLI script (scripts/run_deseq2_analysis.py) for batch runs

A troubleshooting section covers index mismatches, non-full-rank design matrices and "no significant genes" scenarios.

Who it's for

  • Bioinformaticians porting R DESeq2 workflows into Python pipelines
  • Analysts handling multi-factor designs with batch effects or covariates
  • Core facilities running the same DE protocol across many datasets

Examples

  1. "Using counts.csv and metadata.csv, compare treated vs control and list genes with padj < 0.05 and |log2FC| > 1."
  2. "I suspect batch effects — rerun with ~batch + condition and show a crosstab to check for confounding."
  3. "Save 300dpi volcano and MA plots, then apply LFC shrinkage and give me the top 20 genes as a table."

· · · Install guide · · ·

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on Claude Skill Mart.
Copy the skills/pydeseq2 folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/pydeseq2/.
When it's done, tell me in one line what this skill can do.

Install with a command instead

git clone https://github.com/K-Dense-AI/scientific-agent-skills.git /tmp/scientific-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/scientific-agent-skills/skills/pydeseq2 ~/.claude/skills/

This is a third-party skill. Check the source repository before installing.

  1. Open a terminal and clone the repository: git clone https://github.com/K-Dense-AI/scientific-agent-skills.git
  2. Create the skills directory: mkdir -p ~/.claude/skills
  3. Copy just this skill: cp -r scientific-agent-skills/skills/pydeseq2 ~/.claude/skills/
  4. Set up Python 3.11+ and install dependencies: uv pip install pydeseq2==0.5.4 matplotlib seaborn
  5. Restart Claude Code, then ask something like "Use the pydeseq2 skill to run differential expression on my RNA-seq counts."
  6. Before running, verify that sample IDs in your counts file and metadata file match exactly, and that counts are raw integers (never normalized).