scgpt
यह क्या करती है
यह स्किल scGPT का उपयोग करती है, एक ऐसा मॉडल जो सिंगल-सेल जीव-विज्ञान के डेटा पर प्रशिक्षित है। इससे सेल embeddings बनते हैं और सेल के प्रकार पहचाने जाते हैं। यह सिंगल-सेल डेटासेट पर काम करने वाले जीव-वैज्ञानिकों और डेटा वैज्ञानिकों के लिए है।
कब इस्तेमाल करें
- ✓जब आप किसी सिंगल-सेल डेटासेट की कोशिकाओं को समूहों में बाँटना चाहते हैं।
- ✓जब आपको किसी नए सिंगल-सेल डेटासेट में सेल के प्रकार का अनुमान लगाना है।
- ✓जब आपको perturbation या नेटवर्क अध्ययन के लिए जीन-स्तर के प्रतिनिधित्व चाहिए।
Skill का लिंक
https://github.com/aipoch/open-science/blob/main/resources/skills/scgpt/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरी सिंगल-सेल डेटा फ़ाइल के लिए scGPT से सेल embeddings बनाइए और सेल के प्रकार के लेबल लगाइए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
आप एजेंट को AnnData फ़ाइल देते हैं, जिसमें सेल के जीन काउंट होते हैं। मॉडल हर सेल को संख्याओं के एक सेट में बदलता है, जिसे आप क्लस्टरिंग और लेबलिंग के लिए इस्तेमाल कर सकते हैं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
scGPT — Single-Cell Foundation Model
Prerequisites
| Requirement | Minimum | Recommended |
|---|---|---|
| Python | 3.10+ | 3.11 |
| CUDA | 12.1+ | 12.4+ |
| GPU VRAM | 16 GB | 24 GB+ |
How to run
Loading the vocabulary and checkpoint
scGPT checkpoints are raw directories (args.json, best_model.pt,
vocab.json) — not Hugging Face hub repos. Point at the directory, not an HF
repo id.
from scgpt.tokenizer.gene_tokenizer import GeneVocab
gv = GeneVocab.from_file("/path/to/scgpt-human/vocab.json")
print(len(gv)) # 60697 for the released human checkpoint
Embedding an AnnData
import anndata as ad
from scgpt.tasks import embed_data
adata = ad.read_h5ad("dataset.h5ad") # var must contain a gene-name column
emb = embed_data(
adata,
model_dir="/path/to/scgpt-human",
gene_col="feature_name",
use_fast_transformer=False, # see Gotchas
)
# emb is an AnnData with .obsm["X_scGPT"]
Output format
embed_data returns an AnnData whose .obsm["X_scGPT"] is the per-cell
embedding (n_cells × emb_dim, 512 by default). Downstream: feed to
scanpy.pp.neighbors / scanpy.tl.umap.
Remote compute
Needs ≥24 GB VRAM and the released human checkpoint (~200 MB:
args.json, best_model.pt, vocab.json). Read
compute_details({provider, mode:'read'}) for an environment with scgpt
and a pre-cached checkpoint directory, then:
c = host.compute.create(provider)
job = c.submitJob(
intent="scGPT embed 50k cells — 1×GPU, ~5 min",
inputs=[
{"src": "dataset.h5ad", "dstFilename": "dataset.h5ad"},
{"src": "embed.py", "dstFilename": "embed.py"},
],
command="python3 embed.py",
environment=..., # env name from compute_details
outputs=["embedded.h5ad"],
timeoutSeconds=1800,
)
print(job.job_id) # cell ends here — kernel never blocks on compute
Retain the exact returned job_id. Query that saved ID with the non-blocking
host.compute.create(provider).attachJob(job_id).status() or .result() when its state or result
is relevant; do not scan Job history. A final .result() read reports whether its follow-up was suppressed
or had already been committed; otherwise the app starts the later analysis turn for an unread
final result. See the remote-compute-ssh skill for the orchestration details.
See the remote-compute-ssh / remote-compute-modal skill for the
orchestration details.
In embed.py, pass model_dir= the checkpoint path from compute_details.
If flash-attn is unavailable in that environment, set
use_fast_transformer=False.
Gotchas
use_fast_transformerdefault isTruebut resolves to a FlashAttention path that may not import in every env. Passuse_fast_transformer=Falseunless you've confirmedflash_attnloads cleanly.- The package historically depended on
torchtext.vocab.Vocab; in environments without torchtext a pure-Python shim providesVocab— functionally identical forGeneVocab, but if you hitAttributeError: 'Vocab' object has no attribute …, you're on a stale shim. - Gene names must match the vocab; unmatched genes are dropped. Set
gene_colto the column inadata.varthat holds symbols.
Troubleshooting
| Symptom | Fix |
|---|---|
flash_attn is not installed warning at import |
Harmless; pass use_fast_transformer=False |
'Vocab' object has no attribute 'vocab' |
Env has an old torchtext shim — update the env |
| Nearly all genes dropped | Wrong gene_col; check adata.var.columns |
अक्सर पूछे जाने वाले सवाल
इसे कौन-सा हार्डवेयर चाहिए?
कम से कम 16 GB मेमोरी वाला ग्राफ़िक्स कार्ड चाहिए, और 24 GB या उससे अधिक की सलाह है।
यह कौन-सा फ़ाइल प्रकार इस्तेमाल करती है?
यह AnnData फ़ाइलों के साथ काम करती है, जिनमें सिंगल-सेल जीन एक्सप्रेशन डेटा होता है।
मॉडल डाउनलोड कितना बड़ा है?
स्किल कहती है कि जारी किया गया ह्यूमन checkpoint लगभग 200 MB का है।
जानकारी
लेखक का मूल विवरण
Embed and annotate single-cell expression data with scGPT, a foundation model for single-cell biology. Use this skill when: (1) Producing cell embeddings from an AnnData for clustering/integration, (2) Zero-shot or fine-tuned cell-type annotation, (3) Gene-level representation for perturbation/GRN tasks. For probabilistic single-cell models (scVI etc.), use the scvi-tools library.
repo: aipoch/open-science
लोकप्रियता
- GitHub स्टार
- 5.4k
- रैंकिंग में स्थान
- #14870
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
alphafold2
5.4kयह आपके एजेंट को ColabFold रनर के ज़रिए AlphaFold2 से प्रोटीन की 3D संरचना उसके सीक्वेंस से अनुमानित करने देती है, प्रोटीन कॉम्प्लेक्स सहित।
boltz
5.4kयह आपके एजेंट को Boltz-2 मॉडल से प्रोटीन, DNA, RNA और छोटे अणुओं के कॉम्प्लेक्स अनुमानित करने देती है, वैकल्पिक बाइंडिंग एफ़िनिटी के साथ।
borzoi
5.4kयह आपके एजेंट को DNA सीक्वेंस से जीनोम-व्यापी गतिविधि ट्रैक, जैसे एक्सप्रेशन और एक्सेसिबिलिटी, अनुमानित करने देती है, और वेरिएंट की अनुमानित असर से तुलना करने देती है।
chai1
5.4kयह आपके एजेंट को एक FASTA फ़ाइल से Apache लाइसेंस वाले Chai-1 मॉडल के साथ प्रोटीन, न्यूक्लिक एसिड और लिगैंड कॉम्प्लेक्स की संरचना अनुमानित करने देती है।
मिलती-जुलती skills
pytorch-patterns
280kआपके एजेंट को machine learning models के लिए PyTorch इस्तेमाल करने में मदद करता है। कुशल model training के best practices लागू करता है और नतीजों को दोहराने लायक रखता है।
evm-token-decimals
280kयह आपके एजेंट को अलग-अलग blockchain networks पर decimal numbers की गलतियों से बचने में मदद करता है। यह transactions और calculations में token values सही रखने का ध्यान रखता है।
ito-inference
280kआपके एजेंट को AI models की उपलब्धता जाँचने देता है। यह compute request को तैयार model service से जोड़ता है।