Pydeseq2 Workbench
by Sheeyassh
Run reproducible Python DESeq2 differential expression from raw RNA-seq counts with multi-factor designs, Wald tests, and FDR plots.
$5
Pydeseq2 Workbench
Example session with this skill installed
Port our R scripts/deseq2_legacy.R workflow to Python using scripts/run_deseq2_analysis.py patterns on data/salmon_gene_counts.csv (genes x samples) and data/sample_sheet.csv, modeling ~ batch + treatment with control as reference, applying LFC shrinkage, and saving DEGs (padj < 0.05, |log2FC| >= 1) plus volcano/MA plots to results/.
- Read your context and instructions
- Compiled the pydeseq2 workbench
- Generated the data export
Created scripts/run_pydeseq2.py transposing data/salmon_gene_counts.csv (18 samples x 24,180 genes), filtering genes with fewer than 10 total counts (leaving 16,412 genes), fitting DeseqDataSet(design_factors=["batch", "treatment"], ref_level=["treatment", "control"]), and running DeseqStats with contrast=["treatment", "drug_a", "control"] plus lfc_shrink(). Exported results/deseq2_all_genes.csv, results/deg_significant.csv (482 DEGs), results/volcano_plot.png, and results/ma_plot.png; verified integer-count assertions and sample-index alignment via python scripts/run_pydeseq2.py --dry-check (passed).
salmon_gene_counts.csv
CSV · data export
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Run reproducible Python DESeq2 differential expression from raw RNA-seq counts with multi-factor designs, Wald tests, and FDR plots. This skill equips AI coding agents to execute rigorous bulk RNA-seq differential expression analysis in pure Python with PyDESeq2. It automates count-matrix validation, low-count filtering, negative binomial dispersion fitting, Wald testing, LFC shrinkage, and volcano/MA visualization.
What it does
- Count Matrix & Design Audit Inspect existing RNA-seq pipelines and count matrices to catch normalized TPM/FPKM inputs, wrong
genes x samplesorientation, unaligned sample IDs, and missing batch covariates. - Multi-Factor Model & LFC Refinement Tune low-count filtering thresholds, multi-factor design formulas (
~ batch + condition),lfc_shrinksettings, and publication-grade volcano/MA visualizations. - R-to-Python Port & Pipeline Verification Build end-to-end Python differential expression pipelines or translate R
DESeq2scripts intoDeseqDataSet/DeseqStatsworkflows with automated sanity checks. - Deterministic Deliverables Each run produces modular Python
pydeseq2scripts, full statistical tables (baseMean,log2FoldChange,lfcSE,stat,pvalue,padj), thresholded significant DEG lists, volcano/MA plots, and count/orientation validation logs.
How it works
- Pre-Flight & Scope Audit verifies workspace boundaries, inputs, and required tools (
filesystem-read,filesystem-write,python3,shell-exec) before modifying any files. - Core Workflow Execution runs Count Matrix & Design Audit, Multi-Factor Model & LFC Refinement using modular, non-destructive steps.
- Quality Gate Enforcement applies skill-specific checks including Schema Assertion & Memory-Safe DataFrame Pipelines, Deterministic Python Environment & Type Hygiene.
- Verification & Reporting validates every deliverable against the 7-point checklist and emits an evidence-backed summary.
Frameworks & tools
Supports anndata, csv, pandas, python. Uses agent tools: filesystem-read, filesystem-write, python3, shell-exec. Prerequisites: Python 3.9+ and pydeseq2, pandas, numpy, and anndata, Raw RNA-seq count matrix. Compatible with Claude Code, Cursor, Windsurf, Antigravity, Codex CLI, and MCP-enabled agents.
Why this beats prompting it yourself
Bioinformatics teams porting R DESeq2 pipelines to Python often hit silent bugs from untransposed genes x samples CSVs, accidentally normalized TPM inputs, or inverted contrast signs. This skill inspects your count files, metadata columns, and anndata or pandas setup to produce verified statistical tables and plots. Instead of ad-hoc prompting, Pydeseq2 Workbench enforces Schema Assertion & Memory-Safe DataFrame Pipelines, Deterministic Python Environment & Type Hygiene, Reproducibility Manifest & Dimensionality Checks alongside a deterministic 7-point verification checklist.
Use cases
- Run bulk RNA-seq differential gene expression analysis natively in Python without maintaining an R environment.
- Control for technical batch effects, donor IDs, or covariates using multi-factor
DeseqDataSetdesigns. - Convert legacy R
DESeq2scripts into reproducible Python workflows integrated withanndata(.h5ad) andpandas. - Generate LFC-shrunk gene rankings, Benjamini-Hochberg FDR tables, and volcano/MA plots for downstream pathway enrichment.
Known limitations
Only appropriate for bulk RNA-seq (or pseudo-bulk aggregated) raw integer count matrices; not valid for pre-normalized TPM/FPKM tables or unaggregated single-cell UMI matrices. Complex mixed-effects models, interaction-heavy spline designs, or specialized R-only shrinkage priors beyond PyDESeq2's supported apeglm/normal options may differ slightly from R DESeq2. Requires at least 2–3 biological replicates per condition for reliable dispersion estimation and Wald hypothesis testing.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 2 days ago
- Software
- Python 3.9+ and pydeseq2pandas, numpy, and anndataRaw RNA-seq count matrix
Python
Permissions
No special permissions declared or detected
What's inside
Creator
Sheeyassh
33 skills on Agensi
Frequently Asked Questions
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse All Claude Skills.