BenchRep-T / README.md
lordim's picture
Describe Mal-ID rows as individual reads, not deduplicated clones
0750db2 verified
|
Raw History Blame Contribute Delete
11.6 kB
metadata
license: mit
pretty_name: BenchRep-T
size_categories:
  - 1K<n<10K
tags:
  - immunology
  - t-cell-receptor
  - tcr-beta
  - immune-repertoire
  - AIRR
  - immunoseq
  - repertoire-classification
configs:
  - config_name: Mal-ID
    data_files:
      - split: specimens
        path: immuneML/Mal-ID/metadata.csv
  - config_name: Savola_RA
    data_files:
      - split: specimens
        path: immuneML/immunoSEQ/Savola_RA/metadata.csv
  - config_name: Musvosvi_TB
    data_files:
      - split: specimens
        path: immuneML/immunoSEQ/Musvosvi_TB/metadata.csv
  - config_name: Rawat_T1D
    data_files:
      - split: specimens
        path: immuneML/immunoSEQ/Rawat_T1D/metadata.csv
  - config_name: Mitchell_T1D
    data_files:
      - split: specimens
        path: immuneML/immunoSEQ/Mitchell_T1D/metadata.csv
  - config_name: Emerson_CMV
    data_files:
      - split: specimens
        path: immuneML/immunoSEQ/Emerson_CMV/metadata.csv

BenchRep-T

BenchRep-T is a benchmark for TCRβ (T-cell receptor β-chain) immune-repertoire classification. It bundles the multi-disease Mal-ID cohort together with five external disease cohorts (sequenced on the Adaptive Biotechnologies immunoSEQ platform), providing per-specimen repertoire files, harmonized sample metadata, and auxiliary files used for the sequencing-depth scaling-law and driver-sequence experiments.

Each specimen (one sequenced repertoire) is one example; the classification target is the specimen-level disease label.

Dataset structure

BenchRep-T/
├── Mal-ID/
│   ├── metadata.tsv                             # 550 specimen annotations + labels
│   ├── repertoires/                             # 550 per-specimen TCRβ rearrangement tables (.tsv.gz)
│   ├── scaling_exp_depth_indices_max75k.json.gz # sampling indices for the depth scaling-law experiment
│   └── vdjdb_minervina_driver_seq_matches.csv   # repertoire ↔ public/driver-clone matches (driver-seq experiment)
├── immunoSEQ/
│   ├── Savola_RA/         # Rheumatoid Arthritis
│   │   ├── metadata.tsv
│   │   └── repertoires/   # 91 .tsv.gz
│   ├── Musvosvi_TB/       # Tuberculosis (progression)
│   │   ├── metadata.tsv
│   │   └── repertoires/   # 140 .tsv.gz
│   ├── Rawat_T1D/         # Type 1 Diabetes
│   │   ├── metadata.tsv
│   │   └── repertoires/   # 614 .tsv.gz
│   ├── Mitchell_T1D/      # Type 1 Diabetes
│   │   ├── metadata.tsv
│   │   └── repertoires/   # 196 .tsv.gz
│   └── Emerson_CMV/       # Cytomegalovirus exposure
│       ├── metadata.tsv
│       └── repertoires/   # 761 .tsv.gz
└── immuneML/              # immuneML-ready AIRR export of every cohort (see immuneML/README.md)
    ├── Mal-ID/, immunoSEQ/<cohort>/   # metadata.csv + AIRR repertoires/*.tsv.gz
    ├── tasks/<task>/                  # task metadata + fixed fold{0,1,2}_{train,test}.csv
    ├── specs/<task>.yaml              # runnable immuneML specifications
    └── README.md, MANIFEST.tsv, export_report.json

Cohorts

