Claude Skill MartBrowse skillsWhat is a Skill?
Back to list

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 & AnalyticsAdvanced33,0303,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 .rds files 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

  1. 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
  2. Multi-sample integration: apply --batch-key sample --batch-method harmony to remove per-sample batch effects and produce an integrated UMAP
  3. Migrating a Seurat object: convert a collaborator's pbmc.rds to .h5ad using references/r_interop.md, then re-analyze in Scanpy
  4. 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)
  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/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.

  1. Check prerequisites: run python --version — you need Python 3.12+ (scanpy 1.12 dropped 3.11 and below).
  2. Install Scanpy: uv pip install "scanpy[leiden]" (or pip install "scanpy[leiden]"). The [leiden] extra pulls in igraph and leidenalg needed for clustering.
  3. Clone the repository: git clone https://github.com/K-Dense-AI/scientific-agent-skills.git
  4. Copy the skill: mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/scanpy ~/.claude/skills/
  5. Verify the layout: ~/.claude/skills/scanpy/ should contain SKILL.md, scripts/, references/ and assets/. Keep scripts/_common.py next to the other scripts.
  6. Restart Claude Code, open a new session and ask something like "use scanpy to QC this h5ad file" to trigger the skill.
  7. Smoke test: python ~/.claude/skills/scanpy/scripts/inspect_data.py your_data.h5ad should print a dataset summary.
  8. (Optional) R files: if you need .rds conversion, install R plus zellkonverter/SeuratDisk following references/r_interop.md.