# TCR-EML: Explainable Model Layers for TCR-pMHC Prediction

## Requirements
Please install the packages in `pip install -r requirements.txt`.
To run proteinbert_embed, please download ProteinBERT official repository and install all their requirements.


## Generate Embedding
1. To generate ESM embeddings, please run `python esm_embed.py`.
2. To generate ProteinBERT embedings, please place its folder `proteinbert` in their official reporitory in current folder. Then, please run `python proteinbert_embed.py`.

The embeddings will be generated to folder `./embeddings`.

## Train and Test Models
Please use this command to train and test model:
```bash
python run.py \
--config configs/conceptproto/proteinbert.json \
--device cuda:0 \
--batchsize 512 \
--numworkers 8 \
--epoch 150
```

Please change the config file to train and test different models.

The trained models and test results will be stored to `./experiments` folder.