PyDESeq2 Differential Expression
davila7/claude-code-templates
Runs differential gene expression analysis on bulk RNA-seq counts with PyDESeq2: design formulas, Wald tests, FDR correction and volcano or MA plots.
Differential gene expression analysis for bulk RNA-seq count matrices using a DESeq2-like workflow in Python; use when you need Wald tests, FDR correction, and optional LFC shrinkage for…
$ npx skills add aipoch/medical-research-skills --skill pydeseq -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install aipoch/medical-research-skills pydeseq --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/'scientific-skills/Data Analysis/pydeseq2' .claude/skills/pydeseq && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "pydeseq" agent skill from https://github.com/aipoch/medical-research-skills/tree/main/scientific-skills/Data%20Analysis/pydeseq2 into .claude/skills/pydeseq/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pydeseq", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/aipoch/medical-research-skills/tree/main/scientific-skills/Data%20Analysis/pydeseq2Type this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add aipoch/medical-research-skills --skill pydeseq -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install aipoch/medical-research-skills pydeseq --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/'scientific-skills/Data Analysis/pydeseq2' .agents/skills/pydeseq && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "pydeseq" agent skill from https://github.com/aipoch/medical-research-skills/tree/main/scientific-skills/Data%20Analysis/pydeseq2 into .agents/skills/pydeseq/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pydeseq", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add aipoch/medical-research-skills --skill pydeseq -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install aipoch/medical-research-skills pydeseq --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/'scientific-skills/Data Analysis/pydeseq2' .cursor/skills/pydeseq && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "pydeseq" agent skill from https://github.com/aipoch/medical-research-skills/tree/main/scientific-skills/Data%20Analysis/pydeseq2 into .cursor/skills/pydeseq/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pydeseq", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/aipoch/medical-research-skills.git --path 'scientific-skills/Data Analysis/pydeseq2'--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add aipoch/medical-research-skills --skill pydeseq -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install aipoch/medical-research-skills pydeseq --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/'scientific-skills/Data Analysis/pydeseq2' .gemini/skills/pydeseq && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "pydeseq" agent skill from https://github.com/aipoch/medical-research-skills/tree/main/scientific-skills/Data%20Analysis/pydeseq2 into .gemini/skills/pydeseq/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pydeseq", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install aipoch/medical-research-skills pydeseqInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add aipoch/medical-research-skills --skill pydeseq -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/'scientific-skills/Data Analysis/pydeseq2' .github/skills/pydeseq && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "pydeseq" agent skill from https://github.com/aipoch/medical-research-skills/tree/main/scientific-skills/Data%20Analysis/pydeseq2 into .github/skills/pydeseq/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pydeseq", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add aipoch/medical-research-skills --skill pydeseq -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install aipoch/medical-research-skills pydeseq --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/'scientific-skills/Data Analysis/pydeseq2' .opencode/skills/pydeseq && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "pydeseq" agent skill from https://github.com/aipoch/medical-research-skills/tree/main/scientific-skills/Data%20Analysis/pydeseq2 into .opencode/skills/pydeseq/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pydeseq", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
pydeseqDifferential gene expression analysis for bulk RNA-seq count matrices using a DESeq2-like workflow in Python; use when you need Wald tests, FDR correction, and optional LFC shrinkage for…
Pydeseq is an agent skill from aipoch/medical-research-skills. Differential gene expression analysis for bulk RNA-seq count matrices using a DESeq2-like workflow in Python; use when you need Wald tests, FDR correction, and optional LFC shrinkage for condition/batch/covariate designs.
Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and reference files (for example `pydeseq2_audit_result_v1.json`, `references/api_reference.md` and `references/workflow_guide.md`).
It sits in Data & Analytics, covering Bioinformatics. It works with Python, AnnData and pandas. The repository describes itself as: Hundreds of agent skills for medical research, including protocol design, data analysis, evidence insights, and academic writing. The licence is MIT.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 686e09d. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
uvFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Pydeseq loads about 1.8k tokens when it runs, and up to ~7.2k if it reads all its reference files. Until then it costs about 57 tokens; SKILL.md has 434 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from aipoch/medical-research-skills at commit 686e09d, republished under its MIT licence (© aipoch). 434 words, ~1,841 tokens.
.claude/skills/pydeseq/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.Use this skill when you need to run DESeq2-style differential expression in Python, especially in these scenarios:
~ batch + condition, ~ age + condition).padj).[variable, test_group, reference_group].Minimum environment (as documented in the source material):
pydeseq2 (install via pip/uv)pandas >= 1.4.3numpy >= 1.23.0scipy >= 1.11.0scikit-learn >= 1.1.1anndata >= 0.8.0 (optional, for AnnData I/O)Optional plotting:
matplotlib (recommended)seaborn (optional)Installation:
uv pip install pydeseq2The following script is a complete, runnable example for a standard treated-vs-control analysis.
import pandas as pd
import numpy as np
from pydeseq2.dds import DeseqDataSet
from pydeseq2.ds import DeseqStats
# -----------------------------
# 1) Load inputs
# -----------------------------
# counts.csv is commonly stored as genes x samples; transpose to samples x genes.
counts_df = pd.read_csv("counts.csv", index_col=0).T
metadata = pd.read_csv("metadata.csv", index_col=0)
# Ensure sample alignment
common = counts_df.index.intersection(metadata.index)
counts_df = counts_df.loc[common]
metadata = metadata.loc[common]
# -----------------------------
# 2) Basic filtering
# -----------------------------
# Remove genes with very low total counts
min_total_counts = 10
genes_to_keep = counts_df.columns[counts_df.sum(axis=0) >= min_total_counts]
counts_df = counts_df[genes_to_keep]
# Drop samples with missing condition
metadata = metadata.dropna(subset=["condition"])
counts_df = counts_df.loc[metadata.index]
# -----------------------------
# 3) Fit DESeq2 model
# -----------------------------
dds = DeseqDataSet(
counts=counts_df,
metadata=metadata,
design="~ condition",
refit_cooks=True,
n_cpus=1,
)
dds.deseq2()
# -----------------------------
# 4) Wald test with contrast
# -----------------------------
ds = DeseqStats(
dds,
contrast=["condition", "treated", "control"],
alpha=0.05,
cooks_filter=True,
independent_filter=True,
)
ds.summary()
# -----------------------------
# 5) Results + optional shrinkage
# -----------------------------
res = ds.results_df.copy()
sig = res[res["padj"] < 0.05].sort_values("padj")
print(f"Significant genes (padj < 0.05): {len(sig)}")
# Optional: shrink LFC for visualization/ranking (p-values do not change)
ds.lfc_shrink()
res_shrunk = ds.results_df.copy()
# Export
res.to_csv("deseq2_results.csv")
res_shrunk.to_csv("deseq2_results_shrunk_lfc.csv")
sig.to_csv("significant_genes.csv")
# -----------------------------
# 6) Minimal volcano plot (optional)
# -----------------------------
try:
import matplotlib.pyplot as plt
plot_df = res.copy()
plot_df["neglog10_padj"] = -np.log10(plot_df["padj"].clip(lower=1e-300))
is_sig = plot_df["padj"] < 0.05
plt.figure(figsize=(9, 5))
plt.scatter(
plot_df.loc[~is_sig, "log2FoldChange"],
plot_df.loc[~is_sig, "neglog10_padj"],
s=10,
alpha=0.3,
c="gray",
label="Not significant",
)
plt.scatter(
plot_df.loc[is_sig, "log2FoldChange"],
plot_df.loc[is_sig, "neglog10_padj"],
s=10,
alpha=0.6,
c="red",
label="padj < 0.05",
)
plt.axhline(-np.log10(0.05), linestyle="--", color="blue", alpha=0.5)
plt.xlabel("Log2 Fold Change")
plt.ylabel("-Log10(adjusted p-value)")
plt.title("Volcano Plot")
plt.legend()
plt.tight_layout()
plt.savefig("volcano_plot.png", dpi=300)
except ImportError:
pass.T after loading.~ condition (single factor)~ batch + condition (batch-adjusted)~ age + condition (continuous covariate)~ group + condition + group:condition (interaction)~ batch + condition) so the primary effect is interpreted cleanly.dds.deseq2() does (high level)The fitting pipeline typically includes:
refit_cooks=True)DeseqStats(...).summary() runs Wald tests for the requested coefficient/contrast.baseMean: mean normalized expressionlog2FoldChange, lfcSE, statpvalue: raw p-valuepadj: Benjamini–Hochberg FDR adjusted p-valuepadj < alpha (commonly 0.05) for significance.contrast=["variable", "test_group", "reference_group"]["condition", "treated", "control"] tests treated relative to control.ds.lfc_shrink() applies shrinkage to log2FoldChange for more stable ranking/plots.If your repository includes them, use:
references/api_reference.md for parameter/object details.references/workflow_guide.md for extended workflows and troubleshooting.scripts/run_deseq2_analysis.py for a CLI-style batch workflow (counts/metadata/design/contrast/output, optional plots).© aipoch, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files (scripts, references) in scientific-skills/Data Analysis/pydeseq2 of aipoch/medical-research-skills.
Open the folder on GitHubat commit 686e09d
Pydeseq next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Pydeseq this skillaipoch/medical-research-skills | 1.9k | — | ~1.8k | Automated safety check: Pass | MIT | |
| PyDESeq2 Differential Expressiondavila7/claude-code-templates | 33k | 11 repos | ~4k | Automated safety check: Pass | MIT | |
| Alphagenome Predictionsgenomicsxai/alphagenome-pytorch | 162 | — | ~868 | Automated safety check: Pass | Apache-2.0 | |
| Tooluniverse Epigenomicswu-yc/LabClaw | 1.1k | 2 repos | ~14k | Automated safety check: Pass | None | |
| Bio Genome Intervals Bed File BasicsGPTomics/bioSkills | 1.2k | 1 repos | ~4.5k | Automated safety check: Pass | MIT | |
| Spatial VelocityTianGzlab/OmicsClaw | 161 | — | ~1.3k | Automated safety check: Pass | Apache-2.0 |
davila7/claude-code-templates
Runs differential gene expression analysis on bulk RNA-seq counts with PyDESeq2: design formulas, Wald tests, FDR correction and volcano or MA plots.
genomicsxai/alphagenome-pytorch
Run AlphaGenome-PyTorch to get genomic track predictions — via the agt predict CLI (single locus, BED regions, whole chromosomes, raw FASTA sequences, or per-gene count tables/AnnData), variant…
wu-yc/LabClaw
Production-ready genomics and epigenomics data processing for BixBench questions.
GPTomics/bioSkills
Handles BED-format genomic intervals (BED3 through BED12, narrowPeak/broadPeak) and the coordinate-system substrate the whole interval category rests on, with bedtools (CLI) and…
TianGzlab/OmicsClaw
Load when estimating RNA velocity on a spatial AnnData with layers["spliced"] + layers["unspliced"] via scVelo (stochastic / deterministic / dynamical) or veloVI (deep generative).
lingzhi227/agent-research-skills
Writes statistical analysis code for experimental data, runs it through a four-round review, and reports effect sizes, p-values and confidence intervals.
aipoch/medical-research-skills
Complete workflow for generating academic research posters from PDF literature; use when you need to extract paper content from PDFs and produce a LaTeX-based poster…
aipoch/medical-research-skills
Analyzes clinical diagnostic accuracy studies for bias using the QUADAS-2 tool.
aipoch/medical-research-skills
Perform comprehensive exploratory data analysis on scientific data files across 200+ file formats.
aipoch/medical-research-skills
A toolkit for preparing ISO 13485:2016 certification documentation for medical device QMS.
aipoch/medical-research-skills
Recommends target journals for manuscript submission by analyzing the paper topic/abstract and the journal distribution of similar PubMed literature; use when users ask for journal…
aipoch/medical-research-skills
Creates academic-poster writing packages for LaTeX using beamerposter, tikzposter, or baposter.
Categories
Differential gene expression analysis for bulk RNA-seq count matrices using a DESeq2-like workflow in Python; use when you need Wald tests, FDR correction, and optional LFC shrinkage for…. Pydeseq is an agent skill from aipoch/medical-research-skills. Differential gene expression analysis for bulk RNA-seq count matrices using a DESeq2-like workflow in Python; use when you need Wald tests, FDR correction, and optional LFC shrinkage for condition/batch/covariate designs.
Pydeseq fits situations like: you need Wald tests; optional LFC shrinkage for condition/batch/covariate designs.
Run `npx skills add aipoch/medical-research-skills --skill pydeseq -a claude-code`. Or copy the skill folder (scientific-skills/Data Analysis/pydeseq2 in aipoch/medical-research-skills) into .claude/skills/pydeseq in your project. Claude Code loads it when a task matches its description.
Run `npx skills add aipoch/medical-research-skills --skill pydeseq -a codex`. Or copy the skill folder (scientific-skills/Data Analysis/pydeseq2 in aipoch/medical-research-skills) into .agents/skills/pydeseq in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aipoch/medical-research-skills --skill pydeseq -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pydeseq, .gemini/skills/pydeseq, .github/skills/pydeseq and .opencode/skills/pydeseq in your project.
Going by SKILL.md and its folder, Pydeseq needs Python for the scripts in its folder and the command-line tools its instructions call (uv). Our summary lists: Python 3.
SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Pydeseq is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.4k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Pydeseq: PyDESeq2 Differential Expression (davila7/claude-code-templates, 33k stars), Alphagenome Predictions (genomicsxai/alphagenome-pytorch, 162 stars), Tooluniverse Epigenomics (wu-yc/LabClaw, 1.1k stars) and Bio Genome Intervals Bed File Basics (GPTomics/bioSkills, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
aipoch (a GitHub organization) maintains it in aipoch/medical-research-skills, which has 1,937 GitHub stars. The repository holds 578 skills in this directory. The repository was last updated on September 17, 2026.
Source: aipoch/medical-research-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.