# XRepDDA **Repository Path**: Tomhappy/XRepDDA ## Basic Information - **Project Name**: XRepDDA - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-02-21 - **Last Updated**: 2026-02-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # XRepDDA: An Interpretable Drug-Disease Association Prediction Framework Leveraging Pretrained Chemical Language Models ## File Descriptions - **`feature/drug.py`** This script handles the extraction of drug features. It utilizes the `smi_ted_light` chemical language model to generate high-dimensional molecular representations from SMILES strings. All necessary code for the model is included in the repository. - **`undersample.py`** This script is for data preprocessing. It integrates the extracted drug features with disease features and then applies the ALLKNN algorithm to perform undersampling on the negative samples, creating a balanced dataset for training. - **`train.py`** This script trains the ModernNCA model using a 10-fold cross-validation strategy. It automatically evaluates performance, saves the model from each fold, and stores the best-performing model based on the highest AUC score. - **`smi_ted_light/`** This directory contains the code for the pre-trained **SMI-TED** model, which is used for encoding drug molecules in `feature/drug.py`. - **`data/`** This directory contains the three datasets (B-dataset, C-dataset, F-dataset) used in this study. Each sub-directory includes drug information, disease features, and known drug-disease associations. - **`results/`** This directory stores all outputs from the training process. It includes the trained models for each fold, the best overall model, evaluation metrics (`eval_results.csv`), and a summary log (`summary.out`). ## Usage Workflow The complete workflow can be executed via the command line. The following example uses the B-dataset: **1. Extract Drug Features** ```bash python feature/drug.py ``` **2. Perform Data Undersampling** ```bash python undersample.py ``` **3. Prepare Training Data** Copy the resampled data to the path expected by the training script. ```bash # For Linux / macOS cp ./sample/B/undersample/resampled_samples.csv ./sample/B/resampled_samples.csv # For Windows PowerShell copy .\sample\B\undersample\resampled_samples.csv .\sample\B\resampled_samples.csv ``` **4. Train and Evaluate the Model** ```bash python train.py ``` The script will run the full 10-fold cross-validation and save all results to the `results/B/` directory. **5. web server** You can use XRepDDA directly by accessing the web server: http://www.xrepdda.com