How theislab/chemcpa works
chemCPA predicts single-cell responses to drug perturbations, including drugs not seen during training. The documented workflow is to obtain raw datasets, process them into analysis-ready data, generate or load molecular embeddings, then train the response model. The graph preserves the distinct data-preparation, molecular-representation, and training stages, plus the model’s data and training layers. README descriptions support the overall workflow; sampled source confirms embedding generation/loading, but not every connection among the training modules.
Main entry points: lightning_module.py Training loop · 1_lincs.py Dataset processing · embedding_rdkit.py Embedding generation · datasets.py Raw datasets
Components 14
Data preparation
- Raw datasets
raw_data/datasets.py - Dataset downloads
raw_data/download_data.py - Dataset processing
preprocessing/1_lincs.py - Dataset assembly
chemCPA/data/dataset/dataset.py - Perturbation batches
chemCPA/data/perturbation_data_module.py
Molecular representations
- Embedding generation
embeddings/rdkit/embedding_rdkit.py - Embedding models
embeddings - Saved embeddings
chemCPA/embedding.py - Embedding lookup
chemCPA/embedding.py
Response modeling
- Training entry
chemCPA/train_hydra.py - Training loop
chemCPA/lightning_module.py - Response model
chemCPA/model.py - Predicted responses
Other components
- Researcher
Connections 16
- Researcher → Dataset downloads: requests data
- Dataset downloads → Raw datasets: retrieves
- Researcher → Dataset processing: runs sequentially
- Raw datasets → Dataset processing: provides inputs
- Dataset processing → Dataset assembly: prepares data
- Researcher → Embedding generation: generates embeddings
- Embedding models → Embedding generation: encodes molecules
- Embedding generation → Saved embeddings: saves vectors
- Dataset assembly → Perturbation batches: supplies samples
- Saved embeddings → Embedding lookup: reads vectors
- Researcher → Training entry: starts training
- Training entry → Training loop: configures training
- Training loop → Perturbation batches: uses batches
- Training loop → Embedding lookup: loads embeddings
- Training loop → Response model: trains
- Response model → Predicted responses: predicts responses