How kbogas/ddi_blkg works
Project Type and Purpose
• Type: Research‐oriented Python package for link‐prediction on a biomedical literature knowledge graph (KG).
• Purpose: Predict drug-drug interactions by extracting semantic paths in a disease-specific KG and comparing against standard embedding methods (TransE, HolE, DistMult, RESCAL).
Directories and Files
• data/
• Embeddings/ – precomputed feature vectors and KG embedding files for all methods
• Predictions/ – model output (predicted DDIs)
• run_tests.py – sample script to run experiments (replicate published results)
• requirements.txt – Python dependencies (TorchKGE, scikit-learn, etc.)
• README.md – project overview, data download instructions, and usage
Components
a. External Data Sources (outside this repo)
• Biomedical Literature & Structured DBs (Disease Ontology, Gene Ontology, MeSH)
• Harvesters & Extraction Tools (from Biomedical‐Knowledge‐Integration repo)
b. Knowledge Graph Construction (external module)
• Triple Store: subject–relation–object KG for Alzheimer’s, Lung Cancer, (and future COVID-19)
c. Embedding Generation (TorchKGE pipeline)
• Competing Methods: TransE, HolE, DistMult, RESCAL
• Output: vector embeddings for drug‐pair nodes
d. Feature Extraction Module (DDI-BLKG method)
• Semantic‐path extraction between drug nodes
• Output: feature vectors for drug pairs
e. Model Training & Evaluation (run_experiment_AIME2020.py or run_tests.py)
• Input: embeddings + feature vectors + ground‐truth labels
• Algorithm: binary classifier (link prediction)
• Output: predicted DDIs → saved to data/Predictions
f. Results & Visualization
• Metrics comparison across methods
• Tables/images (from images/ folder)
Relationships and Data Flows
• KG → Embedding Generation pipelines
• Embeddings → Model Training
• Feature Extraction → Model Training
• Model Training → Predictions
• Predictions → data/Predictions output
• Users invoke run_experiment_AIME2020.py (or run_tests.py) to orchestrate pipelines
Architectural Patterns & Design Principles
• Modular separation:
• Data ingestion / KG build (external)
• Embedding modules for each algorithm
• Feature‐extraction core
• Training & evaluation script
• Reusability: shareable embeddings; standardized input/output folders
• Extensibility: add new embedding methods by dropping files into data/Embeddings and updating script