IEDB / README.md
anindya64's picture
Update README.md
930732f verified
metadata
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

from datasets import load_dataset

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

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

Load one split directly:

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:

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:

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}
}