TCRsift
Prioritize T-cell receptor clonotypes from paired 10x Genomics single-cell VDJ
and gene-expression data for human (Homo sapiens) and mouse (Mus
musculus) studies. Standard Cell Ranger directories serve as input:
cellranger vdj supplies TCR contigs and clonotypes, and cellranger count
supplies gene expression for CD4/CD8 phenotyping, signature scoring, and
cell-type annotation (VDJ-only workflows are also supported).
TCRsift combines clonal abundance, T-cell lineage, gene-expression state
signatures, public TCR database matches (VDJdb, IEDB, CEDAR), sequence
generation probability (Pgen/Ppost), and optional TIL overlap to produce
auditable shortlists and full-length receptor constructs. None of these
signals predicts epitope specificity on its own; functional testing is still
required.
Documentation & Benchmarks
- Documentation home: pirl.unc.edu/tcrsift
- Method overview: How TCRsift works · Methods section
- Guides: Installation · Quick Start · Sample Sheets · Culture Pipeline · Filtering · Clone Prioritization · Single-Cell Atlas
- Reference: CLI Reference · Python API · Release Notes
- Benchmarks: Overview & external comparisons (
Scanpy,stitchr,OLGA, multimer callers) · Solid-tumor CD8 TIL · Infectious disease & blood · Paired blood-tumor, post-ACT & CD4 TIL · Murine models (--species mouse)
Installation
pip install tcrsift
Optional extras (sequence assembly, Excel I/O, PDF reports, oncoref CTA
panels, and bundled NumPy k-mer Pgen/Ppost models are included in the base
install):
pip install "tcrsift[full]" # All optional extras below
pip install "tcrsift[tcrpeg]" # Deep autoregressive TCRpeg/PyTorch sequence probability
pip install "tcrsift[atlas]" # Harmony + Leiden clustering (`tcrsift cells embed`)
pip install "tcrsift[plots]" # UpSet and Venn set-overlap plots
See Installation for source installs and environment details.
Quick Start
Create samples.yaml pointing to your Cell Ranger output directories (YAML and
CSV formats are both supported; see
Sample Sheets):
samples:
- sample: "Patient1_Culture"
vdj_dir: "/data/patient1/vdj"
gex_dir: "/data/patient1/gex"
Run the antigen-stimulated culture pipeline (optionally fetch VDJdb/IEDB/CEDAR
and IMGT germlines once with tcrsift data download):
tcrsift data download
tcrsift run --sample-sheet samples.yaml --output-dir results/
Or rank clones by expression state in fresh TIL, blood, pleural effusion, or
marrow and assemble full-length β-T2A-α constructs in one command:
tcrsift prioritize til_samples.yaml -o candidates/ --context solid-tumor --assemble
Python API
import tcrsift
adata = tcrsift.load_samples("samples.yaml")
adata = tcrsift.phenotype_cells(adata)
clonotypes = tcrsift.aggregate_clonotypes(adata)
filtered = tcrsift.filter_clonotypes(clonotypes, method="threshold", tcell_type="cd8")
annotated = tcrsift.annotate_clonotypes(filtered, vdjdb_path="/path/to/vdjdb")
assembled = tcrsift.assemble_full_sequences(annotated, include_constant=True)
See Quick Start and the Python API reference for full examples.
Choose a Workflow
All workflows share loading, CD4/CD8 phenotyping, database annotation, and construct assembly; only clonotype scoring changes with experimental design:
| Study design | Command | Guide |
|---|---|---|
| Fresh TIL, blood, MPE, or marrow (paired VDJ + GEX, human or mouse) | tcrsift prioritize samples.yaml -o out/ --context solid-tumor [--assemble] |
Clone Prioritization |
| Antigen-stimulated culture or short restimulation (with optional matched TIL) | tcrsift run -s samples.yaml -o out/ [--method {threshold,logistic,stimulation}] |
Culture Pipeline |
| Standalone full-length TCR construct assembly from a clone CSV | tcrsift assemble -i clones.csv -o seqs.csv [--contigs-dir ...] |
CLI Reference |
| Single-cell GEX QC, Harmony/UMAP/Leiden embedding, and cell typing | tcrsift cells {qc,embed,annotate} |
Single-Cell Atlas |
| Reference database & IMGT germline cache management | tcrsift data {list,download,clear} |
CLI Reference |
Additional utilities (match-til, til-clonotype, til-select, load-sct,
annotate-gex, unify, mnemonic, report) are documented in the
CLI Reference.
Architecture
Cell Ranger VDJ + GEX
│
▼
1. Load & QC (tcrsift load) Paired α/β productive chains + GEX mito/UMI/CD3 QC
│
▼
2. Phenotype & Clone (phenotype/clonotype) CD4/CD8 lineage (FACS pre_sorted aware) + k-mer Pgen/Ppost
│
├──► Ex vivo tissue/blood (`tcrsift prioritize`):
│ 3. Per-stratum signature scoring + size-matched random-group & hypergeometric calibration
│ 4. Priority-tiered round-robin shortlist + strict_ab DB / FOXP3 Treg / multimer audit
│
└──► Stimulated culture (`tcrsift run`):
3. Expansion tiers (`threshold`/`logistic`) or paired control ΔAIM (`stimulation`) + TIL match
4. Per-donor / per-method shortlist + VDJdb/IEDB/CEDAR specificity annotation
│
▼
5. Construct Assembly (`--assemble` / `tcrsift assemble`)
Donor-contig V(D)J + native leaders + canonical human/mouse TRAC/TRBC1/2
(with optional `--germline-vdj-fallback` + J->C parity correction)
- Inputs: Cell Ranger VDJ (
filtered_contig_annotations.csv, optionalfiltered_contig.fasta/consensus_annotations.csv) and GEX (filtered_feature_bc_matrix/or.h5). Exact barcode matching with suffix-stripped fallback when needed. - Outputs: Per-cell
AnnData(loaded.h5ad,phenotyped.h5ad), clonotype tables (data/clonotypes.csv,filtered_tier*.csv, orcandidate_clones.csvfromprioritize), assembled sequences (data/full_sequences.csv, FASTA/PDF), summary plots, andprovenance.json.
See How TCRsift works and Filtering Strategies for algorithms, column schemas, and multi-donor/multi-method configuration.
Contributing and License
See CONTRIBUTING.md for development guidelines. Licensed under the Apache License 2.0 (LICENSE).
Citation
@software{tcrsift,
author = {Rubinsteyn, Alex},
title = {TCRsift: T-cell receptor clonotype prioritization from single-cell VDJ and gene-expression data},
url = {https://github.com/pirl-unc/tcrsift},
year = {2024}
}
Metadata
Release files for tcrsift 3.44.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tcrsift-3.44.2.tar.gz | 1.4 MB | Without provenance | Details for tcrsift-3.44.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tcrsift-3.44.2-py3-none-any.whl | Python 3 | none | any | Details for tcrsift-3.44.2-py3-none-any.whl |
Total release size: 2.4 MB
Release files / tcrsift-3.44.2.tar.gz
| Download URL | tcrsift-3.44.2.tar.gz |
|---|---|
| Size | 1.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7445798333b242dbbf808912445cba25afdd9e21d73609d13554d2de6ecbeda6
|
|
BLAKE2b-256 checksum How to use checksums |
dcef7b5e7d115fc4e9de7e97a856a829432ef84c4c374916c49a7b23d745d8ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.6
|
Release files / tcrsift-3.44.2-py3-none-any.whl
| Download URL | tcrsift-3.44.2-py3-none-any.whl |
|---|---|
| Size | 1.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
11f46554e95779158f207aad7de16f84dbde1037fb07d157a6ad1701d6830516
|
|
BLAKE2b-256 checksum How to use checksums |
f235ac57be66240165c6d80b9c4a78930975b81d487be75926dbf2a53391119e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.6
|
Security for tcrsift 3.44.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.