How ku-medai/deg2mol works
DEG2MOL trains a conditional flow model to map transcriptomic profiles to the latent space of a pretrained scaffold-aware VAE, then decodes sampled latents into molecules. Its user-facing workflow accepts DEG tables, orders and validates gene features, encodes them with the GO-informed autoencoder, generates molecules, and saves results; training and test-set evaluation are separate entry points. The graph reflects README-documented capabilities where source excerpts were unavailable; those links cite the README rather than implying unsampled code was inspected.
Main entry points: inference.py Inference entry · train.py Flow training · generation.py Molecule generation · test.py Test evaluation
Components 15
Entry points
- Inference entry
inference.py - Test evaluation
test.py
DEG conditioning
- DEG table
- DEG table loader
utils/data.py - Runtime helpers
utils/runtime.py - GO autoencoder
models/DEGMON/DEG_AE.py
Latent generation
- Conditional flow
models/flow/MLP.py - Molecule generation
utils/generation.py - ScafVAE decoder
third_party/ScafVAE - Generated molecules
Training and evaluation
- Training data
- Flow training
train.py - Generation metrics
utils/evaluation.py - Training utilities
utils/training_utils.py
Other components
- Researcher
Connections 20
- Researcher → Inference entry: submits profile
README.md - Inference entry → DEG table: reads table
README.md - Inference entry → DEG table loader: loads profiles
inference.py - Inference entry → Runtime helpers: loads assets
inference.py - Inference entry → GO autoencoder: conditions with
inference.py - Inference entry → Conditional flow: initializes
inference.py - Inference entry → Molecule generation: invokes
inference.py - Molecule generation → GO autoencoder: encodes DEG
utils/generation.py - Molecule generation → Conditional flow: integrates flow
utils/generation.py - Molecule generation → ScafVAE decoder: decodes latents
utils/generation.py - Molecule generation → Generated molecules: writes molecules
utils/generation.py - Researcher → Flow training: starts training
README.md - Flow training → Training data: reads splits
README.md - Flow training → GO autoencoder: uses frozen encoder
train.py - Flow training → Conditional flow: trains model
train.py - Flow training → ScafVAE decoder: encodes molecules
train.py - Flow training → Training utilities: saves checkpoints
README.md - Researcher → Test evaluation: requests evaluation
README.md - Test evaluation → Molecule generation: generates samples
README.md - Test evaluation → Generation metrics: scores samples
README.md