agentleFS
PharMolixPharMolix/OpenBioMed/skills/single-cell-foundation-model-scrna-seq-scgpt/SKILL.md

single-cell-foundation-model-scgpt

Skill1.1k starsChanged 8 months agoMITView on GitHub

Use this skill when a task involves the local scGPT project in /DATA/disk0/zhaosy/home/scGPT, especially scGPT preprocessing and binning, checkpoint vocabulary matching, cell embedding extraction, reference mapping, fine-tuning scGPT for integration or annotation, or using scGPT tutorials for GRN, perturbation, multiomics, and reference mapping workflows.

Trending

Quiet this year.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the PharMolix/OpenBioMed repository that our weekly crawl found: only 1 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about PharMolix/OpenBioMed

The biggest 1 of 1 mention linking to the repository that our crawl found. Each line is their own headline.

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 7 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill for the local scGPT repository at /DATA/disk0/zhaosy/home/scGPT.

    line 15
  2. Distinctive:

    Do not use this skill for generic Scanpy work that does not depend on scGPT checkpoints or tokenization.

    line 26
  3. Distinctive:

    Run preprocessing before tokenization or embedding unless the input has already been prepared for scGPT.

    line 32
  4. Distinctive:

    Check vocabulary overlap before spending time on training or inference.

    line 33
  5. Distinctive:

    If the user asks "how should I use scGPT on my AnnData?", this example is often the best starting point.

    line 61
  6. Very specific:

    Use scgpt.tasks.cell_emb.embed_data(...) or related functions when the goal is to generate cell embeddings from a pretrained model …

    line 66
  7. Distinctive:

    Use them when the user wants the project-supported path instead of building a custom pipeline from scratch.

    line 87
  8. Distinctive:

    Do not assume arbitrary gene identifiers will work.

    line 92
  9. Very specific:

    Do not skip binning if the target workflow expects X_binned.

    line 93
  10. Distinctive:

    Do not mix raw, normalized, and logged layers casually.

    line 94
  11. Very specific:

    Do not assume all checkpoints use the same configuration.

    line 95
  12. Very specific:

    When extracting embeddings, verify the gene_col used to map genes into the vocabulary.

    line 96
  13. Very specific:

    Read references/local-usage.md for checkpoint expectations, preprocessing shape, and local entry points.

    line 100
  14. Very specific:

    Read references/workflow-notes.md for best starting paths and common mistakes.

    line 101

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

scGPT

Use This Skill When

Use this skill for the local scGPT repository at /DATA/disk0/zhaosy/home/scGPT. It is the right choice when the task involves:

  • preparing AnnData inputs with scGPT's own preprocessing pipeline
  • matching genes to a pretrained scGPT vocabulary
  • tokenizing binned expression inputs for transformer models
  • extracting cell embeddings with pretrained checkpoints
  • fine-tuning scGPT for integration or annotation-style downstream tasks
  • understanding how scGPT expects binned values, special tokens, and batch labels
  • working through scGPT tutorials such as integration, annotation, GRN, perturbation, or reference mapping

Do not use this skill for generic Scanpy work that does not depend on scGPT checkpoints or tokenization.

Start Here

  1. Confirm the checkpoint directory contains args.json, vocab.json, and best_model.pt.
  2. Decide whether the task is fine-tuning, embedding extraction, or tutorial-guided experimentation.
  3. Run preprocessing before tokenization or embedding unless the input has already been prepared for scGPT.
  4. Check vocabulary overlap before spending time on training or inference.

Choose A Path

Preprocess and bin

The core preprocessing path in this repo is scgpt.preprocess.Preprocessor. Typical steps include:

  • filter genes by counts
  • optionally filter cells
  • normalize total counts
  • optionally log1p transform
  • subset highly variable genes
  • bin values into discrete bins and store them in adata.layers["X_binned"]

Fine-tune for integration

The clearest end-to-end example in the local repo is examples/finetune_integration.py. It demonstrates:

  • loading a dataset
  • building str_batch and batch_id
  • preprocessing and HVG selection
  • matching checkpoint vocabulary
  • tokenizing and padding batches
  • training / evaluation for an integration workflow

If the user asks "how should I use scGPT on my AnnData?", this example is often the best starting point.

Extract cell embeddings

Use scgpt.tasks.cell_emb.embed_data(...) or related functions when the goal is to generate cell embeddings from a pretrained model directory.

This path:

  • loads args.json, vocab.json, and best_model.pt
  • filters genes to those found in the vocabulary
  • builds the transformer model
  • encodes cells and writes embeddings to adata.obsm["X_scGPT"]

Reference mapping or tutorial workflows

The local repo ships tutorials for:

  • annotation
  • integration
  • multiomics
  • GRN
  • perturbation
  • reference mapping

Use them when the user wants the project-supported path instead of building a custom pipeline from scratch.

Guardrails

  • Do not assume arbitrary gene identifiers will work. scGPT inference depends on the checkpoint vocabulary.
  • Do not skip binning if the target workflow expects X_binned.
  • Do not mix raw, normalized, and logged layers casually; keep track of which layer is used at each stage.
  • Do not assume all checkpoints use the same configuration; always read args.json.
  • When extracting embeddings, verify the gene_col used to map genes into the vocabulary.

Read More Only If Needed

  • Read references/local-usage.md for checkpoint expectations, preprocessing shape, and local entry points.
  • Read references/workflow-notes.md for best starting paths and common mistakes.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.