Group Path Classification task Repertoires Label composition Repertoire format Source study
Mal-ID Mal-ID/ Multi-disease vs. Healthy/Background 550 Healthy/Background 197, HIV 98, Lupus 64, Covid19 58, Influenza 37, T1D 96 AIRR-style rearrangement table Zaslavsky et al. 2025
Savola_RA immunoSEQ/Savola_RA/ Rheumatoid Arthritis vs. Healthy 91 RA 71, Healthy 20 immunoSEQ export Savola et al. 2017
Musvosvi_TB immunoSEQ/Musvosvi_TB/ TB Progressor vs. Controller 140 Progressor 63, Controller 77 immunoSEQ export Musvosvi et al. 2023
Rawat_T1D immunoSEQ/Rawat_T1D/ Type 1 Diabetes vs. Control 614 T1D 426, Healthy/Background 188 immunoSEQ export (reduced) Rawat et al. 2026
Mitchell_T1D immunoSEQ/Mitchell_T1D/ Type 1 Diabetes vs. Healthy 196 T1D 171, Healthy/Background 25 immunoSEQ export Mitchell et al. 2022
Emerson_CMV immunoSEQ/Emerson_CMV/ CMV+ vs. Healthy/Background 761 CMV 340, Healthy/Background 421 immunoSEQ export Emerson et al. 2017

