How salahabdelkhabir/drgnn works
DRGNN is a drug-repurposing platform combining a biomedical-graph learning package with a Flask API and interactive React explorer. The user-facing workflow selects a disease, retrieves ranked drug candidates, and explores graph-based explanations and pathways. The Python package also supports graph preparation, model training, prediction, and GraphMask/meta-path interpretability. The README documents these capabilities, but sampled source does not establish how the DRGNN model is connected to the API’s data store; that integration is therefore shown as unverified.
Main entry points: App.tsx Explorer app · database.py Graph and prediction queries · model.py Heterogeneous GNN · application.py Flask application
Components 19
Researcher interface
- Explorer app
API/src/App.tsx - Disease and drug controls
API/src/components/Sider/index.tsx - Candidate scatterplot
API/src/components/CardContainer/Scatter.tsx - Path matrix
API/src/components/TabContainer/PathMatrix.tsx - Attention tree
API/src/components/TabContainer/AttentionTree.tsx - Graph view
API/src/components/TabContainer/Graph.tsx
Exploration API
- Flask application
API/drug_server/application.py - Prediction and explanation routes
API/drug_server/api.py - Graph and prediction queries
API/drug_server/database.py - Visualization routes
API/drug_server/vis.py
DRGNN modeling
- Data loading and splits
drgnn/data.py - Graph preparation and evaluation
drgnn/utils/data_utils.py - Heterogeneous GNN
drgnn/model.py - Pretrain and fine-tune
drgnn/train.py - Prediction utilities
drgnn/predict.py
Biomedical graph data
- PrimeKG knowledge graph
- Pathway explanations
API/drug_server/database.py - Cached drug predictions
API/drug_server/database.py
Other components
- Researcher
Connections 20
- Researcher → Explorer app: uses
README.md - Explorer app → Disease and drug controls: renders
API/src/App.tsx - Explorer app → Candidate scatterplot: renders
API/src/App.tsx - Explorer app → Path matrix: renders
API/src/App.tsx - Explorer app → Attention tree: renders
API/src/App.tsx - Explorer app → Graph view: renders
API/src/App.tsx - Disease and drug controls → Explorer app: selects candidates
API/src/components/Sider/index.tsx - Explorer app → Flask application: requests platform data
- Flask application → Prediction and explanation routes: registers routes
API/drug_server/application.py - Flask application → Visualization routes: registers routes
API/drug_server/application.py - Prediction and explanation routes → Graph and prediction queries: queries
API/drug_server/api.py - Graph and prediction queries → Cached drug predictions: loads scores
API/drug_server/database.py - Graph and prediction queries → Pathway explanations: builds explanations
API/drug_server/database.py - Data loading and splits → Graph preparation and evaluation: creates graph splits
drgnn/data.py - Pretrain and fine-tune → Data loading and splits: uses data
drgnn/train.py - Pretrain and fine-tune → Heterogeneous GNN: trains
drgnn/train.py - Prediction utilities → Heterogeneous GNN: uses
drgnn/predict.py - Heterogeneous GNN → Graph preparation and evaluation: uses utilities
drgnn/model.py - PrimeKG knowledge graph → Data loading and splits: provides graph data
- Heterogeneous GNN → Graph and prediction queries: supplies prediction results