Skip to content

Kilian Maire

Repertoire2Structure (R2S) is a multi agent pipeline, orchestrated by Claude, that turns a raw 10x single cell TCR repertoire into QC'd predicted TCR to peptide MHC structures for its top clonotypes, with honest specific

Core trick

Matches clonotypes by TCRdist to labeled references and gates predicted TCR–pMHC structures against a scrambled-peptide control before calling them credible.

Tags

Description

Repertoire2Structure (R2S) is a multi agent pipeline, orchestrated by Claude, that turns a raw 10x single cell TCR repertoire into QC'd predicted TCR to peptide MHC structures for its top clonotypes, with honest specificity annotation and skeptical structure QC. A researcher drops a 10x contig CSV. A team of Claude agents then runs it end to end: an intake agent frames the run (data, question, compute route), a specificity annotator matches each clonotype by TCRdist against labeled references and refuses to force a label, a structure strategist reasons about the biological question and routes each group of clonotypes to the right folding tool (Protenix by default, with TCRdock, MHC-Fine, and an AF2 presentation classifier wired in), per tool executors build the folds on Colab or a local GPU, and a skeptical QC agent calibrates every structure against a scrambled peptide control before it will call it trustworthy. Two honesty rules are enforced in the output schemas, not just narrated: specificity is annotation by similarity, never prediction; and a predicted structure never confirms specificity. What we found is an honest, convergent negative. On a preregistered repertoire benchmark, structural confidence reads peptide presentation, not TCR recognition, the same conclusion a parallel AlphaFold 3 study (McMaster et al.) reached the same month with a different engine. So R2S does not oversell a specificitrs: the reusable contribution isthe agentic question to structure system plus the guardrails a working immunologist actually needs, leakage aware annotation, pe a fold is spent, and scramblecalibrated QC that is honest about what a fold can and cannot prove.
KilianMaire/tcr-repertoire2structure★ 10 forksPythonMITCreated Jul 8, 2026 · last push Jul 13, 2026

README excerpt

# Repertoire2Structure (R2S)

A multi agent pipeline, orchestrated by Claude, that turns a raw 10x single cell TCR repertoire into QC'd predicted TCR pMHC structures for its top clonotypes, with honest specificity annotation and skeptical structure QC.

Built for the Built with Claude: Life Sciences hackathon (Researcher track).

## Demo (2 min 36 s)

[![Watch the R2S demo on YouTube](docs/demo/poster.png)](https://www.youtube.com/watch?v=Ru48ZQThA60)

Watch on [YouTube](https://www.youtube.com/watch?v=Ru48ZQThA60), or [download the mp4](docs/demo/R2S_submission.mp4). A narrated walk through: what the pipeline recognizes (the TCR to peptide MHC complex), the multi agent run on a real 10x repertoire, honest specificity annotation (29 annotated across confidence tiers, 23 of them high confidence, 90 unannotatable, no forced label), the structure strategist routing a class one group to Protenix, stub flagging before a fold is spent, and the skeptical scramble calibrated QC.

![architecture](docs/architecture.png)

## Repository layout

The tool and the research that validated it are kept apart.

```
src/rep2struct/     the R2S tool (the deliverable): deterministic stages + the Claude Agent SDK layer
tests/              the tool's test suite (offline, no network, no GPU)
docs/               how the tool works (architecture, fold procedure) and the build journal (superpowers/)
pyproject.toml      the installable package

science/            the science behind it (see science/READM

Team