How labweng/metddi works
Main Components
• Data Preparation & Preprocessing:
– Input data (located under the “data/” folder as specified in the README; not shown in the file tree but referenced multiple times)
– Preprocessing notebooks (preprocessing.ipynb in Classification, Regression, etc.)
– Preprocessed files such as “preprocessed_drug_info.npy.7z”
• Feature Engineering & Molecule Graph Construction:
– Feature extraction modules (features.py files in each module)
– Molecule graph construction (mol_graph.py files)
– Tokenization support via token_id.json
• Model Components:
– Atom-level and motif-level models (model_atom_level.py, model_motif_level.py) used across the pipelines
– Separate scripts for training and evaluation for Classification (both UnseenDDIs and Unseendrugs) and Regression (Train_MeTDDI_regression.py and evaluation_regression.py)
• Evaluation & Case Studies:
– Evaluation scripts (UnseenDDI_evaluate.py, UnseenDrugs_evaluate.py, evaluation_regression.py)
– Case study demonstration (case_study.py for reproducing figures)
• Visualization Module:
– Notebooks and scripts (MeTDDI_visualize.ipynb, visualize_one_DDI_pair.ipynb)
– Additional supporting files (mechanism_evidence_dict.npy)
• External Dependencies & Configuration:
– Dependencies (as detailed in the README requirements and versions for TensorFlow, rdkit, etc.)
– License and versioning (LICENSE file in code)
Architectural Patterns & Design Principles
• Modular design: Each module (classification, regression, visualization) functions as an independent pipeline but reuses common components like feature engineering and model construction.
• Emphasis on interpretability: The visualization module and the dual-level modeling (atom level and motif level) highlight the design’s focus on not only predicting DDIs but also explaining them.
• Separation of Concerns: Data preprocessing, model training, evaluation, and visualization are all distinctly separated into different directories and scripts to ease development, testing, and maintenance.
Technical Stack & Dependencies
• Python 3.8 and TensorFlow-GPU (v2.4.1 or 2.5.0) for deep learning components.
• Additional libraries: ipython, matplotlib, pandas, rdkit, scikit-learn, network.
• Use of Jupyter notebooks in several modules (for preprocessing and visualization) to facilitate experiment tracking and ease of result demonstration.