Applies the scGPT single-cell foundation model for zero-shot and fine-tuned cell-type annotation, gene/cell embeddings, batch integration, and perturbation inference from AnnData (.h5ad) files.
Ships in alterlab-bioinformatics. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
scGPT (Cui et al., Nature Methods 2024; bowang-lab/scGPT) is a transformer foundation
model pretrained on tens of millions of cells. It provides zero-shot and fine-tuned
cell-type annotation, gene and cell embeddings, batch integration, and
gene-regulatory / perturbation inference — all operating on AnnData (.h5ad) objects.
Its niche vs. the existing single-cell skills: scGPT is the pretrained-transformer route.
For probabilistic latent-variable models use alterlab-scvi-tools; for the conventional
Scanpy analysis pipeline use alterlab-scanpy; scGPT complements both.
Use this skill when the user wants to:
| Scenario | Use instead |
|---|---|
| Probabilistic integration / latent model (scVI, scANVI) | alterlab-scvi-tools |
| Standard QC → cluster → UMAP → differential expression | alterlab-scanpy |
Read/write/wrangle the .h5ad data structure itself | alterlab-anndata |
| RNA velocity | alterlab-scvelo |
| Protein (not single-cell) language models | alterlab-esm |
Hand-off rule. When the request matches a row above, open your answer by naming that skill by its exact id (for example alterlab-scvi-tools) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.
import scanpy as sc
from scgpt.tasks import embed_data
adata = sc.read_h5ad("cells.h5ad")
adata = embed_data(
adata,
model_dir="checkpoints/scGPT_human", # downloaded checkpoint folder
gene_col="feature_name", # column in adata.var holding gene symbols
batch_size=64,
device="cuda",
)
# cell embeddings land in adata.obsm["X_scGPT"]
gene_col must name an adata.var column of gene symbols matching the checkpoint's vocabulary
(pass "index" to use var_names); symbols that miss the vocab are dropped, so check how many
genes survive before trusting the embedding. Set use_fast_transformer=False when flash-attn
is not installed. Zero-shot mode maps a new dataset onto scGPT's learned space without training
— fast triage of cell identities. Fine-tuning on labeled reference data improves accuracy on a
specific tissue.
Produce cell embeddings (for clustering/visualization) or gene embeddings (for gene-network/similarity analysis). Feed embeddings back into a Scanpy neighbors/UMAP workflow.
Use the model representation to integrate across batches/donors, comparable in role to scVI-based integration but from the pretrained-transformer paradigm.
scGPT's last release is 0.2.4 (March 2025) and its pins have not moved since: it requires
scvi-tools<1.0 and scanpy<2.0, and imports torchtext, whose own last release was 0.18.0
in April 2024. That stack will not co-install with a current scverse environment, so give scGPT
its own venv and move data between environments as .h5ad files rather than trying to satisfy
both sets of pins at once. Say so plainly when a user expects it to drop into their existing
environment.
Checkpoints (whole-human, continual-pretrained, organ-specific) are downloaded by hand from the
Drive links in the upstream README — there is no from_pretrained downloader. The
whole-human model is the default choice; the continual-pretrained one is aimed at zero-shot
cell-embedding tasks.
scGPT needs a GPU for realistic dataset sizes; fine-tuning is heavy. Dispatch fine-tuning /
large inference via alterlab-remote-compute (submit → poll → harvest). Keep the AnnData I/O
consistent with alterlab-anndata.
Because the model has been static for over a year while the foundation-model field has not,
treat its published benchmarks as a 2024 snapshot: report the checkpoint name and date with any
result, and where annotation accuracy matters, sanity-check the labels against marker-gene
evidence (alterlab-scanpy) rather than accepting them unverified.
references/scgpt_usage.md — install/pinning, checkpoints, embed/annotate/fine-tune calls,
scverse integration, and paradigm comparison. Loaded on demand.Part of the AlterLab Academic Skills suite.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
single-cell, foundation-model, cell-annotation, scgpt, anndata
/alterlab-bioinformatics:alterlab-scgptfrom alterlab-bioinformatics
npx claudepluginhub alterlab-ieu/alterlab-academic-skills --plugin alterlab-bioinformatics38 skills in this plugin
/alterlab-alphafoldPredict protein 3D structures with AlphaFold2 via ColabFold — MMseqs2-accelerated MSAs, monomer and AlphaFold2-Multimer complex folding, and confidence-based validation (pLDDT, pTM/ipTM, PAE). Use when folding a protein sequence or complex from FASTA, generating a predicted structure with confidence metrics, ranking models, or checking self-consistency of a design. For co-folding a protein WITH a small-molecule ligand or predicting binding affinity prefer alterlab-boltz; for antibody–antigen or one-FASTA multi-entity complexes prefer alterlab-chai; to LOOK UP an already-computed structure prefer alterlab-alphafold-db; for ESM embeddings or inverse folding prefer alterlab-esm. Part of the AlterLab Academic Skills suite./alterlab-anndataBuild, slice, concatenate, read, and write AnnData annotated data matrices (obs, var, X, layers, obsm, uns) — the scverse data STRUCTURE, not an analysis pipeline. Use when creating or wrangling .h5ad/zarr files, managing cell and gene annotations, concatenating batches, or handling layers/obsm/backed-mode; for the QC, normalization, clustering, UMAP, and differential-expression analysis pipeline prefer alterlab-scanpy instead, and for RNA velocity from spliced/unspliced layers prefer alterlab-scvelo instead. Part of the AlterLab Academic Skills suite.2 plugins in one repository ship this exact skill · first indexed Nov 9, 2026
Other plugins' skills for the same job