Skip to main content

vdjmatch

vdjmatch — TCR peptide–MHC annotation

PyPI tests docs python license

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. Requires released seqtree>=1.3.2 and vdjtools>=5.6.0, including allocation-aware native thread validation.

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.1

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.1
File Size Uploaded Provenance Actions
vdjmatch-1.2.1.tar.gz 2.0 MB With provenance Details for vdjmatch-1.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 2.9 MB

Release files / vdjmatch-1.2.1.tar.gz

Download URL vdjmatch-1.2.1.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
e57f8cbbc6e9c7a924a2857dcf3f8bc6a062ff11c7c611d390416534edd9f673
BLAKE2b-256 checksum
How to use checksums
b4f3f6f400bc78adc286488c6825728f605781d63303b11d5106394bd81b62b4
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 4, 2026.

Transparency log

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

Download URL vdjmatch-1.2.1-py3-none-any.whl
Size 882.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
81eb71b7ae02a962fc25ac4b0ca1209222841e92362e1ba00c94886aaa404c9c
BLAKE2b-256 checksum
How to use checksums
c3681a3b9036b9128e51dcdaee9f6d0ca767b7556e3a6cd46fa566317ad93221
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 4, 2026.

Transparency log

Security for vdjmatch 1.2.1

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.1.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 4, 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