How bgiresearch/biollm works
BioLLM is a framework for applying and benchmarking single-cell foundation models through a standardized interface. A researcher selects a task and model; task code uses model loaders and preprocessing/data components to produce analysis outputs, which can be evaluated for relevant tasks. The repository also includes distinct annotation, embedding, integration, perturbation, gene-regulatory-network, and drug-sensitivity capabilities. Edges reflect README claims and visible source-index references; where implementation details were not sampled, relationships are left unconnected or marked unverified.
Main entry points: bio_task.py Task interface · scgpt.py scGPT loader · scgpt_handler.py scGPT preprocessing · mamba.py scMamba loader
Components 25
Tasks and workflows
- Task interface
biollm/tasks/bio_task.py - Cell annotation
biollm/tasks/cell_annotation.py - Cell embedding
biollm/tasks/cell_embedding.py - Model integration
biollm/tasks/integration/intergration_task_scgpt.py - Perturbation tasks
biollm/tasks/perturbation - Gene regulation
biollm/algorithm/grn.py - Drug sensitivity
biollm/tasks/drug_sensitivity.py
Data preparation
- Expression preprocessing
biollm/data_preprocess/data_handler.py - scGPT preprocessing
biollm/data_preprocess/scgpt_handler.py - Single-cell datasets
biollm/dataset/sc_dataset.py - Gene tokenization
biollm/repo/scgpt/tokenizer/gene_tokenizer.py
Model integration
- Model loaders
biollm/loader/loader_base.py - scGPT loader
biollm/loader/scgpt.py - scMamba loader
biollm/loader/mamba.py - scGPT models
biollm/repo/scgpt/model/model.py - Multi-omic model
biollm/repo/scgpt/model/multiomic_model.py - Mamba model
biollm/repo/scmamba/scmamba/mambaLM.py - GEARS perturbation
biollm/repo/gears/gears.py - scFoundation embeddings
biollm/repo/scfoundation/load.py
Analysis and evaluation
- Benchmark metrics
biollm/evaluate/bm_cell_embedding.py
Shared runtime
- Training runtime
biollm/trainer/trainer.py - scMamba data pipeline
biollm/repo/scmamba/scLLM_utils/dataset.py - Logging
biollm/utils/log_manager.py
Other components
- Researcher
- Analysis results
Connections 32
- Researcher → Task interface: selects task
README.md - Task interface → scGPT loader: loads model
biollm/tasks/bio_task.py - Task interface → scMamba loader: loads model
biollm/tasks/bio_task.py - Task interface → Model loaders: selects loader
biollm/tasks/bio_task.py - scGPT loader → Model loaders: extends
biollm/loader/scgpt.py - scMamba loader → Model loaders: extends
biollm/loader/mamba.py - scGPT loader → scGPT preprocessing: preprocesses data
biollm/loader/scgpt.py - scGPT preprocessing → Expression preprocessing: uses
biollm/data_preprocess/scgpt_handler.py - scGPT preprocessing → Single-cell datasets: creates dataset
biollm/data_preprocess/scgpt_handler.py - scGPT preprocessing → Gene tokenization: tokenizes genes
biollm/data_preprocess/scgpt_handler.py - Expression preprocessing → Gene tokenization: loads vocabulary
biollm/data_preprocess/data_handler.py - scGPT loader → scGPT models: constructs model
biollm/loader/scgpt.py - scGPT loader → Multi-omic model: imports model
- scMamba loader → Mamba model: constructs model
biollm/loader/mamba.py - Cell embedding → Task interface: uses interface
biollm/tasks/cell_embedding.py - Cell embedding → Benchmark metrics: evaluates embeddings
biollm/tasks/cell_embedding.py - Benchmark metrics → Analysis results: returns metrics
- Perturbation tasks → GEARS perturbation: uses backend
- Perturbation tasks → Analysis results: produces predictions
- Model integration → Analysis results: produces integration
- Cell annotation → Analysis results: produces labels
- Gene regulation → Analysis results: produces networks
- Drug sensitivity → Analysis results: produces predictions
- scMamba loader → scMamba data pipeline: prepares cell data
biollm/loader/mamba.py - Task interface → Logging: uses logging
biollm/tasks/bio_task.py - Training runtime → Benchmark metrics: uses metrics
- Researcher → Cell annotation: requests analysis
README.md - Researcher → Cell embedding: requests analysis
README.md - Researcher → Model integration: requests analysis
README.md - Researcher → Perturbation tasks: requests analysis
README.md - Researcher → Gene regulation: requests analysis
README.md - Researcher → Drug sensitivity: requests analysis
README.md