|
|
---
|
|
|
language:
|
|
|
- en
|
|
|
tags:
|
|
|
- biology
|
|
|
- immunology
|
|
|
- tcr
|
|
|
- peptide
|
|
|
- t-cell-receptor
|
|
|
- binding-prediction
|
|
|
task_categories:
|
|
|
- text-classification
|
|
|
size_categories:
|
|
|
- 10K<n<100K
|
|
|
---
|
|
|
|
|
|
# PT Interaction Dataset
|
|
|
|
|
|
## Dataset Description
|
|
|
|
|
|
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.
|
|
|
|
|
|
### Key Features
|
|
|
|
|
|
- **Full TCR Information**: Contains all 6 CDR regions (A1, A2, A3, B1, B2, B3) for both alpha and beta chains
|
|
|
- **Binary Labels**: Binding labels (0=non-binder, 1=binder)
|
|
|
- **HLA Allele Information**: MHC allele context for each peptide-TCR pair
|
|
|
- **Peptide Length Range**: 8-12 amino acids
|
|
|
- **CDR3β Length Range**: 5-23 amino acids
|
|
|
- **Training Set**: 43,378 samples (13.62% positive, 86.38% negative)
|
|
|
- **Test Set**: 2,956 samples (13.97% positive, 86.03% negative)
|
|
|
|
|
|
### Dataset Statistics
|
|
|
|
|
|
| Split | Samples | Positives | Negatives | Unique TCRs | Unique HLAs |
|
|
|
|-------|---------|-----------|-----------|-------------|-------------|
|
|
|
| Train | 43,378 | 5,906 (13.62%) | 37,472 (86.38%) | 10,414 | 10 |
|
|
|
| ID Test | 2,956 | 413 (13.97%) | 2,543 (86.03%) | 2,511 | 10 |
|
|
|
|
|
|
### Data Format
|
|
|
|
|
|
Each row contains the following columns:
|
|
|
|
|
|
- `peptide`: Amino acid sequence of the peptide (8-12 aa)
|
|
|
- `A1`, `A2`, `A3`: CDR1α, CDR2α, CDR3α sequences
|
|
|
- `B1`, `B2`, `B3`: CDR1β, CDR2β, CDR3β sequences
|
|
|
- `binder`: Binary binding label (0=non-binder, 1=binder)
|
|
|
- `allele`: HLA allele (e.g., A*02:01, B*07:02)
|
|
|
|
|
|
### Example Data
|
|
|
|
|
|
```python
|
|
|
{
|
|
|
"peptide": "KLGGALQAK",
|
|
|
"A1": "SSVPPY",
|
|
|
"A2": "YTSAATLV",
|
|
|
"A3": "AVKWSSNYKLT",
|
|
|
"B1": "SQVTM",
|
|
|
"B2": "ANQGSEA",
|
|
|
"B3": "SVGSGDHGEQF",
|
|
|
"binder": 0,
|
|
|
"allele": "A*03:01"
|
|
|
}
|
|
|
```
|
|
|
|
|
|
## Dataset Construction
|
|
|
|
|
|
### Data Sources
|
|
|
|
|
|
The PT dataset is curated from multiple publicly available TCR-peptide binding databases and experimental studies, including:
|
|
|
- VDJdb: A curated database of T-cell receptor sequences
|
|
|
- McPAS-TCR: Manually curated catalog of pathology-associated TCR sequences
|
|
|
- IEDB: Immune Epitope Database
|
|
|
- Published experimental validation studies
|
|
|
|
|
|
### Quality Control
|
|
|
|
|
|
1. **TCR Leakage Prevention**: Train and test splits are carefully constructed to ensure no TCR overlap based on CDR3β sequences
|
|
|
2. **Duplicate Removal**: All duplicate (peptide, B3, binder) combinations are removed
|
|
|
3. **Length Filtering**: Only peptides of length 8-12 amino acids are included
|
|
|
4. **HLA Standardization**: All HLA alleles follow the format "A*02:01" (without "HLA-" prefix)
|
|
|
5. **Data Validation**: All sequences are validated for amino acid composition
|
|
|
|
|
|
### Split Strategy
|
|
|
|
|
|
- **ID Test**: Random split preserving the same peptide/HLA/TCR distribution as training
|
|
|
- **No TCR Leakage**: Train and test sets are strictly disjoint based on CDR3β sequences
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
### Loading the Dataset
|
|
|
|
|
|
```python
|
|
|
from datasets import load_dataset
|
|
|
|
|
|
# Load the entire dataset
|
|
|
dataset = load_dataset("YYJMAY/pt-interaction")
|
|
|
|
|
|
# Access splits
|
|
|
train_data = dataset['train']
|
|
|
test_data = dataset['test']
|
|
|
|
|
|
# Convert to pandas DataFrame
|
|
|
import pandas as pd
|
|
|
train_df = pd.DataFrame(train_data)
|
|
|
test_df = pd.DataFrame(test_data)
|
|
|
```
|
|
|
|
|
|
### Training Example
|
|
|
|
|
|
```python
|
|
|
from datasets import load_dataset
|
|
|
import pandas as pd
|
|
|
|
|
|
# Load training data
|
|
|
dataset = load_dataset("YYJMAY/pt-interaction", split="train")
|
|
|
df = pd.DataFrame(dataset)
|
|
|
|
|
|
# Prepare features
|
|
|
X = df[['peptide', 'A1', 'A2', 'A3', 'B1', 'B2', 'B3', 'allele']]
|
|
|
y = df['binder']
|
|
|
|
|
|
# Train your model
|
|
|
# model.fit(X, y)
|
|
|
```
|
|
|
|
|
|
### Evaluation Example
|
|
|
|
|
|
```python
|
|
|
from datasets import load_dataset
|
|
|
import pandas as pd
|
|
|
from sklearn.metrics import roc_auc_score, accuracy_score
|
|
|
|
|
|
# Load test data
|
|
|
dataset = load_dataset("YYJMAY/pt-interaction", data_files="id_test.csv")
|
|
|
df = pd.DataFrame(dataset['train']) # HF loads single files as 'train' split
|
|
|
|
|
|
# Make predictions
|
|
|
X_test = df[['peptide', 'A1', 'A2', 'A3', 'B1', 'B2', 'B3', 'allele']]
|
|
|
y_test = df['binder']
|
|
|
|
|
|
# predictions = model.predict(X_test)
|
|
|
# print(f"AUC: {roc_auc_score(y_test, predictions):.4f}")
|
|
|
# print(f"Accuracy: {accuracy_score(y_test, predictions > 0.5):.4f}")
|
|
|
```
|
|
|
|
|
|
## Citation
|
|
|
|
|
|
If you use this dataset in your research, please cite:
|
|
|
|
|
|
```bibtex
|
|
|
@misc{pt_interaction_dataset,
|
|
|
title={PT Interaction Dataset: Peptide-TCR Binding Prediction},
|
|
|
author={SPRINT Benchmark Contributors},
|
|
|
year={2025},
|
|
|
howpublished={\url{https://huggingface.co/datasets/YYJMAY/pt-interaction}}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
## Related Datasets
|
|
|
|
|
|
- **PM Dataset**: Peptide-MHC binding (no TCR information)
|
|
|
- **PMT Dataset**: Peptide-MHC-TCR with CDR3β only
|
|
|
- **Allelic OOD**: Out-of-distribution test for rare HLA alleles
|
|
|
- **Temporal OOD**: Out-of-distribution test for COVID-19 era data
|
|
|
- **Modality OOD**: Cross-modality generalization (BA vs EL)
|
|
|
|
|
|
## License
|
|
|
|
|
|
This dataset is released under the MIT License. The original data sources may have their own licenses.
|
|
|
|
|
|
## Contact
|
|
|
|
|
|
For questions or issues, please open an issue on the [SPRINT GitHub repository](https://github.com/Computational-Machine-Intelligence/SPRINT).
|
|
|
|
|
|
## Dataset Card Authors
|
|
|
|
|
|
SPRINT Benchmark Team
|
|
|
|
|
|
## Dataset Version
|
|
|
|
|
|
- **Version**: 1.0
|
|
|
- **Last Updated**: 2025-01-19
|
|
|
|