Prioritization release notes¶
Behavior changes in tcrsift prioritize and til-prioritize that can alter a
shortlist. Record the package version alongside every analysis; the
prioritization guide documents the current
release. Full release history is on
GitHub and
PyPI.
3.35.0¶
Whole-library bug-fix release addressing correctness, statistical edge cases, assembly QC, and I/O safety across all pipeline stages, plus a standalone manuscript Methods section (methods-section.md):
- Loading, QC, phenotyping, and clonotyping. Guarded mitochondrial QC
(
min_mito_pct/max_mito_pct) when no mitochondrial genes are present in the expression matrix; made marker extraction and GEX signature scoring safe under duplicatevar_namesand already-log-transformed matrices; fixedspecies="auto"gene-ID resolution; removed mouse V-genes (TRAV12-2,TRBV28) from the human-only species detector; enforced numericmin_cd3_readsinapply_cd3_gateand synthesizedCD3fromCD3D/CD3E/CD3G; added an expression-ratio guard (max_imbalance_ratio) tocd4_cd8_doublet_mask; fixed multi-sample contig ID collision tracking inqc_battery; and handled string booleans, missing chains, and per-donor method recovery cleanly. - Scoring, filtering, selection, TIL matching, and attribution. Replaced
grid-clamped logistic FDR thresholds with analytical thresholds
(
analytical_logistic_threshold) and non-misleading fallback tiers; fixedsubset_percentileto rank-hypergeom.logsfwithmethod="max"(avoiding float64 tail underflow and midpoint tie bias); tightenedRECEPTOR_GENE_REand added receptor-gene anti-leakage checks across signature scorers; fixedfdr_scope="auto"multi-donor cohort detection inrun_pipeline; movedconfig.selectionoutside the assembly guard so--no-assemblestill runs selection; propagatedpatient_idinload_til_samples; folded dual-alpha merge counts into attribution priors; and guarded constant score columns against passing 100% of clones ininsilico_filter. - Database annotation, probability models, and cache safety. Fixed IEDB /
CEDAR UniProt tumor-self classification (MART-1, HER2, PRAME, gp100, TRP-1,
Tyrosinase, NY-BR-1) and word-bounded influenza/bacterial matching so
Haemophilus influenzae is not misclassified as viral influenza; added Zip
Slip validation, thread-safe IPv4 fallback, and atomic
force=Truestaging indatacache; fixed log-space insertion probabilities andpd.NAhandling inpgen; settrain_modeldefault k-mer order to2matchingseqprob; and fixedunify(Likely_CD8symmetry, dotted condition names, tie handling) andcohortempty-beta overlap. - Construct assembly and reporting. Fixed premature-stop detection in
_nt_contig_in_frame_no_premature_stop, bare-mature 1-aa junction offset validation, and uppercase mouseTRAJdetection in_assemble_qc; addedNcoI/BsaI/BsmBIto forbidden synthesis motifs and guarded recoding against introducing restriction sites; skipped leader/constant assembly on missing chains of unpaired clones; fixedTRBC01/TRBC02allele parsing and humanTRBC2*01regeneration; madetcrsift.annotate_cellsandtcrsift.annotate_tcrscallable even after submodule import; supported CSV-round-tripped stringifiedsample_frequenciesin plotting; fixedpretty_sampleon non-marker hyphenated names (Patient1-TIL,MART-1); and preserved multi-condition provenance inbuild_selected_report.
3.34.1¶
Documentation cleanup across the overview, TIL, infectious disease, paired
blood-tumor/CD4, and murine benchmark pages: simplified prose and tables,
removed the FM1–FM8 scorecard layout from the overview page, and split
side-by-side two-panel benchmark plots into individual captioned figures. No
code, scoring, or selection changes.
3.34.0¶
Added tcrsift prioritize --assemble, tiered tcrsift --help output,
from_contig germline leader fallback on 5'-truncated contigs, and the
cross-cohort benchmark overview with external tool comparisons:
- Construct assembly in
prioritize/til-prioritize(--assemble) andfrom_contigleader fallback. Added--assemble,--germline-vdj-fallback, and--single-chain-linker(T2Adefault,P2A,E2A,F2A, ornone) totcrsift prioritize,tcrsift til-prioritize, andPrioritizeConfig. When--assembleis passed, shortlisted candidates are assembled into full-length α, β, and single-chain constructs (candidate_constructs.csvandcandidate_constructs.fasta, plusassemblyandcontig_verified_constructsmetrics inprioritization.json), automatically detecting sample*contig*.fasta(.gz)and*contig_annotations*.json(.gz)files. Also fixedapply_leader_policyand_resolve_named_leaderintcrsift/assemble.pysofrom_contigchains whose contigs are 5'-truncated or absent receive their V-gene'sM...germline (or species default) signal peptide underleader_fallbackrather than emitting leaderless chains. Shortlist selection logic and default cutoffs are unchanged. - Tiered
tcrsift --helpCLI organization. Grouped all 25 top-level subcommands into "Primary workflows" (prioritize,run,assemble,data), "Exploration & annotation" (cells,annotate,report), and "Modular pipeline steps & legacy commands" while keeping all existing subcommands and arguments unchanged. - Cross-cohort overview and head-to-head external benchmarks. Added
Benchmark overview and head-to-head comparisons
and
benchmarks/head_to_head/, comparingtcrsiftagainstscanpy.tl.score_genes(NeoTCR8,NeoTCR4,NeoTCR_PBL) and single-geneCXCL13across 5 human TIL and cancer-blood cohorts,stitchr/thimble1.3.1 across human Cell Ranger 6 donor contigs (9/46 = 19.6% donor V-framework variants preserved), 5'-truncated human deposits (160/160 = 100% completeM...constructs vs 135/160 = 84.4% institchr), and murine Cell Ranger shortlists (101/101 = 100% with 52Trbc1/Trbc2miscalls corrected vs 78/101 = 77.2% institchr),OLGA1.3.0 exact V(D)J dynamic programming ($r = 0.954$, 451x faster on human blood), and per-cell, CLRz >= 3, and bimodal GMM pMHC multimer callers (96.3% stickyKLGGALQAKfalse-positive reduction and 100.0% [109/109] cognate epitope precision on 10x-held-outstrict_abVDJdb).
3.33.0¶
Empirical validation and real-data fixes across human --context blood-tumor
(NeoTCR_PBL), longitudinal post-ACT (T30) TILs, human --tcell-type cd4
(NeoTCR4, pre_sorted, and --exclude-treg), and murine --species mouse
workflows:
- FACS
pre_sortedcoreceptor-dropout rescue (Sample.pre_sorted).load_samplenow propagatespre_sorted("CD4"or"CD8", case-insensitive) intoadata.obs["pre_sorted"], andphenotype_cellsassignsCD3-passing cells with zeroCD4and zeroCD8UMIs to"Likely CD4+"/"Likely CD8+"on FACS pre-sorted libraries while still rejecting cells expressing the opposite coreceptor (8.7xcell retention,708→6,144cells by rescuing88.5%CD4 mRNA dropout on human CD4+ 10x libraries in Oh et al. 2020;+26.2%cell retention,9,046→11,413cells on murineGP66:I-AbCD4+ sorts in Khatun et al. 2021). Unsorted samples are unchanged. FOXP3+regulatory T-cell auditing and--exclude-treg.prioritizeandtil-prioritizenow compute per-clone raw-countfoxp3_pos_fractionandis_treg_like(humanFOXP3/ mouseFoxp3, default threshold--treg-foxp3-fraction 0.5), appendtreg_FOXP3torisk_flags, and excludeis_treg_likeclones from candidate selection when--exclude-tregis passed (removing61/61FOXP3+Treg picks on Veatch et al. 2022 melanoma CD4+ TILs while retaining100%of shortlisted neoantigen/self-antigen CD4+ clones).- Cell Ranger
hg19(GENCODE v19) ↔ GRCh38 gene symbol synonyms. ExtendedGENE_SYNONYMSintcrsift/genes.pywith 18 official HGNC/GENCODE symbol aliases (ADGRG1/GPR56,LINC01943/RP11-291B21.2,PLPP1/PPAP2A,SLF1/ANKRD32,JAML/AMICA1,FAAP20/C1ORF86,FYB1/FYB,BEX3/NGFRAP1,CYTOR/LINC00152,ATP5PD/ATP5H,VSIR/C10ORF54,MCUB/CCDC109B,MTERF4/MTERFD2,SARAF/TMEM66,MIR4435-2HG/MIR4435-1HG,LINC01480/AP001055.6,RP11-47I22.3, andCTB-61M7.2), resolving40/40(100%)NeoTCR4genes on legacyhg19matrices instead of failing strict gene resolution. - Murine Ensembl
-dvV-gene normalization and static IMGT V-QUEST germline downloads. Normalized Cell Ranger mouse Ensembl shared α/δ V-gene names (TRAV13-4-dv7→TRAV13-4/DV7,TRAV16d-dv11→TRAV16D/DV11) innormalize_vgeneandcanonicalize_gene(raising murine germline V+J construct assembly to101/101=100%), switched all eight human and mouse IMGTV-REGIONandJ-REGIONdownload specs indatacache.pyfrom IMGT'sGENElectCGI to static IMGT V-QUEST reference FASTAs while adding session cookie + automatic IPv4 fallback to_default_urlopen(fixingimgt_trav_leader_mouse/imgt_trbv_leader_mouseredirects as well), and pre-filteredhost_speciesinmatch_clonotypesbefore full-table species canonicalization. - New public benchmark suites. Added reproducible evaluations and
provenance documentation for
paired blood-tumor, post-ACT, and CD4+ TILs
(
benchmarks/public_blood_cd4/) and murine--species mousemodels (benchmarks/public_mouse/).
3.32.0¶
Priority-tiered round-robin scheduling, single-pass strict_ab database matching
in prioritize, IMGT V-REGION + J-REGION germline fallback for 5'-truncated
contigs, first-class --method stimulation and --call-multimers workflows,
lightweight default installation (tcrsift[tcrpeg]), and regenerated 3.32.0
benchmarks:
- Priority-tiered round-robin scheduling (
--round-robin-mode tiered, default). Context presets (solid-tumor,mpe,blood-tumor) now place dedicated disease-reactivity signatures (TumorReactive,MANAscore,NeoTCR8,NeoTCR4,NeoTCR_PBL) first inCONTEXT_SIGNATURESand schedule all qualifying clones from those Tier-1 lists before backfilling any remaining--max-clonesbudget from general effector, activation, or proliferation panels (Tier 2). Pass--round-robin-mode flatto rotate all preset signatures with equal weight from round 1. --database-matchdefaults tostrict_abinprioritize/til-prioritize. Because every clone scored byprioritizecarries paired α/β chains, database annotations and viral/MART-1 exclusions now default to exact paired α+β matching (strict_ab) in a single pass rather thanab_with_partial, avoiding false-positive β-only collisions with public viral entries on private repertoires. Pass--database-match ab_with_partialorb_onlyto opt into β-only database matching.- IMGT
V-REGION+J-REGIONgermline fallback (--germline-vdj-fallback). Added cached human and mouse IMGTTRAJ/TRBJJ-REGIONreferences (tcrsift data download --group germline/--group germline_mouse) andreconstruct_germline_vdjfor 5'-truncated contigs (partial_VDJ_*) and bare(v_gene, CDR3, j_gene)tables (construct_contig_verified = False, stamped in{chain}_vdj_source,{chain}_vdj_germline_allele, andqc_warnings). Also fixed_build_full_sequencesso chains missing VDJ sequences never emitleader + constantchimeras. - First-class
--method stimulationand--call-multimers. Addedfilter_clonotypes_stimulation(tcrsift filter --method stimulationandtcrsift run --method stimulation, combining per-donor expansionFDR/log2FCwith paired within-clonedelta_signature_AIM/delta_signature_AcuteActivationshifts oversource: control) andcall_multimers_for_adata(--call-multimersinprioritizeandrun). - Lightweight core install (
tcrsift[tcrpeg]) and modularized internals. Movedtorchandtcrpegtopip install "tcrsift[tcrpeg]"while keeping bundled NumPy k-merPgen/Ppostmodels in core, adopted PEP 639 SPDX licensing (setuptools>=77), and splitassemble.py,plots.py, andcli.pyinto focused internal submodules with full backwards-compatible re-exports.
3.31.0¶
VDJdb 2026+ relational-archive compatibility, programmatic pipeline/prioritization APIs, and regenerated benchmark evaluations with explicit ground-truth provenance:
- VDJdb 2026-11+ relational release (
chains.tsv.gz+records.tsv.gzandvdjdb.parquet) support. Starting with the2026-11-06GitHub release,antigenomics/vdjdb-dbships normalizedchains.tsv.gz,records.tsv.gz, andvdjdb.parquetinside a versionedvdjdb-YYYY-MM-DD/subdirectory rather than root-levelvdjdb_full.txt/vdjdb.txtfiles. Bothtcrsift data download --db vdjdb(cached_path) andload_vdjdbnow resolve relational TSV/gzip bundles,.parquettables, and versioned release subdirectories alongside legacy flat TSV files, reconstructing paired α/β receptors (200,180paired out of280,894TRBentries invdjdb-2026-11-06) viarecord_id. - Programmatic
run_pipelineandPrioritizeConfigAPIs. Extracted the end-to-endtcrsift runworkflow intotcrsift.pipeline.run_pipeline(returningPipelineResult), added the typedPrioritizeConfigdataclass forrun_til_prioritize, unified CDR3/clone-key/boolean schema normalization intcrsift._schema(fixing single-chain_beta/alpha_key leakage inread_donor_clones), and auto-derivedTCRsiftConfigflat-key mappings from dataclass definitions. - Regenerated TIL and infectious-disease benchmarks on 3.31.0. Re-ran both
benchmarks/public_til/andbenchmarks/public_infectious/end-to-end with machine-readableground_truth_provenancemetadata and default--context bloodshortlist/cutoff evaluations.
3.30.0¶
Database-cache, VDJ-loading, and public-deposit compatibility fixes uncovered by the infectious-disease and blood benchmark:
- Cached VDJdb resolves paired α/β entries (
vdjdb_full.txt). The VDJdb release archive contains bothvdjdb_full.txt(paired α/β rows) andvdjdb.txt(one chain per row).cached_path("vdjdb")previously returnedvdjdb.txtdirectly, losing α-chain pairing underprioritize's default--database-match ab_with_partial(degrading paired VDJdb entries into β-only matches during default MART-1 exclusion and--exclude-known-viral) and giving zero matches under--database-match strict_abwhen VDJdb was read from thetcrsift datacache.cached_path("vdjdb")now returns the cache directory sovdjdb_full.txtis preferred, and standalonevdjdb.txt/vdjdb.slim.txtfiles reconstruct paired α/β entries fromcomplex.id > 0rows. - 5'-partial Cell Ranger contigs (
productive == "None") with complete V/J genes and in-frame CDR3 are retained. In 5'-truncated VDJ libraries where reads start downstream of the V-leaderATG(full_length == False), Cell Ranger marksproductiveas"None"rather than"True", while true frameshift or stop-codon contigs are marked"False". Retainingis_cell,high_confidencecontigs withproductive == "None", valid V and J gene calls, and a stop-free canonicalC...[FW]CDR3 recovers 5'-partial cohorts (such as GSE171037) while changing ≤0.01% of contigs in standard full-length libraries. - Compressed, sample-prefixed, and pre-Cell Ranger 6 inputs. VDJ and GEX
loaders accept
.csv.gzcontig tables, unambiguous sample-prefixed GEO/10x contig and.h5filenames,Sample.gex_path, and sibling*contig_annotations*.json(.gz)files to populate full-lengthVDJ_aaandVDJ_ntwhenfwr1..fwr4CSV columns are absent.
3.28.0¶
Bug fixes affecting receptor assignment and shortlist selection. Re-run analyses generated with earlier versions.
- Non-productive contigs are dropped on load. Cell Ranger's filtered contig
table retains non-productive contigs, and the loader previously ranked a
cell's contigs by UMI count alone. A high-UMI non-productive contig could
therefore displace a cell's productive alpha or beta chain or leave the cell
without a CDR3 (7% of primary chains in the public lung dataset were
non-productive). Applies to every command that loads Cell Ranger VDJ output,
including
run. - Barcodes are matched exactly unless no exact matches exist. Stripping
-1/-2suffixes per barcode could previously pair GEX cellX-2with the TCR of an unrelated VDJ cellX-1. Core-barcode fallback now runs only when a sample has zero exact barcode matches, skips ambiguous core barcodes, and warns when nothing matches. .h5expression matrices are indexed by Ensembl ID, matching matrix directories. Duplicate gene symbols previously caused.h5-only samples to fail on load, and mixing.h5and matrix-directory samples duplicated the gene axis.- Mid-round budget sharing and
--max-clones 0fixes. A list whose sole remaining clone had already been selected by another list could still consume a turn, violating prefix consistency across--max-clonesbudgets. In addition,--max-clones 0was treated as a cap equal to the eligible clone count, alteringselection_rankandselected_signaturerelative to a non-binding cap. - V and J gene filters with repeated barcodes across samples. When a
clone's highest-UMI cell shared its barcode string with another cell in a
different sample, representative gene lookup returned multiple rows and
caused
--exclude-trav12-2,--exclude-v-gene, and--include-v-geneto misclassify the clone. - Sample-sheet parsing. Blank
sourcecells fall back to the default instead of raising an error, numeric YAML sample names are coerced to strings, and duplicate sample names are rejected on load.
3.27.0¶
Two shortlist-changing updates motivated by the public TIL benchmark:
- Default
--min-cd3lowered from 10 to 3, matchingrunandphenotype. Across public TIL datasets, a floor of 10 discarded 65% to 92% of CD8 cells without improving ranking among surviving clones. Because more cells and clones enter scoring, signature percentiles, background floors, and shortlists change. Pass--min-cd3 10to reproduce earlier filtering. - Fair mid-round budget allocation. When
--max-clonesexpires partway through a round, remaining turns are assigned to the signature (and within it, the sample) with the fewest picks so far in that round. Previously, partial rounds were truncated in preset order, which could starve signatures listed near the end of a preset when qualifying lists outnumbered the budget. Full rounds retain the existing order.
3.26.0¶
Loader and scoring fixes uncovered while benchmarking on public datasets (benchmarks). Existing runs that completed without error produce unchanged scores and shortlists.
- Multi-sample runs reading
filtered_feature_bc_matrix/directories preserve the gene symbols supplied with the matrices instead of failing with missing signature genes under--context solid-tumor. - Signature lookup resolves common HGNC symbol renames via a built-in alias
table (such as
PLA2G16/PLAAT3andCARS/CARS1), allowingNeoTCR8,NeoTCR4, andNeoTCR_PBLto score across older and newer Cell Ranger references. Genuinely absent genes still raise an error. - When only
all_contig_annotations.csvis present, the VDJ loader filters to called cells and high-confidence contigs with valid chain calls. prioritizelogs a warning whenever any single non-lineage cell filter removes more than half of the remaining cells.
3.25.0¶
Background cutoff mode defaults to --signature-evidence either, allowing
clones to qualify via elevated mean expression or hypergeometric enrichment of
high-scoring cells, each contributing its own ranked list within the shared
200-clone budget. Output tables add high-cell counts, fractions, exact tail
probabilities, and selected_evidence. Pass --signature-evidence mean for
3.24.0 behavior; legacy cutoff mode continues to use mean scores only.
3.24.0¶
Replaced the fixed score > 0 floor with a size-matched empirical resampling
floor (--signature-cutoff background), keeping the top-decile rank gate and
200-clone cap. Pass --signature-cutoff legacy for the previous rule. NeoTCR
module scoring now always reads normalized .X even when .raw is present,
and bare-DataFrame fallback scoring applies log1p by default (pass
log1p=False if inputs are already log-transformed).
3.23.1¶
Changed --max-clones from 100 per patient to 200 across the entire run
with global selection_rank. Required percentile ≥ 0.90 and score > 0,
skipping numerically flat lists and yielding turns from exhausted lists without
padding below cutoffs.
3.23.0 (changes from 3.22)¶
Unified prioritize and til-prioritize around context presets, CD8 selection
by default, MART-1 exclusion on, viral exclusion off, no minimum mitochondrial
floor, and single-sample support.