How a4bio/cellvq works
CellVQ is a single-cell foundation model whose main user workflow loads expression data and a checkpoint, encodes cells into representations and discrete cell codes, and saves the results. The repository also contains CellVQ-Graph analysis and separate downstream task implementations for perturbation and drug-response prediction. The map includes those documented capabilities, but edges are limited to relationships visible in the excerpts, SOURCE INDEX references, or README; several downstream internals are not sampled.
Main entry points: inference.py Inference entry · main.py Graph training · gears.py GEARS workflow · load.py Checkpoint loader
Components 25
CellVQ inference
- Inference entry
inference.py - Expression normalization
preprocess/normalize.py - Checkpoint loader
model/load.py - Model selector
model/pretrainmodels/select_model.py - Performer encoder
model/pretrainmodels/performer.py - Local attention
model/pretrainmodels/local_attention.py - Vector quantization
modules/vq_modules.py
CellVQ-Graph analysis
- Graph training
CellVQ-graph/graph_module/main.py - Graph data loading
CellVQ-graph/graph_module/module/dataloader.py - Graph construction
CellVQ-graph/graph_module/module/graph_function.py - Homogeneous graph model
CellVQ-graph/graph_module/model/HomoGraph.py - Graph analysis utilities
CellVQ-graph/graph_module/utils/utils_gac.py
Perturbation prediction
- GEARS workflow
GEARS/gears/gears.py - Perturbation model
GEARS/gears/model.py - Perturbation evaluation
GEARS/gears/inference.py - Performer modules
GEARS/modules/performer_module.py
Drug response
- SCAD training
SCAD/model/SCAD_train_binarized_5folds-pub.py - SCAD modules
SCAD/model/SCADmodules.py - DeepCDR workflow
DeepCDR/prog/run_DeepCDR.py
Interpretation and visualization
- Embedding visualization
visualize/visualize.py - Gene-property analysis
visualize/get_property.py - Regulatory network analysis
visualize/grn.py
Other components
- Researcher
- Expression data
- Saved embeddings
Connections 24
- Researcher → Inference entry: runs
- Expression data → Inference entry: provides data
inference.py - Inference entry → Checkpoint loader: loads checkpoint
inference.py - Inference entry → Expression normalization: normalizes
- Checkpoint loader → Model selector: selects model
model/load.py - Model selector → Performer encoder: constructs
model/pretrainmodels/select_model.py - Performer encoder → Local attention: uses attention
model/pretrainmodels/performer.py - Inference entry → Vector quantization: encodes cell codes
- Inference entry → Saved embeddings: saves outputs
inference.py - Researcher → Graph training: runs analysis
- Graph training → Graph data loading: loads graph data
CellVQ-graph/graph_module/main.py - Graph data loading → Graph construction: uses graph functions
CellVQ-graph/graph_module/module/dataloader.py - Graph training → Homogeneous graph model: trains model
CellVQ-graph/graph_module/main.py - Graph training → Graph analysis utilities: uses utilities
CellVQ-graph/graph_module/main.py - Researcher → GEARS workflow: runs prediction
- GEARS workflow → Perturbation model: uses model
GEARS/gears/gears.py - GEARS workflow → Perturbation evaluation: evaluates predictions
GEARS/gears/gears.py - Performer modules → Local attention: shares attention design
GEARS/modules/performer_module.py - Researcher → SCAD training: runs response task
- SCAD training → SCAD modules: uses modules
SCAD/model/SCAD_train_binarized_5folds-pub.py - Researcher → DeepCDR workflow: runs response task
- Researcher → Embedding visualization: explores results
- Researcher → Gene-property analysis: analyzes properties
- Researcher → Regulatory network analysis: analyzes networks