Skip to main content

tsarina

Tests PyPI

Tsarina selects shared cancer immunotherapy targets for an individual patient or a population HLA panel.

It starts with reusable cancer-testis antigen (CTA), oncogenic-virus, and recurrent-mutation targets. It then combines tumor context, public immunopeptidomics evidence, healthy-tissue safety evidence, and predicted HLA presentation to produce ranked peptide-MHC (pMHC) candidates.

Choose a workflow

Goal Entry point Result
Prioritize targets for one patient tsarina personalize or personalized_targets() Ranked CTA, viral, and mutant pMHCs for that patient's HLA type and tumor
Design an off-the-shelf CTA panel tsarina panel CTA × HLA matrix with evidence tiers and population-coverage estimates
Assemble a shared CTA vaccine tsarina vaccine Mortality-ranked proteoforms, sequence funnel, junction audit and DNA/RNA construct
Inspect public peptide observations tsarina hits Cancer, healthy-tissue, and restriction evidence for specified peptides

Start with the documentation guide for inputs, data setup, and the workflow-specific guides.

Install

pip install tsarina

Install the optional peptide-generation and partitioning dependencies for full functionality:

pip install "tsarina[all]"

Quick start

Prioritize targets for a patient:

tsarina personalize \
  --hla 'HLA-A*02:01,HLA-A*24:02,HLA-B*07:02' \
  --cta 'MAGEA4=142.5,PRAME=87.3' \
  --mutations "KRAS G12D" \
  --viruses hpv16 \
  --output patient-targets.csv

Build the default global CTA × HLA panel:

tsarina panel --format long --output panel.csv

Both workflows can use registered IEDB or CEDAR ligand exports as public immunopeptidomics evidence. See Data and evidence for setup and interpretation.

Target categories

Category Candidate source Tumor-specific context
CTA The canonical oncoref CTA set Tumor RNA expression and reproductive-tissue restriction
Viral Proteomes from nine oncogenic viruses Virus detected in the tumor
Mutant Nineteen recurrent hotspots across seven driver genes Matching mutation detected in the tumor

Oncoref is the single authority for CTA membership, aliases, HPA restriction calls, and proteoform groups. Tsarina adds downstream evidence and scoring without maintaining a second CTA definition library. The exact boundary is documented in CTA ownership and downstream evidence.

How ranking works

Tsarina applies the same high-level sequence across workflows:

  1. choose candidates from the relevant shared-target sets;
  2. enforce tumor context and exclude non-target human peptide matches;
  3. annotate public cancer and healthy-tissue MS observations;
  4. predict presentation by the requested HLA alleles; and
  5. rank pMHCs with explicit evidence and safety provenance.

Public MS evidence strengthens a candidate but does not redefine CTA membership. Healthy, direct-ex-vivo observations outside reproductive tissues and thymus are treated as safety evidence.

Documentation

Development

./develop.sh
./format.sh
./lint.sh
./test.sh

develop.sh uses the active virtualenv (or creates .venv) and requires pip >=23.0. It resolves Tsarina and present sibling checkouts together, checks the proposed versions against installed consumers before changing packages, and runs pip check after installation. If a checkout is incompatible, update that checkout or use a separate virtualenv; the refused install leaves the installed packages unchanged. Missing siblings use their released packages.

Real MHCflurry model integration tests run in a separate CI job. To run them locally (Python 3.10+):

pip install -e ".[test-mhcflurry]"
mhcflurry downloads fetch models_class1_presentation
pytest tests/test_mhcflurry_integration.py --run-mhcflurry

These tests check the downloaded presentation bundle, including its affinity calibration, through Tsarina's scoring interface. Enabling them requires the dependency and models; missing prerequisites fail rather than skip. Use ./test.sh --run-mhcflurry to include them in the full suite. ./deploy.sh requires this extra and model bundle and always runs these tests.

Metadata

Release files for tsarina 1.34.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 tsarina 1.34.1
File Size Uploaded
tsarina-1.34.1.tar.gz 2.1 MB Details

Built distribution (wheel)

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

Total release size: 2.7 MB

Release files / tsarina-1.34.1.tar.gz

Download URL tsarina-1.34.1.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
5e6f024a568ddd8a40325f8f0b80f4dd6e944d73b60f686279024c2078813433
BLAKE2b-256 checksum
How to use checksums
314c435dcfd590e42d5e0db82a66698828b5072aec7f5f1507a9fde9cc1d7dfc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.6

Release files / tsarina-1.34.1-py3-none-any.whl

Download URL tsarina-1.34.1-py3-none-any.whl
Size 652.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
773f790811c095b1a612177656e8c073584552dfd580535492fe43b239055ce0
BLAKE2b-256 checksum
How to use checksums
27167bd9ea1da2e6829d0187453c1fa28922791458b05554f9c86efc5ed85e59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.6

Release history Release notifications | RSS feed

This release

1.34.1 This release

2 release files

1.32.1

2 release files

1.32.0

2 release files

1.31.7

2 release files

1.31.6

2 release files

1.31.5

2 release files

1.31.4

2 release files

1.31.3

2 release files

1.31.2

2 release files

1.31.1

2 release files

1.31.0

2 release files

1.30.1

2 release files

1.30.0

2 release files

1.29.0

2 release files

1.28.0

2 release files

1.27.2

2 release files

1.27.1

2 release files

1.27.0

2 release files

1.26.0

2 release files

1.25.5

2 release files

1.25.4

2 release files

1.24.1

2 release files

1.24.0

2 release files

1.23.1

2 release files

1.23.0

2 release files

1.22.1

2 release files

1.22.0

2 release files

1.21.0

2 release files

1.20.1

2 release files

1.20.0

2 release files

1.19.0

2 release files

1.18.2

2 release files

1.18.1

2 release files

1.17.1

2 release files

1.17.0

2 release files

1.16.0

2 release files

1.15.2

2 release files

1.15.0

2 release files

1.14.1

2 release files

1.14.0

2 release files

1.13.0

2 release files

1.12.1

2 release files

1.12.0

2 release files

1.11.0

2 release files

1.9.2

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.6

2 release files

1.5.5

2 release files

1.5.4

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.9

2 release files

1.4.8

2 release files

1.4.7

2 release files

1.4.6

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.2.9

2 release files

1.2.8

2 release files

1.2.7

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

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