Files

  • repertoires/*.tsv.gz — one gzip-compressed, tab-separated file per specimen; each row is one TCRβ sequencing read (Mal-ID; identical reads are not collapsed) or one unique rearrangement with its count (immunoSEQ cohorts). The file stem is the specimen identifier (for the immunoSEQ cohorts it matches the specimen_label/sample_name/filename column in that cohort's metadata.tsv; Rawat_T1D file names carry a _TCRB suffix).
  • metadata.tsv — one row per specimen with the classification label and per-cohort annotations (schemas differ across cohorts — see below).
  • Mal-ID/scaling_exp_depth_indices_max75k.json.gz — precomputed read-sampling indices (up to 75k reads/specimen) defining the subsampled repertoires used in the sequencing-depth scaling-law experiment.
  • Mal-ID/vdjdb_minervina_driver_seq_matches.csv — matches between repertoire clones and known public / antigen-specific "driver" TCRs (VDJdb + Minervina et al.), used for the driver-sequence experiment. Columns: disease, sample_cdr3, sample_vgene, sample_jgene, public_clone_cdr3, public_clone_vgene, public_clone_jgene, similarity, score, filename.

Repertoire schemas

Mal-ID (AIRR-style, ~120 columns) — key fields: sequence_id, repertoire_id, locus, v_call, d_call, j_call, cdr3, cdr3_aa, junction, junction_aa, productive, participant_label, specimen_time_point, plus full nucleotide alignment / insertion-deletion columns.

immunoSEQ cohorts (Savola_RA, Musvosvi_TB, Mitchell_T1D; Adaptive immunoSEQ export, ~54 columns) — key fields: nucleotide, cdr3_aa, count (templates/reads), frequencyCount (%), v_call, j_call, vGeneName, jGeneName, sequenceStatus, estimatedNumberGenomes, sequence, num_reads, repertoire_id, participant_label.

Rawat_T1D (reduced immunoSEQ-derived, 17 columns): cdr3_aa, count (templates/reads), frequency, nucleotide, v_call, d_gene, j_call, sequenceStatus, v_family, d_family, j_family, v_resolved, d_resolved, j_resolved, sequence, num_reads.

Emerson_CMV (minimal, 7 columns): cdr3_aa, v_call, j_call, sequence, num_reads, repertoire_id, participant_label.

Metadata schemas

All metadata.tsv files share participant_label, specimen_label, and disease (the classification target). Cross-validation fold assignments are provided per cohort (CV_fold / fold / malid_cross_validation_fold_id_when_in_test_set). Additional per-cohort columns:

  • Mal-ID / Mitchell_T1D: specimen_time_point, study_name, available_gene_loci, disease_subtype, age, sex, ancestry.
  • Savola_RA / Musvosvi_TB: immunoSEQ sample statistics (total_templates, productive_templates, fraction_productive, productive_simpson_clonality, sample_tags, sku, test_name, …).
  • Rawat_T1D: subject clinical/HLA fields (diabetes_status, sex, age, duration, HLA A/B/C/DPB1/DQB1/DRB1…, hla_high_risk_type, autoantibody statuses, ML_class).
  • Emerson_CMV: same base fields as Mal-ID/Mitchell_T1D (specimen_time_point, study_name, available_gene_loci, disease_subtype, age, sex, ancestry) plus repertoire_file, emerson_subject_id, cohort, cohort_name, race, ethnicity, race_and_ethnicity, known_cmv_status, metadata_source.

Usage

from huggingface_hub import snapshot_download
import pandas as pd, glob, os

# Download one cohort (metadata + repertoires)
local = snapshot_download(
    repo_id="lordim/BenchRep-T",
    repo_type="dataset",
    allow_patterns="immunoSEQ/Savola_RA/*",
)

meta = pd.read_csv(f"{local}/immunoSEQ/Savola_RA/metadata.tsv", sep="\t")
rep_files = glob.glob(f"{local}/immunoSEQ/Savola_RA/repertoires/*.tsv.gz")
rep = pd.read_csv(rep_files[0], sep="\t")   # pandas reads .gz transparently

immuneML-ready AIRR export

immuneML/ holds every cohort above in one AIRR Rearrangement schema that immuneML can import directly:

  • Repertoires: the same specimens and rows as the native files, in 20 AIRR columns that include all 14 required fields. cdr3_aa is unchanged. junction/junction_aa are rebuilt from the nucleotide data where they translate back to cdr3_aa: 99.78% of Mal-ID rows, and more than 99.99% in every other cohort.
  • Metadata: one comma-separated metadata.csv per cohort, with subject_id set to the specimen and BenchRep-T's fixed fold.
  • Tasks and specs: for each of the 11 benchmark tasks, the task's specimens, the three fixed train/test fold splits, and a runnable immuneML specification.

Tested with immuneML 3.0.27; install it with pandas<3. immuneML/README.md documents every conversion rule and caveat.

from huggingface_hub import snapshot_download

snapshot_download(
    repo_id="lordim/BenchRep-T", repo_type="dataset", local_dir="BenchRep-T",
    allow_patterns=["immuneML/immunoSEQ/Savola_RA/*", "immuneML/tasks/ra/*",
                    "immuneML/specs/ra.yaml"],
)
# then, inside BenchRep-T/:  immune-ml immuneML/specs/ra.yaml results/ra

License

Released under the MIT License.

References

Source studies for each cohort:

  • Mal-ID — Zaslavsky, Maxim E., et al. "Disease diagnostics using machine learning of B cell and T cell receptor sequences." Science 387.6736 (2025): eadp2407.
  • Savola_RA — Savola, Paula, et al. "Somatic mutations in clonally expanded cytotoxic T lymphocytes in patients with newly diagnosed rheumatoid arthritis." Nature Communications 8.1 (2017): 15869.
  • Musvosvi_TB — Musvosvi, Munyaradzi, et al. "T cell receptor repertoires associated with control and disease progression following Mycobacterium tuberculosis infection." Nature Medicine 29.1 (2023): 258-269.
  • Rawat_T1D — Rawat, Puneet, et al. "Identification of a type 1 diabetes–associated T cell receptor repertoire signature from the human peripheral blood." Science Advances 12.7 (2026): eadx7448.
  • Mitchell_T1D — Mitchell, Angela M., et al. "Temporal development of T cell receptor repertoires during childhood in health and disease." JCI Insight 7.18 (2022): e161885.
  • Emerson_CMV — Emerson, Ryan O., et al. "Immunosequencing identifies signatures of cytomegalovirus exposure history and HLA-mediated effects on the T cell repertoire." Nature Genetics 49.5 (2017): 659-665.

Citation

BenchRep-T is described in the following paper, to appear in the NeurIPS 2026 Evaluations and Datasets Track:

Alejandro Buendia*, Chiho Im*, Anshul Kundaje, Scott D Boyd, and Liel Cohen-Lavi. "BenchRep-T: A Systematic Evaluation of T-Cell Repertoire-Based Disease Diagnostics." Advances in Neural Information Processing Systems (NeurIPS), Evaluations and Datasets Track, 2026.

* Equal contribution (co-first authors).

@inproceedings{buendia2026benchrep,
  title     = {BenchRep-T: A Systematic Evaluation of T-Cell Repertoire-Based Disease Diagnostics},
  author    = {Buendia, Alejandro and Im, Chiho and Kundaje, Anshul and Boyd, Scott D and Cohen-Lavi, Liel},
  booktitle = {Advances in Neural Information Processing Systems, Evaluations and Datasets Track},
  year      = {2026}
}

Code: github.com/boyd-lab/BenchRep-T. A preprint is available on bioRxiv.