File size: 4,392 Bytes
355e019
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
930732f
355e019
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
930732f
355e019
930732f
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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
---
pretty_name: IEDB Assay Export
license: cc-by-4.0
tags:
- biology
- immunology
- epitopes
- assays
- iedb
- parquet
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*.parquet
  - split: test
    path: data/test-*.parquet
---

# IEDB Assay Export

IEDB is a curated database of experimentally characterized immune epitopes, including B cell, T cell, and MHC-binding data across infectious, allergic, autoimmune, and transplant contexts.

## Splits

| Split | Rows |
|---|---:|
| train | 6,705,467 |
| test | 745,344 |
| total | 7,450,811 |

The split is deterministic and epitope-aware: `sha256(epitope_id) % 10 == 0` goes to `test`; buckets `1` through `9` go to `train`. If an assay lacks an epitope ID, the script falls back to reference ID, assay ID, then XML filename.

## Dataset Statistics

| Metric | Value |
|---|---:|
| XML files parsed | 26,785 |
| XML parse-error files | 0 |
| Assay rows | 7,450,811 |
| Unique references with assays | 26,785 |
| Unique epitopes with assays | 2,320,500 |
| Uncompressed XML bytes | 26.32 GB |
| Compressed XML bytes | 605.58 MB |

Assay category counts:

| Assay category | Rows |
|---|---:|
| MhcLigandElution | 4,635,502 |
| BCell | 1,419,468 |
| MhcBinding | 825,450 |
| TCell | 570,391 |

Top qualitative measurements:

| Measurement | Rows |
|---|---:|
| Positive | 5,239,946 |
| Negative | 1,967,175 |
| Positive-Low | 118,346 |
| Positive-High | 69,648 |
| Positive-Intermediate | 55,696 |

Top epitope chemical types:

| Chemical type | Rows |
|---|---:|
| Peptide from protein | 6,773,619 |
| Peptide, no natural source | 591,652 |
| Discontinuous protein residues | 51,083 |
| Other Non-Sequence | 14,279 |
| Carbohydrate fragment | 5,650 |

## Load With `datasets`

```python
from datasets import load_dataset

ds = load_dataset("LiteFold/IEDB")
print(ds)

row = ds["train"][0]
print(row)
```

Load one split directly:

```python
from datasets import load_dataset

train = load_dataset("LiteFold/IEDB", split="train")
test = load_dataset("LiteFold/IEDB", split="test")
```

Stream rows without materializing the full table locally:

```python
from datasets import load_dataset

streamed = load_dataset("LiteFold/IEDB", split="train", streaming=True)
first_row = next(iter(streamed))
```

Filter to positive T-cell assays:

```python
from datasets import load_dataset

train = load_dataset("LiteFold/IEDB", split="train")
positive_tcell = train.filter(
    lambda row: row["assay_category"] == "TCell" and row["is_positive"]
)
```

For large jobs, prefer streaming or process the Parquet files with a columnar engine such as DuckDB, PyArrow, Polars, or Spark.

## Main Columns

| Column | Description |
|---|---|
| `xml_file` | Source XML file inside `iedb_export.zip`. |
| `reference_id`, `pubmed_id`, `article_year`, `article_title`, `journal_title`, `authors` | Reference/article metadata. |
| `epitope_id`, `epitope_name` | IEDB epitope identifiers and names. |
| `epitope_structure_type`, `epitope_chemical_type` | Parsed XML structure type and chemical type. |
| `linear_sequence`, `linear_sequence_length` | Linear peptide/protein sequence when present. |
| `discontinuous_residues` | Discontinuous residue string when present. |
| `starting_position`, `ending_position` | Natural-sequence coordinates when present. |
| `source_organism_id`, `source_molecule_genbank_id` | Source organism and molecule identifiers parsed from epitope structure. |
| `assay_category`, `assay_id`, `assay_type_id` | Assay type and identifiers. |
| `qualitative_measurement`, `is_positive`, `quantitative_measurement` | Assay outcome fields. |
| `host_organism_id`, `host_sex`, `host_age`, `disease_state` | Host and disease context when present. |
| `mhc_allele_id`, `mhc_allele_types_present` | MHC information when present. |
| `cell_type`, `cell_tissue_type`, `cell_culture_conditions` | Effector-cell context when present. |
| `antigen_evidence_code`, `immunogen_evidence_code`, `assay_comments` | Additional assay curation metadata. |
| `split_bucket` | Deterministic hash bucket; bucket 0 is test. |

# Citation

```
@article{vita2025iedb,
  title   = {The Immune Epitope Database ({IEDB}): 2024 update},
  author  = {Vita, Randi and others},
  journal = {Nucleic Acids Research},
  volume  = {53},
  number  = {D1},
  pages   = {D436--D443},
  year    = {2025},
  doi     = {10.1093/nar/gkae1092}
}
```