name: 'scfoundation-model-agent'
description: 'Unified agent for leveraging single-cell foundation models (scGPT, scBERT, Geneformer, scFoundation) for cross-species annotation, perturbation prediction, and gene network inference.'
measurable_outcome: Execute skill workflow successfully with valid output within 15 minutes.
allowed-tools:
- read_file
- run_shell_command
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
1---2name: scfoundation-model-agent3description: <!--4---5<!--6# COPYRIGHT NOTICE7# This file is part of the "Universal Biomedical Skills" project.8# Copyright (c) 2026 MD BABU MIA, PhD <md.babu.mia@mssm.edu>9# All Rights Reserved.10#11# This code is proprietary and confidential.12# Unauthorized copying of this file, via any medium is strictly prohibited.13#14# Provenance: Authenticated by MD BABU MIA1516-->1718---19name: 'scfoundation-model-agent'20description: 'Unified agent for leveraging single-cell foundation models (scGPT, scBERT, Geneformer, scFoundation) for cross-species annotation, perturbation prediction, and gene network inference.'21measurable_outcome: Execute skill workflow successfully with valid output within 15 minutes.22allowed-tools:23 - read_file24 - run_shell_command25---262728# scFoundation Model Agent2930The **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.3132## When to Use This Skill3334* When annotating cell types across species (human, mouse, cross-species).35* For predicting perturbation effects (knockouts, drug treatments) in silico.36* To infer gene regulatory networks from single-cell data.37* When integrating batches without losing biological signal.38* For generating cell embeddings for downstream analysis.3940## Core Capabilities41421. **Cross-Species Cell Annotation**: Transfer cell type labels across species using unified embeddings.43442. **In Silico Perturbation**: Predict gene expression changes from knockouts/treatments.45463. **Gene Regulatory Network Inference**: Discover TF-target relationships from attention patterns.47484. **Batch Integration**: Remove technical variation while preserving biology.49505. **Cell Embedding Generation**: Generate universal cell representations for any downstream task.51526. **Multi-Model Ensemble**: Combine predictions from multiple foundation models.5354## Supported Foundation Models5556| Model | Parameters | Training Data | Strengths |57|-------|------------|---------------|-----------|58| scGPT | 50M | 33M human cells | General purpose, perturbations |59| Geneformer | 10M | 30M cells | Chromatin, gene networks |60| scBERT | 20M | 1.2M cells | Cell type annotation |61| scFoundation | 100M | 50M cells | Large-scale, multi-species |62| scTab | 15M | 22M cells | Tabular prediction |63| UCE (Universal Cell Embeddings) | 100M | 36M cells | Cross-species transfer |6465## Workflow66671. **Input**: Single-cell RNA-seq data (AnnData format).68692. **Model Selection**: Choose appropriate model(s) for task.70713. **Preprocessing**: Tokenize genes, normalize expression.72734. **Inference**: Generate embeddings or predictions.74755. **Task Execution**: Annotation, perturbation, or network inference.76776. **Ensemble (Optional)**: Combine multi-model predictions.78797. **Output**: Annotated data, predictions, networks.8081## Example Usage8283**User**: "Use scGPT to predict the effect of CRISPR knockout of TP53 on these cancer cells."8485**Agent Action**:86```bash87python3 Skills/Genomics/scFoundation_Model_Agent/foundation_predict.py \88 --input cancer_cells.h5ad \89 --model scgpt \90 --task perturbation \91 --perturbation "TP53 knockout" \92 --model_checkpoint scgpt_human_gene_v1.pt \93 --output tp53_ko_predictions.h5ad94```9596## Task-Specific Usage9798### Cell Type Annotation99```bash100python3 foundation_predict.py \101 --input query_cells.h5ad \102 --model geneformer \103 --task annotation \104 --reference tabula_sapiens.h5ad \105 --output annotated_cells.h5ad106```107108### Gene Network Inference109```bash110python3 foundation_predict.py \111 --input cells.h5ad \112 --model scgpt \113 --task grn_inference \114 --transcription_factors tf_list.txt \115 --output gene_network.csv116```117118### Batch Integration119```bash120python3 foundation_predict.py \121 --input multi_batch.h5ad \122 --model scfoundation \123 --task integration \124 --batch_key batch \125 --output integrated.h5ad126```127128## Output Formats129130| Task | Output | Format |131|------|--------|--------|132| Annotation | Cell type labels | .h5ad obs column |133| Perturbation | Predicted expression | .h5ad layer |134| GRN | TF-target edges | .csv, .graphml |135| Integration | Corrected embeddings | .h5ad obsm |136| Embeddings | Cell representations | .h5ad obsm |137138## Performance Benchmarks139140| Task | Model | Dataset | Performance |141|------|-------|---------|-------------|142| Annotation | scGPT | Tabula Sapiens | 93% accuracy |143| Annotation | Geneformer | HLCA | 91% accuracy |144| Perturbation (R²) | scGPT | Norman 2019 | 0.87 |145| Integration (kBET) | scFoundation | Multi-atlas | 0.92 |146| Cross-species | UCE | Human→Mouse | 85% F1 |147148## AI/ML Architecture149150**Transformer Backbone**:151- Gene-level tokenization152- Attention-based gene interactions153- Masked expression prediction pretraining154155**Perturbation Module**:156- Conditional generation157- Counterfactual prediction158- Dose-response modeling159160**Transfer Learning**:161- Zero-shot annotation162- Few-shot fine-tuning163- Domain adaptation164165## Prerequisites166167* Python 3.10+168* PyTorch 2.0+169* transformers, flash-attn170* Scanpy, AnnData171* Model-specific weights172* GPU with 16GB+ VRAM173174## Related Skills175176* Nicheformer_Spatial_Agent - For spatial foundation models177* scGPT_Agent - Dedicated scGPT workflows178* Cell_Type_Annotation - Traditional annotation methods179* Pathway_Analysis - Gene set enrichment180181## Model Selection Guide182183| Use Case | Recommended Model | Reason |184|----------|-------------------|--------|185| General annotation | scGPT | Broad training, robust |186| Cross-species | UCE | Species-agnostic embeddings |187| Perturbation | scGPT | Best perturbation performance |188| GRN inference | Geneformer | Attention → regulatory links |189| Large-scale | scFoundation | Efficient, scalable |190| Tabular prediction | scTab | Optimized for classification |191192## Special Considerations1931941. **Gene Coverage**: Models trained on variable gene sets; check overlap1952. **Species**: Some models human-only; use UCE for cross-species1963. **Compute**: Large models need significant GPU memory1974. **Fine-Tuning**: Task-specific fine-tuning improves performance1985. **Versioning**: Model weights update frequently; track versions199200## Ensemble Strategies201202| Strategy | Method | Benefit |203|----------|--------|---------|204| Majority Vote | Mode of predictions | Robust to outliers |205| Weighted Average | Confidence-weighted | Leverages uncertainty |206| Stacking | Meta-model | Learns model strengths |207| Attention Fusion | Cross-model attention | Deep integration |208209## Author210211AI Group - Biomedical AI Platform212213214<!-- AUTHOR_SIGNATURE: 9a7f3c2e-MD-BABU-MIA-2026-MSSM-SECURE -->