Datasets:
Add comprehensive README with dataset description
Browse files
README.md
CHANGED
|
@@ -1,176 +1,183 @@
|
|
| 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 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
###
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
#
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
```
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 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", data_files="id_test.csv")
|
| 136 |
+
df = pd.DataFrame(dataset['train']) # HF loads single files as 'train' split
|
| 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
|