Skip to main content

vdjmatch

vdjmatch — TCR peptide–MHC annotation

PyPI tests docs python license

Get started · Guides · Commands · API · Examples

vdjmatch ranks peptide–MHC evidence for human and mouse T-cell receptors against VDJdb or a compatible reference. The VDJmatch score combines weighted junction and V-region distances with evidence from nearby references and competing targets. It supports TRA, TRB and paired-chain receptors and preserves unsupported queries and ambiguous rankings. VDJdb · Score and calibration

VDJmatch workflow: shared receptor-table validation and curated VDJdb search, followed by receptor annotation or matched-reference repertoire enrichment

Quick start

python -m pip install vdjmatch
vdjmatch annotate sample.tsv -o annotation

Native Windows is supported without WSL using the same pip installation. Source builds of the native dependencies require Microsoft C++ Build Tools. Windows CI builds the source stack and checks single-chain, paired and CLI annotation on synthetic fixtures.

Use AIRR junction_aa with conserved anchors, V calls and chain identities. On first use the command fetches VDJdb and applies the curated reference policy. Add --vdjdb reference.zip to pin a local release. The *.selection.tsv table reports scores and ranking status. Supply matching --vx-null-dir banks for calibrated calls. Ordinary annotation retains exact hits.

For a small offline example, download the examples directory and run sh examples/annotate.sh annotation-demo from the repository root.

Choose a reference

Run annotation against a user-supplied VDJdb-format table with peptide–MHC labels and receptor species, junctions and V genes. Set a common complex_id on both chain rows of each genuine reference pair.

vdjmatch annotate queries.tsv --vdjdb reference.tsv -o custom

The command reports ranked evidence for a standalone custom table. Applying a calibration null bank requires the same reference ZIP and scoring configuration used to fit the bank. Use --score-model kernel to replay stem4.

Use match or Annotator for fixed-scope candidate matching and for references with arbitrary labels.

Reference Python CLI
Official vdjdb-db release Annotator.latest() vdjmatch match queries.tsv
Your VDJdb-format table/archive Annotator.from_path("reference.tsv") vdjmatch match queries.tsv --reference reference.tsv
Your labeled chains or pairs Annotator.from_labels(rows, locus="TRB") vdjmatch match queries.tsv --reference labels.csv --reference-format labels --locus TRB

--vdjdb remains an alias for --reference. Ordinary queries retain exact matches. Use --exclude-exact only when explicitly evaluating a classifier or assessing record reliability; it filters hits while retaining the complete reference model.

A simple single-chain reference needs junction_aa,label (or epitope instead of label). Supply --locus TRA/TRB or a reference locus column. For paired tables, use junction_aa_alpha,junction_aa_beta,label and add --paired; each reference row links its actual TRA/TRB pair. V/J, species and MHC metadata are optional. Missing query locus fields use the explicit hint or the reference's sole locus; supplied query metadata is retained. The sequences include conserved junction anchors.

from vdjmatch import Annotator

single = Annotator.from_labels([("CASSQYF", "class-a"), ("CATSRYF", "class-b")], locus="TRB")
calls = single.annotate(["CASSQYF", "CWWWWWWWF"])

paired = Annotator.from_labels([("CAVQYF", "CASSQYF", "class-a")])

Labeled references are indexed directly without VDJdb-specific curation or reference-diagnostic preparation. Their labels are opaque class names, reported in the existing epitope output fields. They default to uncalibrated matching; request --evalue with the appropriate organism/controls for calibration. Run the synthetic single/paired example for a complete Python example.

Documentation

Need Guide
Learn the workflow Getting started · Rendered notebooks
Annotate a cohort or use an offline reference How-to guides · Runnable examples
Look up inputs, options and outputs CLI reference · Python API
Understand methods and formulas Scoring · Evidence and calibration
Test repertoire enrichment Matching, nulls and count units
Estimate precursor frequency Method · Experimental compendium

The legacy Java/Groovy implementation remains on legacy-java and Java tag 1.3.1, with JitPack artifact com.github.antigenomics:vdjmatch:1.3.1.

CPU budgets

threads=0 selects the available physical cores, constrained by CPU affinity, scheduler allocation and container quota. On a fully allocated 20-core/40-thread host, automatic selection uses 20 workers. Use 1 for serial work; an explicit positive count may use logical CPUs within the allocation.

Sample workers keep their inner numerical kernels serial.

License

ISALGO LAB Academic and Non-Commercial Research License v1.0. See LICENSE.

Metadata

Release files for vdjmatch 1.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vdjmatch 1.3.3
File Size Uploaded Provenance Actions
vdjmatch-1.3.3.tar.gz 2.2 MB With provenance Details for vdjmatch-1.3.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vdjmatch 1.3.3
File Interpreter ABI Platform Actions
vdjmatch-1.3.3-py3-none-any.whl Python 3 none any Details for vdjmatch-1.3.3-py3-none-any.whl

Total release size: 3.1 MB

Release files / vdjmatch-1.3.3.tar.gz

Download URL vdjmatch-1.3.3.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
4ac94bbd811fca76216de284202f47ca306e5b3dc1fc430e8bdf347bb34c2899
BLAKE2b-256 checksum
How to use checksums
f19eeff3d174f3a042212a89ed3225d60300ac8ab250921eb629949f4b7deea0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Release files / vdjmatch-1.3.3-py3-none-any.whl

Download URL vdjmatch-1.3.3-py3-none-any.whl
Size 959.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da03ebc4da707e13c9b10257bc92d9acdeac42b7a93bb2a8254ff7ac3270adbd
BLAKE2b-256 checksum
How to use checksums
58f19489d9e1a71edfb501e8466bfdff9c4c862cc1b3e75253c09dcc8425646e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Security for vdjmatch 1.3.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for vdjmatch-1.3.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page