Scfoundation Model Agent
Unified agent for leveraging single-cell foundation models (scGPT, scBERT, Geneformer, scFoundation) for cross-species annotation, perturbation prediction, and gene network inference.
Unsigned, install at your own risk
UnverifiedThis skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.
Install this skill
No account required. Pick your tool, or use the command that detects it for you.
Run in your terminal. It detects your AI tool.
npx @skills-hub-ai/cli install openclaw-medical-scfoundation-model-agentManual setup by platform
Claude Code
~/.claude/skills/openclaw-medical-scfoundation-model-agent/SKILL.md
Instructions
scFoundation Model Agent
The scFoundation Model Agent provides a unified interface to leverage state-of-the-art single-cell foundation models for diverse downstream tasks. It integrates scGPT, scBERT, Geneformer, scFoundation, and emerging models to enable cross-species cell annotation, in silico perturbation prediction, gene regulatory network inference, and batch integration.
When to Use This Skill
- When annotating cell types across species (human, mouse, cross-species).
- For predicting perturbation effects (knockouts, drug treatments) in silico.
- To infer gene regulatory networks from single-cell data.
- When integrating batches without losing biological signal.
- For generating cell embeddings for downstream analysis.
Core Capabilities
-
Cross-Species Cell Annotation: Transfer cell type labels across species using unified embeddings.
-
In Silico Perturbation: Predict gene expression changes from knockouts/treatments.
-
Gene Regulatory Network Inference: Discover TF-target relationships from attention patterns.
-
Batch Integration: Remove technical variation while preserving biology.
-
Cell Embedding Generation: Generate universal cell representations for any downstream task.
-
Multi-Model Ensemble: Combine predictions from multiple foundation models.
Supported Foundation Models
| Model | Parameters | Training Data | Strengths |
|---|---|---|---|
| scGPT | 50M | 33M human cells | General purpose, perturbations |
| Geneformer | 10M | 30M cells | Chromatin, gene networks |
| scBERT | 20M | 1.2M cells | Cell type annotation |
| scFoundation | 100M | 50M cells | Large-scale, multi-species |
| scTab | 15M | 22M cells | Tabular prediction |
| UCE (Universal Cell Embeddings) | 100M | 36M cells | Cross-species transfer |
Workflow
-
Input: Single-cell RNA-seq data (AnnData format).
-
Model Selection: Choose appropriate model(s) for task.
-
Preprocessing: Tokenize genes, normalize expression.
-
Inference: Generate embeddings or predictions.
-
Task Execution: Annotation, perturbation, or network inference.
-
Ensemble (Optional): Combine multi-model predictions.
-
Output: Annotated data, predictions, networks.
Example Usage
User: "Use scGPT to predict the effect of CRISPR knockout of TP53 on these cancer cells."
Agent Action:
python3 Skills/Genomics/scFoundation_Model_Agent/foundation_predict.py \
--input cancer_cells.h5ad \
--model scgpt \
--task perturbation \
--perturbation "TP53 knockout" \
--model_checkpoint scgpt_human_gene_v1.pt \
--output tp53_ko_predictions.h5ad
Task-Specific Usage
Cell Type Annotation
python3 foundation_predict.py \
--input query_cells.h5ad \
--model geneformer \
--task annotation \
--reference tabula_sapiens.h5ad \
--output annotated_cells.h5ad
Gene Network Inference
python3 foundation_predict.py \
--input cells.h5ad \
--model scgpt \
--task grn_inference \
--transcription_factors tf_list.txt \
--output gene_network.csv
Batch Integration
python3 foundation_predict.py \
--input multi_batch.h5ad \
--model scfoundation \
--task integration \
--batch_key batch \
--output integrated.h5ad
Output Formats
| Task | Output | Format |
|---|---|---|
| Annotation | Cell type labels | .h5ad obs column |
| Perturbation | Predicted expression | .h5ad layer |
| GRN | TF-target edges | .csv, .graphml |
| Integration | Corrected embeddings | .h5ad obsm |
| Embeddings | Cell representations | .h5ad obsm |
Performance Benchmarks
| Task | Model | Dataset | Performance |
|---|---|---|---|
| Annotation | scGPT | Tabula Sapiens | 93% accuracy |
| Annotation | Geneformer | HLCA | 91% accuracy |
| Perturbation (R²) | scGPT | Norman 2019 | 0.87 |
| Integration (kBET) | scFoundation | Multi-atlas | 0.92 |
| Cross-species | UCE | Human→Mouse | 85% F1 |
AI/ML Architecture
Transformer Backbone:
- Gene-level tokenization
- Attention-based gene interactions
- Masked expression prediction pretraining
Perturbation Module:
- Conditional generation
- Counterfactual prediction
- Dose-response modeling
Transfer Learning:
- Zero-shot annotation
- Few-shot fine-tuning
- Domain adaptation
Prerequisites
- Python 3.10+
- PyTorch 2.0+
- transformers, flash-attn
- Scanpy, AnnData
- Model-specific weights
- GPU with 16GB+ VRAM
Related Skills
- Nicheformer_Spatial_Agent - For spatial foundation models
- scGPT_Agent - Dedicated scGPT workflows
- Cell_Type_Annotation - Traditional annotation methods
- Pathway_Analysis - Gene set enrichment
Model Selection Guide
| Use Case | Recommended Model | Reason |
|---|---|---|
| General annotation | scGPT | Broad training, robust |
| Cross-species | UCE | Species-agnostic embeddings |
| Perturbation | scGPT | Best perturbation performance |
| GRN inference | Geneformer | Attention → regulatory links |
| Large-scale | scFoundation | Efficient, scalable |
| Tabular prediction | scTab | Optimized for classification |
Special Considerations
- Gene Coverage: Models trained on variable gene sets; check overlap
- Species: Some models human-only; use UCE for cross-species
- Compute: Large models need significant GPU memory
- Fine-Tuning: Task-specific fine-tuning improves performance
- Versioning: Model weights update frequently; track versions
Ensemble Strategies
| Strategy | Method | Benefit |
|---|---|---|
| Majority Vote | Mode of predictions | Robust to outliers |
| Weighted Average | Confidence-weighted | Leverages uncertainty |
| Stacking | Meta-model | Learns model strengths |
| Attention Fusion | Cross-model attention | Deep integration |
Author
AI Group - Biomedical AI Platform
Security
Reviews (0)
Related skills
Browse all →More from OpenClaw Medical
View source →More Build skills
Browse category →Frequently asked questions about scfoundation-model-agent
What does the scfoundation-model-agent skill do?
Unified agent for leveraging single-cell foundation models (scGPT, scBERT, Geneformer, scFoundation) for cross-species annotation, perturbation prediction, and gene network inference. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the scfoundation-model-agent skill?
Run `npx @skills-hub-ai/cli install openclaw-medical-scfoundation-model-agent` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/openclaw-medical-scfoundation-model-agent/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does scfoundation-model-agent work with?
scfoundation-model-agent runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the scfoundation-model-agent skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use scfoundation-model-agent after installing it?
In Claude Code, type `/openclaw-medical-scfoundation-model-agent` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the scfoundation-model-agent skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.