Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New TCR-Epitope Binding Affinity Prediction Task #141

Merged
merged 3 commits into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions tdc/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@

catalyst_dataset_names = ['uspto_catalyst']

tcr_epi_dataset_names = ['weber']

####################################
# generation
Expand Down Expand Up @@ -358,7 +359,8 @@
"DrugSyn",
"MTI",
"GDA",
"Catalyst"],
"Catalyst",
"TCR_Epitope_Binding"],
'generation': ["RetroSyn",
"Reaction",
"MolGen"
Expand Down Expand Up @@ -395,7 +397,8 @@ def get_task2category():
"Catalyst": catalyst_dataset_names,
"CRISPROutcome": crisproutcome_dataset_names,
"test_single_pred": test_single_pred_dataset_names,
"test_multi_pred": test_multi_pred_dataset_names
"test_multi_pred": test_multi_pred_dataset_names,
"TCREpitopeBinding": tcr_epi_dataset_names
}

benchmark_names = {"admet_group": admet_benchmark,
Expand Down Expand Up @@ -500,7 +503,8 @@ def get_task2category():
'leenay':'tab',
'test_single_pred': 'tab',
'test_multi_pred': 'tab',
'gdsc_gene_symbols': 'tab'}
'gdsc_gene_symbols': 'tab',
'weber': 'tab'}

name2id = {'bbb_adenot': 4259565,
'bbb_martins': 4259566,
Expand Down Expand Up @@ -586,7 +590,8 @@ def get_task2category():
'leenay':4279966,
'test_single_pred': 4832455,
'test_multi_pred': 4832456,
'gdsc_gene_symbols': 5255026}
'gdsc_gene_symbols': 5255026,
'weber': 5790963}

oracle2type = {'drd2': 'pkl',
'jnk3': 'pkl',
Expand Down
3 changes: 2 additions & 1 deletion tdc/multi_pred/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
from .mti import MTI
from .peptidemhc import PeptideMHC
from .ppi import PPI
from .test_multi_pred import TestMultiPred
from .test_multi_pred import TestMultiPred
from .tcr_epi import TCREpitopeBinding
41 changes: 41 additions & 0 deletions tdc/multi_pred/tcr_epi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
# Author: TDC Team
# License: MIT

import warnings
warnings.filterwarnings("ignore")
import sys

from ..utils import print_sys
from ..utils.load import download_wrapper, pd_load
from . import bi_pred_dataset, multi_pred_dataset
from ..metadata import dataset_names

class TCREpitopeBinding(multi_pred_dataset.DataLoader):

"""Data loader class to load datasets in T cell receptor (TCR) Specificity Prediction Task.
More info:

Task Description: Given the TCR and epitope sequence, predict binding probability.

Args:
name (str): the dataset name.
path (str, optional):
The path to save the data file, defaults to './data'
print_stats (bool, optional):
Whether to print basic statistics of the dataset, defaults to False

"""

def __init__(self, name, path='./data', print_stats=False):
"""Create TCR Specificity Prediction dataloader object
"""
super().__init__(name, path, print_stats,
dataset_names=dataset_names["TCREpitopeBinding"])
self.entity1_name = 'TCR'
self.entity2_name = 'Epitope'

if print_stats:
self.print_stats()

print('Done!', flush=True, file=sys.stderr)