Skip to main content

vdjtools

vdjtools — immune-repertoire analysis

PyPI CI docs python license

Get started · Guides · Commands · API · Examples · Glossary

Read receptor tables, measure diversity and overlap, fit recombination models, and export statistical feature tables or published corpus signatures. vdjtools is a Python/C++ rewrite of the original Groovy/Java tool, using AIRR column names and Polars frames. arda, seqtree and vdjmatch supply the shared native/reference engines.

Install

pip install vdjtools

Prebuilt CPython wheels include the native extension. A source install needs a C++ toolchain. Optional extras include [overlap] for sample MDS, [sc] for single-cell bridges and [examples] for marimo notebooks. See getting started.

Quickstart

from vdjtools import io, stats   # import before numerical libraries

sample = io.read("clones.tsv")
diversity = stats.diversity_stats(sample)
v_usage = stats.segment_usage(sample, "v")
vdjtools diversity samples/*.tsv -o diversity.tsv
vdjtools features samples/*.tsv --coverage 0.8 --threads 1 -o features.tsv
vdjtools signature --corpus blood samples/*.tsv -o vsig.tsv

features exports unrotated measurements and channels without a corpus. Declared log/CLR/logit/arcsine transforms remain; “raw” means before corpus scaling, winsorization and PCA. signature applies the published vsig corpus transform. These are different outputs. mirpy's rsig geometry half joins vsig on sample_id; mirpy's sample RFF vectors are a separate representation.

Fit your own sample PCA on selected measurements, compatible control rows, or reuse a saved rotation:

vdjtools pca features.tsv --columns feature_columns.txt --fit rotation.npz --components 32 -o pcs.tsv
vdjtools pca new_features.tsv --rotation rotation.npz -o new_pcs.tsv

The raw feature/PCA guide explains feature selection, coverage, imputation, feature-space identities and saved rotations.

Find the right page

Task Guide
Load, measure and compare your first samples Getting started
Filter, correct, downsample or pool Pre-processing
Diversity, overlap, gene usage, biomarkers and dynamics User guide
Unrotated features and optional sample PCA Raw features
Published vsig/rsig corpus coordinates Signatures · Methods · Channels
Pgen, generation and model fitting Model workshop
Single-cell data and interoperability Single cell
Functions, flags, examples and terms API · Commands · Examples · Glossary

Recorded performance measurements and model validation describe the native Pgen, generation and inference engines.

Resource budgets

Import vdjtools before numerical libraries in a fresh interpreter. Native batch APIs use allocation-aware CPU budgets; sample workers use serial inner kernels. Signature --jobs and analysis --threads select bounded workers, with 0 for the detected allocation. Excessive or nested budgets raise. The final feature table still grows with sample count and feature width. Configured randomized corpus fits and TablePCA.fit_features use sparse rows and bounded statistic chunks; their remaining workspace grows with nonzero entries and the requested component count. See CPU/container limits.

Development

bash setup.sh --dev-parents --tests
source .venv/bin/activate
uv pip install -e ".[docs]"
pytest tests/python -q -m "not slow and not heavy and not benchmark"
env -C docs make html

Uses a repo-local uv environment and a C++ toolchain. See the API reference for public functions and the model workshop for native model workflows.

Citing

For the v2 rewrite, cite this repository. For the original tool, cite Shugay et al., PLoS Computational Biology 2015. The VDJtrack recapture model in vdjtools.dynamics is Pavlova, Zvyagin and Shugay (2024).

License

GPL-3.0-or-later. The legacy Groovy/Java v1.x tool lives on the legacy-1.x branch, with its releases under the repository tags v0.0.1 … 1.2.1.

Configurable statistical features

Opt-in basic uses diversity, V–J usage, junction-length spectratype and separate isotype composition; joint uses diversity, V–J–length usage and separate isotype. Their extended variants add IMGT11 or frozen BLOSUM62 motifs (XXX, XX_X, X_XX), with optional gene or clustered V context. Existing feature/signature defaults stay legacy. See features and corpus fitting for fit/save/apply and the distinction between an available definition and a published rotation.

Metadata

Release files for vdjtools 5.2.2

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

Source distribution (sdist)

Source distribution for vdjtools 5.2.2
File Size Uploaded Provenance
vdjtools-5.2.2.tar.gz 1.5 MB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for vdjtools 5.2.2
File
vdjtools-5.2.2-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
vdjtools-5.2.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
vdjtools-5.2.2-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
vdjtools-5.2.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
vdjtools-5.2.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
vdjtools-5.2.2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
vdjtools-5.2.2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
vdjtools-5.2.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
vdjtools-5.2.2-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
vdjtools-5.2.2-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
vdjtools-5.2.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
vdjtools-5.2.2-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details

Total release size: 25.6 MB

Release files / vdjtools-5.2.2.tar.gz

Download URL vdjtools-5.2.2.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
4db21e2d8743793281136a246f97a6ad918850427b69710add7de08ecd97d4a6
BLAKE2b-256 checksum
How to use checksums
5d7ed9158d45ee54841e460dfbd3cd20e21f554973f7cfae2edcd0900e49b09d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 19, 2026.

Transparency log

Release files / vdjtools-5.2.2-cp313-cp313-win_amd64.whl

Download URL vdjtools-5.2.2-cp313-cp313-win_amd64.whl
Size 2.0 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
54b58ec40b54504fdf25696e4555c3576d6506f3dad3ba9e9e8dedc7ee743f59
BLAKE2b-256 checksum
How to use checksums
9b4fef5433296209cdf528be93c9797436bce3cd20b3cdff7ad826e325bc3bfa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 19, 2026.

Transparency log

Release files / vdjtools-5.2.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL vdjtools-5.2.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.0 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
2050c07b48ed94d12dd7173ae7067d35df0b2cb3fd9b854c18784f0677566a6b
BLAKE2b-256 checksum
How to use checksums
65b4190054c1a8035b8743adb6fc21d787186a3ef8efda3f5cf0cb4f66143bc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 19, 2026.

Transparency log

Release files / vdjtools-5.2.2-cp313-cp313-macosx_11_0_arm64.whl

Download URL vdjtools-5.2.2-cp313-cp313-macosx_11_0_arm64.whl
Size 2.0 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
015e544c9d9ed928cfea2e1a17f5364c7f4a20737a8b8a0bc4e0054bb871391b
BLAKE2b-256 checksum
How to use checksums
f41da4a3ca60a3a03d44075b6d818adfafcc40ac00c209fedf730ffe221c8608
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 19, 2026.

Transparency log

Release files / vdjtools-5.2.2-cp312-cp312-win_amd64.whl

Download URL vdjtools-5.2.2-cp312-cp312-win_amd64.whl
Size 2.0 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
3e5f7e17b320a03164da8731bdabf1145f9bdb0e36dd5f5139ec6b65331f5425
BLAKE2b-256 checksum
How to use checksums
29ba9daab1188ae5f137a5916ce9173527d37b514641e99e1ecf11547a150002
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 19, 2026.

Transparency log

Release files / vdjtools-5.2.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL vdjtools-5.2.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.0 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b37a29bade9c697302faee0a73479fd2b2fd27a43bbfde529d4e14c4ee67b7ff
BLAKE2b-256 checksum
How to use checksums
117c92cf37c83782b1105c139367aea52191f7cf69619424640caf4908e26a9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 19, 2026.

Transparency log

Release files / vdjtools-5.2.2-cp312-cp312-macosx_11_0_arm64.whl

Download URL vdjtools-5.2.2-cp312-cp312-macosx_11_0_arm64.whl
Size 2.0 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ae30805d1d55a79b2428baf02223a01b1a4e683373fbe5949769e946ee85f1e1
BLAKE2b-256 checksum
How to use checksums
ffd9eb56f5f9980ba657476518d4371b8030f675967063839c1337567fab865a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 19, 2026.

Transparency log

Release files / vdjtools-5.2.2-cp311-cp311-win_amd64.whl

Download URL vdjtools-5.2.2-cp311-cp311-win_amd64.whl
Size 2.0 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
2e8185c0bf39c8f5a9ce762f746eb77585163a525084f4c336f2f9eebe93be8d
BLAKE2b-256 checksum
How to use checksums
10bcc73ad77784f51a54a29f2a34c3f322c053eba8d2987771bfcbc14e94492a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 19, 2026.

Transparency log

Release files / vdjtools-5.2.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL vdjtools-5.2.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.0 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
59048c3edd6431fb5d6b96377c943354190208e32645beb772a485d8e873c3f3
BLAKE2b-256 checksum
How to use checksums
90263848f82e2d58bb717d67bb394d1c856898a7aeee4d1918c8850b47b7461b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 19, 2026.

Transparency log

Release files / vdjtools-5.2.2-cp311-cp311-macosx_11_0_arm64.whl

Download URL vdjtools-5.2.2-cp311-cp311-macosx_11_0_arm64.whl
Size 2.0 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1f19dd1dd52a6e1460dbceec56e2ed22ff2e552ba770552eabb572fbe0226cfd
BLAKE2b-256 checksum
How to use checksums
904487018cb9b7661d60f0599071013c62ffdc0223d69f1796554b2d14cfe46e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 19, 2026.

Transparency log

Release files / vdjtools-5.2.2-cp310-cp310-win_amd64.whl

Download URL vdjtools-5.2.2-cp310-cp310-win_amd64.whl
Size 2.0 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
7a18344b76a2377d485256267da0f77ac9c0117a4307ebb2a016902214f2dcf6
BLAKE2b-256 checksum
How to use checksums
709a055958f19bca5d713159ea3112070319d9e1a2d245c9d3be1ecfd50d60f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 19, 2026.

Transparency log

Release files / vdjtools-5.2.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL vdjtools-5.2.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 2.0 MB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
49c0e9434de40b8bab8840216fcee672bb5b5bae0a19405969c8ee72ef28e746
BLAKE2b-256 checksum
How to use checksums
a8be2020e1b52ea7d818e5ea96a16d99190dcb29ae5aedc5d24379547c88bab3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 19, 2026.

Transparency log

Release files / vdjtools-5.2.2-cp310-cp310-macosx_11_0_arm64.whl

Download URL vdjtools-5.2.2-cp310-cp310-macosx_11_0_arm64.whl
Size 2.0 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4334bcb81bdbce66a5cc541144848920b0d0b688c4833a9437ef861e5530edbd
BLAKE2b-256 checksum
How to use checksums
fd0bd02c5ef7cb4f80e9f7189b8622ffac989c0a70859cbf693a7493ed10b4c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 19, 2026.

Transparency log

Security for vdjtools 5.2.2

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

All 13 files in this release have been uploaded with provenance metadata.

Select from 13 files

Attestation for vdjtools-5.2.2.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 Oct 19, 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.

Release history Release notifications | RSS feed

This release

5.2.2 This release

13 release files Full provenance

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