CLIP-based model for aligning epitopes to immune receptors
Python
11
11 commits
updated Apr 30, 2025
Code for paper "Sequence-based TCR-Peptide Representations Using Cross-Epitope Contrastive Fine-tuning of Protein Language Models." [paper] (RECOMB 2025)
🚧 This repository is under active construction. 🚧
Epitope Encoder
Recepter Encoder
To run this application, set the following environment variables
WANDB_OUTPUT_DIR=<path to output dir>
Additionally, if training on top of a custom in-house TCR model, the following path needs to be set
INHOUSE_MODEL_CKPT_PATH=<path to custom model file>
# go to root directory of the repo, and then run:
python -m src.training --run-id [RUN_ID] --dataset-path [PATH_TO_DATASET] --stage fit --max-epochs 100 \\
--receptor-model-name [esm2|tcrlang|tcrbert] --projection-dim 512 --gpus-used [GPU_IDX] --lr 1e-3 \\
--batch-size 8 --output-dir [CHECKPOINTS_OUTPUT_DIR] [--mask-seqs]
# currently, running model on test stage embeds the test set epitope/receptor pairs with the fine-tuned model and saves them.
python -m src.training --run-id [RUN_ID] --dataset-path [PATH_TO_DATASET] --stage test --from-checkpoint [CHECKPOINT_PATH] \\
--projection-dim 512 --receptor-model-name [esm2|tcrlang|tcrbert] --gpus-used [GPU_IDX] --batch-size 8 \\
--save-embed-path [PATH_FOR_SAVING_EMBEDS]
CLIP-based model for aligning epitopes to immune receptors
Python
11
11 commits
updated Apr 30, 2025
Code for paper "Sequence-based TCR-Peptide Representations Using Cross-Epitope Contrastive Fine-tuning of Protein Language Models." [paper] (RECOMB 2025)
🚧 This repository is under active construction. 🚧
Epitope Encoder
Recepter Encoder
To run this application, set the following environment variables
WANDB_OUTPUT_DIR=<path to output dir>
Additionally, if training on top of a custom in-house TCR model, the following path needs to be set
INHOUSE_MODEL_CKPT_PATH=<path to custom model file>
# go to root directory of the repo, and then run:
python -m src.training --run-id [RUN_ID] --dataset-path [PATH_TO_DATASET] --stage fit --max-epochs 100 \\
--receptor-model-name [esm2|tcrlang|tcrbert] --projection-dim 512 --gpus-used [GPU_IDX] --lr 1e-3 \\
--batch-size 8 --output-dir [CHECKPOINTS_OUTPUT_DIR] [--mask-seqs]
# currently, running model on test stage embeds the test set epitope/receptor pairs with the fine-tuned model and saves them.
python -m src.training --run-id [RUN_ID] --dataset-path [PATH_TO_DATASET] --stage test --from-checkpoint [CHECKPOINT_PATH] \\
--projection-dim 512 --receptor-model-name [esm2|tcrlang|tcrbert] --gpus-used [GPU_IDX] --batch-size 8 \\
--save-embed-path [PATH_FOR_SAVING_EMBEDS]