YYJMAY commited on
Commit
7a61c42
·
verified ·
1 Parent(s): 7cc4679

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +176 -183
README.md CHANGED
@@ -1,183 +1,176 @@
1
- ---
2
- language:
3
- - en
4
- tags:
5
- - biology
6
- - immunology
7
- - tcr
8
- - peptide
9
- - t-cell-receptor
10
- - binding-prediction
11
- task_categories:
12
- - text-classification
13
- size_categories:
14
- - 10K<n<100K
15
- ---
16
-
17
- # PT Interaction Dataset
18
-
19
- ## Dataset Description
20
-
21
- The **PT (Peptide-TCR) interaction dataset** is designed for training and evaluating T-Cell Receptor (TCR) binding prediction models with full TCR sequence information. This dataset contains paired peptide sequences and complete TCR alpha/beta chain sequences (including all 6 CDR regions: A1-A3, B1-B3), along with binary binding labels.
22
-
23
- ### Key Features
24
-
25
- - **Full TCR Information**: Contains all 6 CDR regions (A1, A2, A3, B1, B2, B3) for both alpha and beta chains
26
- - **Binary Labels**: Binding labels (0=non-binder, 1=binder)
27
- - **HLA Allele Information**: MHC allele context for each peptide-TCR pair
28
- - **Peptide Length Range**: 8-12 amino acids
29
- - **CDR3β Length Range**: 5-23 amino acids
30
- - **Training Set**: 43,378 samples (13.62% positive, 86.38% negative)
31
- - **Test Set**: 2,956 samples (13.97% positive, 86.03% negative)
32
-
33
- ### Dataset Statistics
34
-
35
- | Split | Samples | Positives | Negatives | Unique TCRs | Unique HLAs |
36
- |-------|---------|-----------|-----------|-------------|-------------|
37
- | Train | 43,378 | 5,906 (13.62%) | 37,472 (86.38%) | 10,414 | 10 |
38
- | ID Test | 2,956 | 413 (13.97%) | 2,543 (86.03%) | 2,511 | 10 |
39
-
40
- ### Data Format
41
-
42
- Each row contains the following columns:
43
-
44
- - `peptide`: Amino acid sequence of the peptide (8-12 aa)
45
- - `A1`, `A2`, `A3`: CDR1α, CDR2α, CDR3α sequences
46
- - `B1`, `B2`, `B3`: CDR1β, CDR2β, CDR3β sequences
47
- - `binder`: Binary binding label (0=non-binder, 1=binder)
48
- - `allele`: HLA allele (e.g., A*02:01, B*07:02)
49
-
50
- ### Example Data
51
-
52
- ```python
53
- {
54
- "peptide": "KLGGALQAK",
55
- "A1": "SSVPPY",
56
- "A2": "YTSAATLV",
57
- "A3": "AVKWSSNYKLT",
58
- "B1": "SQVTM",
59
- "B2": "ANQGSEA",
60
- "B3": "SVGSGDHGEQF",
61
- "binder": 0,
62
- "allele": "A*03:01"
63
- }
64
- ```
65
-
66
- ## Dataset Construction
67
-
68
- ### Data Sources
69
-
70
- The PT dataset is curated from multiple publicly available TCR-peptide binding databases and experimental studies, including:
71
- - VDJdb: A curated database of T-cell receptor sequences
72
- - McPAS-TCR: Manually curated catalog of pathology-associated TCR sequences
73
- - IEDB: Immune Epitope Database
74
- - Published experimental validation studies
75
-
76
- ### Quality Control
77
-
78
- 1. **TCR Leakage Prevention**: Train and test splits are carefully constructed to ensure no TCR overlap based on CDR3β sequences
79
- 2. **Duplicate Removal**: All duplicate (peptide, B3, binder) combinations are removed
80
- 3. **Length Filtering**: Only peptides of length 8-12 amino acids are included
81
- 4. **HLA Standardization**: All HLA alleles follow the format "A*02:01" (without "HLA-" prefix)
82
- 5. **Data Validation**: All sequences are validated for amino acid composition
83
-
84
- ### Split Strategy
85
-
86
- - **ID Test**: Random split preserving the same peptide/HLA/TCR distribution as training
87
- - **No TCR Leakage**: Train and test sets are strictly disjoint based on CDR3β sequences
88
-
89
- ## Usage
90
-
91
- ### Loading the Dataset
92
-
93
- ```python
94
- from datasets import load_dataset
95
-
96
- # Load the entire dataset
97
- dataset = load_dataset("YYJMAY/pt-interaction")
98
-
99
- # Access splits
100
- train_data = dataset['train']
101
- test_data = dataset['test']
102
-
103
- # Convert to pandas DataFrame
104
- import pandas as pd
105
- train_df = pd.DataFrame(train_data)
106
- test_df = pd.DataFrame(test_data)
107
- ```
108
-
109
- ### Training Example
110
-
111
- ```python
112
- from datasets import load_dataset
113
- import pandas as pd
114
-
115
- # Load training data
116
- dataset = load_dataset("YYJMAY/pt-interaction", split="train")
117
- df = pd.DataFrame(dataset)
118
-
119
- # Prepare features
120
- X = df[['peptide', 'A1', 'A2', 'A3', 'B1', 'B2', 'B3', 'allele']]
121
- y = df['binder']
122
-
123
- # Train your model
124
- # model.fit(X, y)
125
- ```
126
-
127
- ### Evaluation Example
128
-
129
- ```python
130
- from datasets import load_dataset
131
- import pandas as pd
132
- from sklearn.metrics import roc_auc_score, accuracy_score
133
-
134
- # Load test data
135
- dataset = load_dataset("YYJMAY/pt-interaction", split="test")
136
- df = pd.DataFrame(dataset)
137
-
138
- # Make predictions
139
- X_test = df[['peptide', 'A1', 'A2', 'A3', 'B1', 'B2', 'B3', 'allele']]
140
- y_test = df['binder']
141
-
142
- # predictions = model.predict(X_test)
143
- # print(f"AUC: {roc_auc_score(y_test, predictions):.4f}")
144
- # print(f"Accuracy: {accuracy_score(y_test, predictions > 0.5):.4f}")
145
- ```
146
-
147
- ## Citation
148
-
149
- If you use this dataset in your research, please cite:
150
-
151
- ```bibtex
152
- @misc{pt_interaction_dataset,
153
- title={PT Interaction Dataset: Peptide-TCR Binding Prediction},
154
- author={SPRINT Benchmark Contributors},
155
- year={2025},
156
- howpublished={\url{https://huggingface.co/datasets/YYJMAY/pt-interaction}}
157
- }
158
- ```
159
-
160
- ## Related Datasets
161
-
162
- - **PM Dataset**: Peptide-MHC binding (no TCR information)
163
- - **PMT Dataset**: Peptide-MHC-TCR with CDR3β only
164
- - **Allelic OOD**: Out-of-distribution test for rare HLA alleles
165
- - **Temporal OOD**: Out-of-distribution test for COVID-19 era data
166
- - **Modality OOD**: Cross-modality generalization (BA vs EL)
167
-
168
- ## License
169
-
170
- This dataset is released under the MIT License. The original data sources may have their own licenses.
171
-
172
- ## Contact
173
-
174
- For questions or issues, please open an issue on the [SPRINT GitHub repository](https://github.com/Computational-Machine-Intelligence/SPRINT).
175
-
176
- ## Dataset Card Authors
177
-
178
- SPRINT Benchmark Team
179
-
180
- ## Dataset Version
181
-
182
- - **Version**: 1.0
183
- - **Last Updated**: 2025-01-19
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - biology
6
+ - immunology
7
+ - tcr
8
+ - peptide
9
+ - t-cell-receptor
10
+ - binding-prediction
11
+ task_categories:
12
+ - text-classification
13
+ size_categories:
14
+ - 10K<n<100K
15
+ ---
16
+
17
+ # PT Interaction Dataset
18
+
19
+ ## Dataset Description
20
+
21
+ The **PT (Peptide-TCR) interaction dataset** is designed for training and evaluating T-Cell Receptor (TCR) binding prediction models with full TCR sequence information. This dataset contains paired peptide sequences and complete TCR alpha/beta chain sequences (including all 6 CDR regions: A1-A3, B1-B3), along with binary binding labels.
22
+
23
+ ### Key Features
24
+
25
+ - **Full TCR Information**: Contains all 6 CDR regions (A1, A2, A3, B1, B2, B3) for both alpha and beta chains
26
+ - **Binary Labels**: Binding labels (0=non-binder, 1=binder)
27
+ - **HLA Allele Information**: MHC allele context for each peptide-TCR pair
28
+ - **Peptide Length Range**: 8-12 amino acids
29
+ - **CDR3β Length Range**: 5-23 amino acids
30
+ - **Training Set**: 43,378 samples (13.62% positive, 86.38% negative)
31
+ - **Test Set**: 2,956 samples (13.97% positive, 86.03% negative)
32
+
33
+ ### Dataset Statistics
34
+
35
+ | Split | Samples | Positives | Negatives | Unique TCRs | Unique HLAs |
36
+ |-------|---------|-----------|-----------|-------------|-------------|
37
+ | Train | 43,378 | 5,906 (13.62%) | 37,472 (86.38%) | 10,414 | 10 |
38
+ | ID Test | 2,956 | 413 (13.97%) | 2,543 (86.03%) | 2,511 | 10 |
39
+
40
+ ### Data Format
41
+
42
+ Each row contains the following columns:
43
+
44
+ - `peptide`: Amino acid sequence of the peptide (8-12 aa)
45
+ - `A1`, `A2`, `A3`: CDR1α, CDR2α, CDR3α sequences
46
+ - `B1`, `B2`, `B3`: CDR1β, CDR2β, CDR3β sequences
47
+ - `binder`: Binary binding label (0=non-binder, 1=binder)
48
+ - `allele`: HLA allele (e.g., A*02:01, B*07:02)
49
+
50
+ ### Example Data
51
+
52
+ ```python
53
+ {
54
+ "peptide": "KLGGALQAK",
55
+ "A1": "SSVPPY",
56
+ "A2": "YTSAATLV",
57
+ "A3": "AVKWSSNYKLT",
58
+ "B1": "SQVTM",
59
+ "B2": "ANQGSEA",
60
+ "B3": "SVGSGDHGEQF",
61
+ "binder": 0,
62
+ "allele": "A*03:01"
63
+ }
64
+ ```
65
+
66
+ ## Dataset Construction
67
+
68
+
69
+ ### Quality Control
70
+
71
+ 1. **TCR Leakage Prevention**: Train and test splits are carefully constructed to ensure no TCR overlap based on CDR3β sequences
72
+ 2. **Duplicate Removal**: All duplicate (peptide, B3, binder) combinations are removed
73
+ 3. **Length Filtering**: Only peptides of length 8-12 amino acids are included
74
+ 4. **HLA Standardization**: All HLA alleles follow the format "A*02:01" (without "HLA-" prefix)
75
+ 5. **Data Validation**: All sequences are validated for amino acid composition
76
+
77
+ ### Split Strategy
78
+
79
+ - **ID Test**: Random split preserving the same peptide/HLA/TCR distribution as training
80
+ - **No TCR Leakage**: Train and test sets are strictly disjoint based on CDR3β sequences
81
+
82
+ ## Usage
83
+
84
+ ### Loading the Dataset
85
+
86
+ ```python
87
+ from datasets import load_dataset
88
+
89
+ # Load the entire dataset
90
+ dataset = load_dataset("YYJMAY/pt-interaction")
91
+
92
+ # Access splits
93
+ train_data = dataset['train']
94
+ test_data = dataset['test']
95
+
96
+ # Convert to pandas DataFrame
97
+ import pandas as pd
98
+ train_df = pd.DataFrame(train_data)
99
+ test_df = pd.DataFrame(test_data)
100
+ ```
101
+
102
+ ### Training Example
103
+
104
+ ```python
105
+ from datasets import load_dataset
106
+ import pandas as pd
107
+
108
+ # Load training data
109
+ dataset = load_dataset("YYJMAY/pt-interaction", split="train")
110
+ df = pd.DataFrame(dataset)
111
+
112
+ # Prepare features
113
+ X = df[['peptide', 'A1', 'A2', 'A3', 'B1', 'B2', 'B3', 'allele']]
114
+ y = df['binder']
115
+
116
+ # Train your model
117
+ # model.fit(X, y)
118
+ ```
119
+
120
+ ### Evaluation Example
121
+
122
+ ```python
123
+ from datasets import load_dataset
124
+ import pandas as pd
125
+ from sklearn.metrics import roc_auc_score, accuracy_score
126
+
127
+ # Load test data
128
+ dataset = load_dataset("YYJMAY/pt-interaction", split="test")
129
+ df = pd.DataFrame(dataset)
130
+
131
+ # Make predictions
132
+ X_test = df[['peptide', 'A1', 'A2', 'A3', 'B1', 'B2', 'B3', 'allele']]
133
+ y_test = df['binder']
134
+
135
+ # predictions = model.predict(X_test)
136
+ # print(f"AUC: {roc_auc_score(y_test, predictions):.4f}")
137
+ # print(f"Accuracy: {accuracy_score(y_test, predictions > 0.5):.4f}")
138
+ ```
139
+
140
+ ## Citation
141
+
142
+ If you use this dataset in your research, please cite:
143
+
144
+ ```bibtex
145
+ @misc{pt_interaction_dataset,
146
+ title={PT Interaction Dataset: Peptide-TCR Binding Prediction},
147
+ author={SPRINT Benchmark Contributors},
148
+ year={2025},
149
+ howpublished={\url{https://huggingface.co/datasets/YYJMAY/pt-interaction}}
150
+ }
151
+ ```
152
+
153
+ ## Related Datasets
154
+
155
+ - **PM Dataset**: Peptide-MHC binding (no TCR information)
156
+ - **PMT Dataset**: Peptide-MHC-TCR with CDR3β only
157
+ - **Allelic OOD**: Out-of-distribution test for rare HLA alleles
158
+ - **Temporal OOD**: Out-of-distribution test for COVID-19 era data
159
+ - **Modality OOD**: Cross-modality generalization (BA vs EL)
160
+
161
+ ## License
162
+
163
+ This dataset is released under the MIT License. The original data sources may have their own licenses.
164
+
165
+ ## Contact
166
+
167
+ For questions or issues, please open an issue on the [SPRINT GitHub repository](https://github.com/Computational-Machine-Intelligence/SPRINT).
168
+
169
+ ## Dataset Card Authors
170
+
171
+ SPRINT Benchmark Team
172
+
173
+ ## Dataset Version
174
+
175
+ - **Version**: 1.0
176
+ - **Last Updated**: 2025-01-19