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
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.
In this repository45 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- admet-predictionSkill
- antibody-design-iggmSkill
- antibody-structure-prediction-tfoldSkill
- binding-affinity-prediction-prodigySkill
- biomedical-literature-searchSkill
- biomed-skill-creatorSkill
- biomed-skill-routerSkill
- cellxgene-census-querySkill
- chembl-querySkill
- disease-drug-intelligenceSkill
- drug-candidate-discoverySkill
- drug-drug-interaction-analysisSkill
- drug-lead-analysisSkill
- functional-protein-designSkill
- iupac-name-identification-biot5Skill
- kegg-querySkill
- molecule-biochemical-significance-query-biot5Skill
- mutation-design-aavSkill
- mutation-design-gfpSkill
- ppi-string-querySkill
- protein-function-predictionSkill
- protein-ligand-binding-analysis-plipSkill
- protein-mutation-analysisSkill
- protein-structure-design-boltzgenSkill
- protein-subcellular-localization-prediction-biot5Skill
- pubchem-querySkill
- retrosynthesis-planningSkill
- similar-protein-retrievalSkill
- single-cell-atac-seq-peak-calling-annotaionSkill
- single-cell-atac-seq-qc-processingSkill
- single-cell-foundation-model-geneformerSkill
- single-cell-foundation-model-langcellSkill
- single-cell-multi-omics-analysis-scviSkill
- single-cell-multi-omics-data-harmonizationSkill
- single-cell-proteomics-data-processingSkill
- single-cell-proteomics-peptide-identificationSkill
- single-cell-scrna-seq-analysis-scanpySkill
- single-cell-foundation-model-stofmSkill
- spatial-transcriptomics-spatial-data-ioSkill
- structure-prediction-boltz-2Skill
- target-based-lead-designSkill
- target-drug-reportSkill
- text-based-molecule-editingSkill
- uniprot-querySkill
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
- Very specific: line 15
Use this skill for the local scGPT repository at /DATA/disk0/zhaosy/home/scGPT.
- Distinctive: line 26
Do not use this skill for generic Scanpy work that does not depend on scGPT checkpoints or tokenization.
- Distinctive: line 32
Run preprocessing before tokenization or embedding unless the input has already been prepared for scGPT.
- Distinctive: line 33
Check vocabulary overlap before spending time on training or inference.
- Distinctive: line 61
If the user asks "how should I use scGPT on my AnnData?", this example is often the best starting point.
- Very specific: line 66
Use scgpt.tasks.cell_emb.embed_data(...) or related functions when the goal is to generate cell embeddings from a pretrained model …
- Distinctive: line 87
Use them when the user wants the project-supported path instead of building a custom pipeline from scratch.
- Distinctive: line 92
Do not assume arbitrary gene identifiers will work.
- Very specific: line 93
Do not skip binning if the target workflow expects X_binned.
- Distinctive: line 94
Do not mix raw, normalized, and logged layers casually.
- Very specific: line 95
Do not assume all checkpoints use the same configuration.
- Very specific: line 96
When extracting embeddings, verify the gene_col used to map genes into the vocabulary.
- Very specific: line 100
Read references/local-usage.md for checkpoint expectations, preprocessing shape, and local entry points.
- Very specific: line 101
Read references/workflow-notes.md for best starting paths and common mistakes.
≈ “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.
Files
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
- Confirm the checkpoint directory contains
args.json,vocab.json, andbest_model.pt. - Decide whether the task is fine-tuning, embedding extraction, or tutorial-guided experimentation.
- Run preprocessing before tokenization or embedding unless the input has already been prepared for scGPT.
- 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_batchandbatch_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, andbest_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_colused to map genes into the vocabulary.
Read More Only If Needed
- Read
references/local-usage.mdfor checkpoint expectations, preprocessing shape, and local entry points. - Read
references/workflow-notes.mdfor best starting paths and common mistakes.
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
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.

