Official repository for Reliable prediction of PROTAC-mediated targeted protein degradation via uncertainty quantification
- OS: Linux/Ubuntu (Recommended)
- Conda: Anaconda or Miniconda installed
- GPU: NVIDIA GPU with CUDA support (Recommended for faster embedding and training)
Follow the steps below to set up environment, process data, train the ensemble model, and evaluate its performance.
We recommend using Conda to manage your Python environment. Create a new environment with Python 3.10 and install the required dependencies.
# Create a new conda environment named 'rpprotac'
conda create -n rpprotac python=3.10 -y
# Activate the environment
conda activate rpprotac
# Install the required libraries
pip install -r requirements.txtBefore training the model, you need to generate the representations for both compounds (SMILES) and proteins (Amino Acid sequences).
This script utilizes a pre-trained GNN (LEMON) and an PLM (ESM-2) to extract features and save them as .pt files in the data/directory.
python data_processing.pyTrain the ensemble model. The training script will automatically split the training data, apply label smoothing and Monte Carlo sampling (reparameterization trick) for uncertainty estimation, and train multiple models using different random seeds.
# Run the ensemble training script
python train_ensemble.pyBy default, this will train 10 models (seeds) and save the best weights for each in the weights/ directory. You can adjust hyperparameters like --num_seeds, --batch_size, or --lr via command-line arguments.
Evaluate the trained ensemble models on out-of-distribution (OOD) test datasets (Unseen Pair, Unseen POI, Unseen PROTAC, and Unseen Both). The script calculates both the deterministic performance of individual models and the aggregated ensemble performance.
# Run the evaluation script
python test_ensemble.pyThe evaluation metrics (AUROC, AUPR) will be printed in the console, and the detailed predictions will be saved as a CSV file in the predictions/ directory.