Alterlab Scgpt logo

Alterlab Scgpt

Community
AlterLab-IEU
alterlab-scgpt

Apply the scGPT single-cell foundation model (Cui 2024) to annotate and embed cells — zero-shot and fine-tuned cell-type annotation, gene/cell embeddings, batch integration, and gene-regulatory / perturbation inference from AnnData. Use when annotating cell types with a pretrained foundation model, generating scGPT embeddings, integrating batches with a transformer, or running zero-shot single-cell inference on an h5ad. For probabilistic latent models (scVI/scANVI) prefer alterlab-scvi-tools; for the standard QC→cluster→UMAP→DE pipeline prefer alterlab-scanpy; for the AnnData data structure itself prefer alterlab-anndata; for protein language models prefer alterlab-esm. Part of the AlterLab Academic Skills suite.

Overview

PublisherAlterLab-IEU
RepositoryAlterLab-Academic-Skills
Skill namealterlab-scgpt
Stars
84
Forks
16
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by AlterLab-IEU on GitHub. Read the source before you install it.

Installation

Install the Alterlab Scgpt AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/AlterLab-IEU/AlterLab-Academic-Skills/tree/main/skills/bioinformatics/alterlab-scgpt
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AlterLab-IEU/AlterLab-Academic-Skills.git /tmp/AlterLab-Academic-Skills
mkdir -p .claude/skills
cp -r /tmp/AlterLab-Academic-Skills/skills/bioinformatics/alterlab-scgpt .claude/skills/alterlab-scgpt
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Alterlab Scgpt in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Alterlab Scgpt on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Alterlab Scgpt is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

scGPT (single-cell foundation model)

Overview

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.

When to Use This Skill

Use this skill when the user wants to:

  • Annotate cell types with a pretrained foundation model (zero-shot or fine-tuned).
  • Generate scGPT embeddings for cells or genes.
  • Integrate batches using the transformer's representation.
  • Run zero-shot inference / transfer to a new dataset without training from scratch.

Does NOT Trigger

ScenarioUse instead
Probabilistic integration / latent model (scVI, scANVI)alterlab-scvi-tools
Standard QC → cluster → UMAP → differential expressionalterlab-scanpy
Read/write/wrangle the .h5ad data structure itselfalterlab-anndata
RNA velocityalterlab-scvelo
Protein (not single-cell) language modelsalterlab-esm

Core Capabilities

1. Zero-shot cell embedding & annotation

python
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.

2. Embeddings for downstream analysis

Produce cell embeddings (for clustering/visualization) or gene embeddings (for gene-network/similarity analysis). Feed embeddings back into a Scanpy neighbors/UMAP workflow.

3. Batch integration

Use the model representation to integrate across batches/donors, comparable in role to scVI-based integration but from the pretrained-transformer paradigm.

4. Environment, GPU, and dispatch

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.

Resources

  • 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.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Alterlab Scgpt AI skill do?

Apply the scGPT single-cell foundation model (Cui 2024) to annotate and embed cells — zero-shot and fine-tuned cell-type annotation, gene/cell embeddings, batch integration, and gene-regulatory / perturbation inference from AnnData. Use when annotating cell types with a pretrained foundation model, generating scGPT embeddings, integrating batches with a transformer, or running zero-shot single-cell inference on an h5ad. For probabilistic latent models (scVI/scANVI) prefer alterlab-scvi-tools; for the standard QC→cluster→UMAP→DE pipeline prefer alterlab-scanpy; for the AnnData data structure...

Why use Alterlab Scgpt on TypingMind?

Because you install it once and use it with any model. Alterlab Scgpt is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Alterlab Scgpt in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/AlterLab-IEU/AlterLab-Academic-Skills/tree/main/skills/bioinformatics/alterlab-scgpt. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Alterlab Scgpt?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Alterlab Scgpt?

As many as you like. As long as a model supports skills, you can use Alterlab Scgpt with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Alterlab Scgpt AI skill free?

Yes. It is published on GitHub by AlterLab-IEU under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