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.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 vdjtools 5.2.1
File Size Uploaded Provenance
vdjtools-5.2.1.tar.gz 1.5 MB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for vdjtools 5.2.1
File
vdjtools-5.2.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
vdjtools-5.2.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
vdjtools-5.2.1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
vdjtools-5.2.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
vdjtools-5.2.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
vdjtools-5.2.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
vdjtools-5.2.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
vdjtools-5.2.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
vdjtools-5.2.1-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
vdjtools-5.2.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
vdjtools-5.2.1-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.1-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.1.tar.gz

Download URL vdjtools-5.2.1.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
351b58ae834dd3efc98eaa0523a7b703c687a89d6ac302944db4053ccc1ccea9
BLAKE2b-256 checksum
How to use checksums
41a96d616ee6308d605719eb69bc090acf3fbbd78723a92e2588ecd8deb67dd3
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.1-cp313-cp313-win_amd64.whl

Download URL vdjtools-5.2.1-cp313-cp313-win_amd64.whl
Size 2.0 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
1efc92de388d458c08687da14ffc6d33f7bf1afd62e04fb673a43cb7c8bb7f79
BLAKE2b-256 checksum
How to use checksums
86b2798c8c70c1d1607af7329a050a70685b68112291defc2850bb986d4dcaad
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.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL vdjtools-5.2.1-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
63e3bd81f0a0b06e001087288954f89babba9a52a6dc88a84f20d463d290b7ea
BLAKE2b-256 checksum
How to use checksums
e3d078752ae5c7def4c67a649d42c4dcebd6ffa24dcac4506b15090f34e668b1
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.1-cp313-cp313-macosx_11_0_arm64.whl

Download URL vdjtools-5.2.1-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
0e1090f173941ea8203b06e530732472ee288e3886f4212a756135bc82db66a1
BLAKE2b-256 checksum
How to use checksums
2aef9baed7590e3e73dcc7f7cb0c2b3fb91abf21aa291b3e1e03f3ab923a127c
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.1-cp312-cp312-win_amd64.whl

Download URL vdjtools-5.2.1-cp312-cp312-win_amd64.whl
Size 2.0 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
f5fcfd4e49c1076da473b6013888f100acf43f24e10f6b399a2060da604653b5
BLAKE2b-256 checksum
How to use checksums
a4a999109f39994ccb1fb854fa2bada73dca2e412e7dfeaf2b6e42283dda7229
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.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL vdjtools-5.2.1-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
311033feed821b5d59c0170236c9e4cfd19a797ed1d54ebd749c46740330d50a
BLAKE2b-256 checksum
How to use checksums
71fd2e1818af7ba1bf720262494fc1fb214d867941594b7b2eca8b6745b22373
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.1-cp312-cp312-macosx_11_0_arm64.whl

Download URL vdjtools-5.2.1-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
eceae69dd69630cf2261e48dfee24482de867df24f8734ce0dd43c3189f21113
BLAKE2b-256 checksum
How to use checksums
095e3c5abf908d54a731e7f53e1984b927c16edc19780eb88118db8d330a7edb
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.1-cp311-cp311-win_amd64.whl

Download URL vdjtools-5.2.1-cp311-cp311-win_amd64.whl
Size 2.0 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
cf65873550f0a4ebef49f6357be815ed22301c4032315713d9728c526b4e2821
BLAKE2b-256 checksum
How to use checksums
943a70930fc30a6ff327f3ed3fb4635b74ed45cd317b7f671d239775718dfe6b
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.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL vdjtools-5.2.1-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
0b9a170d533cd8c6ecd08204a1b593e456c6a50281dee83f041369a3ee6bc2b4
BLAKE2b-256 checksum
How to use checksums
51794174a1ea30c4ffd4390f8a541c8237595b4d65c945edf5285ee8f3828027
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.1-cp311-cp311-macosx_11_0_arm64.whl

Download URL vdjtools-5.2.1-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
ed18e6a9c6767f2cad685e37158ba36fe1b5b075c8a9048b5a35f59dbcc08f35
BLAKE2b-256 checksum
How to use checksums
be9269780b37214118422acd45b59051db04164822284c46b6af4a48169ca816
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.1-cp310-cp310-win_amd64.whl

Download URL vdjtools-5.2.1-cp310-cp310-win_amd64.whl
Size 2.0 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
24ed495a8229f5c85813cad9cb557151cbea7e0dcd0bafb9dde3f8c6e2327019
BLAKE2b-256 checksum
How to use checksums
b132004a965e1ded9fa24880d25434f28f38937fe0cfd2182e935a9aaee1e3a6
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.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL vdjtools-5.2.1-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
43e4951c77b5ff0367a9a10f2998460453ab0ff4d42c98859f44c09201688872
BLAKE2b-256 checksum
How to use checksums
161fd3b35259ad3edbc18e8009e2cb94626e32d154ef85831d25e915c735e281
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.1-cp310-cp310-macosx_11_0_arm64.whl

Download URL vdjtools-5.2.1-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
cf34b569a2bc1450d8f478d15c363ee4dd3995c40a75c31541e80de13a20ad0d
BLAKE2b-256 checksum
How to use checksums
59e7311a47467b691c51e262e62e5cc4668a9f4981f400f0982b4d5b6b3fb115
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.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

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

Select from 13 files

Attestation for vdjtools-5.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 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.1 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