Scanpy Single-Cell Analysis
An end-to-end Scanpy workflow skill for scRNA-seq: QC, normalization, dimensionality reduction, clustering, marker genes and cell-type annotation.
Data & AnalyticsAdvanced★ 33,030⑂ 3,248AI score 8/10Last updated: Aug 9, 2026
What it does
Gives Claude a complete, script-backed playbook for single-cell RNA-seq analysis with Scanpy.
- Quality control: cell/gene filtering, mitochondrial fraction inspection, Scrublet doublet detection
- Preprocessing: normalization, log1p, highly variable gene selection, scaling/regression while preserving raw counts
- Dimensionality reduction & clustering: PCA → neighbor graph → UMAP/t-SNE, Leiden clustering across multiple resolutions
- Batch correction: harmony / bbknn / combat integration
- Markers & annotation:
rank_genes_groups, per-group CSV exports, cluster→cell-type mapping, gene signature scoring - Downstream work: pseudobulk aggregation for pydeseq2, subsetting, publication-quality plots
- R interop: runbook for converting Seurat / SingleCellExperiment
.rdsfiles to.h5ad
Every script in scripts/ reads and writes .h5ad, so steps chain cleanly — or you can run the whole thing with run_pipeline.py.
Who it's for
- Bioinformaticians and graduate students routinely analyzing single-cell transcriptomics
- Anyone who needs to quickly explore 10x Genomics output or h5ad files
- Seurat (R) users migrating to the Python/Scanpy stack
- Teams that need reproducible pipelines with JSON configs and intermediate checkpoints
Examples
- One-shot run: "Take raw.h5ad through QC, Leiden clustering and marker discovery" →
python scripts/run_pipeline.py raw.h5ad -o processed.h5ad --resolution 0.5 --scrublet - Multi-sample integration: apply
--batch-key sample --batch-method harmonyto remove per-sample batch effects and produce an integrated UMAP - Migrating a Seurat object: convert a collaborator's
pbmc.rdsto.h5adusingreferences/r_interop.md, then re-analyze in Scanpy - Figure generation:
python scripts/plot.py ann.h5ad --kind dotplot --genes CD3D CD14 --groupby cell_type
· · · Install guide · · ·
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the 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/scanpy folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/scanpy/. 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 && mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/scanpy ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Check prerequisites: run
python --version— you need Python 3.12+ (scanpy 1.12 dropped 3.11 and below). - Install Scanpy:
uv pip install "scanpy[leiden]"(orpip install "scanpy[leiden]"). The[leiden]extra pulls inigraphandleidenalgneeded for clustering. - Clone the repository:
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git - Copy the skill:
mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/scanpy ~/.claude/skills/ - Verify the layout:
~/.claude/skills/scanpy/should containSKILL.md,scripts/,references/andassets/. Keepscripts/_common.pynext to the other scripts. - Restart Claude Code, open a new session and ask something like "use scanpy to QC this h5ad file" to trigger the skill.
- Smoke test:
python ~/.claude/skills/scanpy/scripts/inspect_data.py your_data.h5adshould print a dataset summary. - (Optional) R files: if you need
.rdsconversion, install R plus zellkonverter/SeuratDisk followingreferences/r_interop.md.
View source on GitHub ↗License: MIT