This study establishes a multidimensional quantitative evaluation framework to systematically deconstruct the methodological confounders inherent to temporal T cell receptor (TCR) repertoire analysis. We reveal that widely reported clonal turnover and dynamic abundance shifts observed in sequencing data are fundamentally technical artifacts driven by stochastic sampling of low-expansion clones, phenotypic biases, and localized intra-tumor spatial heterogeneity.
The code is organized by corresponding main figures in the manuscript. Each directory contains standalone scripts to reproduce the data processing and visualization steps.
Fig2/: Scripts for phenotypic clustering, compositional shifts of T cell subsets post-intervention, and temporal dynamics of TCR diversity and clonality.Fig3/: Pipelines comparing time-specific and time-across TCRs across untreated samples, multi-timepoint cohorts, and cross-platform (bulk vs. scTCR-seq) modalities.Fig4/: Code for evaluating sample-specific artifacts in biological replicates and validating mathematical distributions using in silico simulated repertoires.Fig5/: Benchmarking scripts for the six evaluated statistical models (NB, BB, P, NP, Binomial, Fisher) utilizing clinical single-cell datasets, PBMC, and tumor replicate cohorts.Fig6/: Scripts mapping dynamic TCR shifts to distinct T cell subsets to quantify phenotypic biases, and algorithms processing Slide-TCR data to evaluate localized intra-tumor spatial heterogeneity.
The analytical pipelines are implemented in both R and Python.
R Dependencies:
Seurat(Single-cell RNA/TCR integration and visualization)ggplot2(Data visualization)vagen(TCR diversity and Chao2 asymptotic estimation)GPTCelltype(Automated T cell subset annotation leveraging large language models)forestmodel(Forest plot visualization for statistical modeling results and differential comparisons)Other standard bioinformatics utilities.
Python Dependencies:
NoisET(NOIse sampling learning & Expansion detection of T-cell receptors using Bayesian inference.)