vdjtools — immune-repertoire analysis
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 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
and PCA workspace still grow with sample count and feature width. 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.
Metadata
Release files for vdjtools 5.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vdjtools-5.1.0.tar.gz | 1.4 MB | Details |
Built distributions (wheels)
Total release size: 24.0 MB
Release files / vdjtools-5.1.0.tar.gz
| Download URL | vdjtools-5.1.0.tar.gz |
|---|---|
| Size | 1.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
810115d8e3291f441f57bdb43732f31cad0c148b0972420acbc9ffef974de320
|
|
BLAKE2b-256 checksum How to use checksums |
e433749c4f4c119bb011f0daaac2dc4901f5bea21ee9fc2231c091eefd61bdab
|
| 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 13, 2026.
Transparency logRelease files / vdjtools-5.1.0-cp313-cp313-win_amd64.whl
| Download URL | vdjtools-5.1.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b2d3472100065f53e170a1afc22d68ae175b74dfcd375bd7efb7762f3003b9a4
|
|
BLAKE2b-256 checksum How to use checksums |
2ac981679b343308a8bf230e55baa2d8a2240c2ef2851514e3a670e4e9a221e8
|
| 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 13, 2026.
Transparency logRelease files / vdjtools-5.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | vdjtools-5.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
c70f10db85a86c709c55690087a3ec6350e1c728ebeac8c91fbbcdf5e2903e8b
|
|
BLAKE2b-256 checksum How to use checksums |
e4787542b0c4fc60993850aa3ca1282f20cf138ec0872d33a6aeadce29e1338b
|
| 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 13, 2026.
Transparency logRelease files / vdjtools-5.1.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | vdjtools-5.1.0-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7825e7d6a48efd9bb6129e2f39fdf706b796db335de0cd22a955300db698e424
|
|
BLAKE2b-256 checksum How to use checksums |
cc79f6cbd95ac96592eb97fead64630587cf8c279ace1f95c1015083bd08fac1
|
| 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 13, 2026.
Transparency logRelease files / vdjtools-5.1.0-cp312-cp312-win_amd64.whl
| Download URL | vdjtools-5.1.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
fc25da8e7e55cab9ba4ff073aecaa0bc26d5f44ed956f2a857cf0e19e78142c3
|
|
BLAKE2b-256 checksum How to use checksums |
4c1824bb84b261775a8c94b5f26d5c845745c6fa3e58d0c534a3ba7f20ae656c
|
| 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 13, 2026.
Transparency logRelease files / vdjtools-5.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | vdjtools-5.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
6d64a4369ecfc87fa8b5e8e20fc21173d4d6253475c0fcd14fcdb9a897d5e980
|
|
BLAKE2b-256 checksum How to use checksums |
458204cff69c56a11125c92330bd352f8e47e53e8688451d7bd27eb5c7afbb9d
|
| 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 13, 2026.
Transparency logRelease files / vdjtools-5.1.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | vdjtools-5.1.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
dcbcb7f1ecf7ffac6829b400f7b29b4fd3b4c1b10a977d3e72d5bbc2e3de43d5
|
|
BLAKE2b-256 checksum How to use checksums |
a73e6b30ae1d45ec7258734a16470ba8128ab63e85d7fc2320285314ab717d8d
|
| 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 13, 2026.
Transparency logRelease files / vdjtools-5.1.0-cp311-cp311-win_amd64.whl
| Download URL | vdjtools-5.1.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6c103aec32afd3c0c486e137b30ecc0cae8fa66e08ed610941796f1ef33bd6ae
|
|
BLAKE2b-256 checksum How to use checksums |
fa6f883553438bb69cd789d2dd7dec51005919e0495f7cb519a802921a88f845
|
| 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 13, 2026.
Transparency logRelease files / vdjtools-5.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | vdjtools-5.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ff0f9ab34f812de358b6c9fa43b37b2324056093e83919b5de352b8cfdb7a99f
|
|
BLAKE2b-256 checksum How to use checksums |
7028489036c1599acd24b47e0515de02ed80a1384b51bb0aee924842972c7a00
|
| 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 13, 2026.
Transparency logRelease files / vdjtools-5.1.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | vdjtools-5.1.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0e2e10b77ba1baef7486f57da60044d567c3b817c5ad1ff4a1accf5250ba8603
|
|
BLAKE2b-256 checksum How to use checksums |
e6cbf3b4c4629bc08cb595a4ae586f34f5b1e9a87bfd7216db2189511b0bbef0
|
| 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 13, 2026.
Transparency logRelease files / vdjtools-5.1.0-cp310-cp310-win_amd64.whl
| Download URL | vdjtools-5.1.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3ad33929e17d243b248463f5876d849b3b38b4548b4dafc9b80242d01cb0418b
|
|
BLAKE2b-256 checksum How to use checksums |
ccf4c1adcdc07735acd5ea20ee13d754f3e694062892de79ad8ebd93f0ad37ec
|
| 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 13, 2026.
Transparency logRelease files / vdjtools-5.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | vdjtools-5.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
7074623654acf44f2ae1e3a8a13b492f78ccde805e34b4f76da2621998bd49f3
|
|
BLAKE2b-256 checksum How to use checksums |
c5bdb21846d391dedc2cb5344097ca78a3d25dbe4289eda5cd0f2ec3de197abe
|
| 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 13, 2026.
Transparency logRelease files / vdjtools-5.1.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | vdjtools-5.1.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4e9d6bfc6043b4ca3abb3a0ca5511fb76abef30eaf4aa641432bd6be2d7cf156
|
|
BLAKE2b-256 checksum How to use checksums |
05cfb7da750c69634dea8b475729fd078d9dbb194984d4fff7654b3f6afc8b50
|
| 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 13, 2026.
Transparency log