Skip to main content

vdjmatch

vdjmatch — TCR peptide–MHC annotation

PyPI tests docs python license

Get started · Guides · Commands · API · Examples

vdjmatch annotates selected T-cell receptors and repertoires against VDJdb, preserving query identities and reporting peptide–MHC candidates, competing evidence and optional background calibration. Native sequence search uses seqtree; repertoire ingestion reuses published vdjtools readers. Dependency versions and native CPU budgets are managed by the installed package.

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 (including conserved anchors) and V calls. The curated VDJdb reference is fetched on first use; add --vdjdb reference.zip for offline input. Single TRA/TRB receptors and paired receptors are supported. Exact hits are retained by default. Scores describe sequence evidence, not proof of binding.

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

Choose a reference

The existing match command and Annotator API support three reference choices:

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.

Paired score and calibration provenance

New paired producer manifests record the SHA-256 of their selection or calls TSV. Use each table with the manifest emitted in the same run. Regenerate older outputs with the original inputs and options before reducing them with paired- score. Equal-tail any-call recipes now pin the VDJdb loader. Refit older recipes using the original reference, null inputs and options before applying them.

Metadata

Release files for vdjmatch 1.2.4

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.2.4
File Size Uploaded Provenance Actions
vdjmatch-1.2.4.tar.gz 2.1 MB With provenance Details for vdjmatch-1.2.4.tar.gz

Built distribution (wheel)

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

Total release size: 3.0 MB

Release files / vdjmatch-1.2.4.tar.gz

Download URL vdjmatch-1.2.4.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
ec6f5c613ac36fcb88613b8693693225e28bd954e79eb880fda353e024ee8fd0
BLAKE2b-256 checksum
How to use checksums
49a88cacedc89ba9f9901685f47a35100c3087d49571958e97b1eb3413cb767c
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 Nov 26, 2026.

Transparency log

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

Download URL vdjmatch-1.2.4-py3-none-any.whl
Size 907.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e2f33763548f8305114a2df092c6a6e1d02cc3a5b0d17df49531149ca2673da
BLAKE2b-256 checksum
How to use checksums
657cbddc450e8d3f4bdcf3780c59d4267087c7f32af29274bf41805b786d8ba9
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 Nov 26, 2026.

Transparency log

Security for vdjmatch 1.2.4

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.2.4.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 Nov 26, 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