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

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.

License

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

CPU budgets use threads=0 for automatic parallel work, capped at 16 allocated CPUs. Use 1 for serial work or a positive count to override the automatic cap within the scheduler/container allocation. Sample workers keep their inner numerical kernels serial.

Candidate-only annotation coalesces up to 256 complete query identities and 64 MiB of queued expanded tables per reduction. Native search and alias expansion keep small blocks; larger complete-query frames are consumed directly.

Metadata

Release files for vdjmatch 1.2.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.2.3
File Size Uploaded Provenance Actions
vdjmatch-1.2.3.tar.gz 2.0 MB With provenance Details for vdjmatch-1.2.3.tar.gz

Built distribution (wheel)

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

Total release size: 2.9 MB

Release files / vdjmatch-1.2.3.tar.gz

Download URL vdjmatch-1.2.3.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
5c15393ead29a728a33b3e8c5de4c6c81f9d0fd05cc03c2248a3c6b74b0f0bcf
BLAKE2b-256 checksum
How to use checksums
6683d849b79a5e374da59ffce29637dd00b625fdb9438afbc3d346fd153d0e42
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 5, 2026.

Transparency log

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

Download URL vdjmatch-1.2.3-py3-none-any.whl
Size 883.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
899e0ac50a0fc16bf69970d46a8383fca741f9c4803bcc495108ce4dd69f80cd
BLAKE2b-256 checksum
How to use checksums
42ddd4a3f06ca57fb906eb8d3532385633f629b51d08ad55920d68769a06a19e
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 5, 2026.

Transparency log

Security for vdjmatch 1.2.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.2.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 Nov 5, 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