Notebooks#
Start with vX receptor annotation. Each lesson pairs code with its data requirements and provides the notebook source. The reference and hit policy are recorded in the annotation manifests.
Start here#
Annotate an AIRR query against VDJdb
Use the current release or a pinned local ZIP. Read vX evidence, query dispositions, and the reference manifest.
Offline · custom referenceAnnotate against your own reference
Run vX on a complete peptide–MHC table and look up opaque class labels with the direct labeled-reference API.
Offline · synthetic inputsCompare exact-hit policies in vX
Keep the vX score and reference fixed while changing whether exact junction hits can contribute to evidence.
Repertoire evidence report source: run the shipping report CLI on synthetic final-table fixtures, inspect all 200 mock endpoints and verify preservation of recorded P and q values. This offline lesson performs no biological inference. For real final tables, follow Repertoire enrichment: algorithm and parameter choices and retain the producing manifest. Read the rendered lesson alongside its code.
The offline lessons use the supplied examples/inputs files. See
Examples for the shell commands and input downloads.
Biological questions#
ROC, precision–recall and false positives
Compare ROC and precision–recall curves, score distributions and true/false-positive counts for 2,670 labelled observations.
Deferred draft · vaccination repertoiresLLW evidence across donors
Retain all eligible clonotypes and technical replicates, then rank LLW evidence with the declared A*02 restriction.
Recombination model · complete target setsFrom precursor frequency to expected cells
Compare GIL, NLV and LLW: probability mass, model frequency, expected cells and occupancy.
The historical accuracy lesson uses supplied positive/control labels to illustrate metric construction. The vaccination workflow is an unexecuted draft, and the precursor lesson calculates model estimates. See Thread budgets and recorded laptop measurements for the scope of measured runtime, RAM and CPU use.
Precursor method and validation#
Precursor frequency for an epitope
Explore generation probability, union mass, unseen junctions and the conversion from repertoire mass to cell counts.
Measured precursor frequencies
Read the validation data, model conventions and setup for the interactive compendium.
Run a notebook#
Keep the complete examples directory together and open it with a Jupyter kernel in your isolated environment.
python -m pip install -r examples/requirements-notebooks.txt
Run this installation from the repository root: it installs the checkout whose CLI the notebooks use. Released packages need examples from the matching release tag. The gallery checker creates the kernel automatically.
For the biological lessons, set these variables if your local mirrors are elsewhere:
Variable |
Default |
Used by |
|---|---|---|
|
|
Accuracy, precursor estimates and the pinned reference |
|
|
Vaccination repertoire |
Keep profile_cli.py beside the notebooks.
Biological calculations use four native threads and write fresh CLI tables;
reviewed figures and aggregate counts are embedded in these pages. Raw rows,
sample identifiers and complete execution logs remain private. Documentation
builds render saved outputs without running calculations.
Verify the gallery#
The dependency recipe and
checker provide a clean-kernel check:
uv venv .venv-gallery
uv pip install --python .venv-gallery/bin/python -r examples/requirements-notebooks.txt
.venv-gallery/bin/python examples/check_gallery.py NEW_OUTPUT_DIRECTORY
The default check runs the offline shell workflows and the custom reference,
exact-hit policy, and repertoire-evidence notebooks. Add
--vdjdb-reference /path/to/release.zip to verify the official VDJdb
workflow offline. Add --scientific to execute the biological lessons,
including the deferred vaccination draft, if you have the raw mirrors and
network access. The checker saves executed notebooks and cell timings in the
new directory and exits nonzero on failure. The vaccination calculation has a
1,800-second cell budget. Other cells have up to 300 seconds. Documentation
builds execute no cells.