Estimating the Causal Effects of T Cell Receptors
A central question in human immunology is how a patient's T cell receptors impacts disease. Here, we introduce a method to infer the causal effects of T cell receptor (TCR) sequences on patient outcomes using observational TCR sequencing data and clinical outcomes data. Our approach corrects for unobserved confounders, such as a patient's environment and life history, using the patient's pre-selection TCR repertoire. This pre-selection repertoire is generated by a programmed stochastic recombination process, V(D)J recombination, which provides a natural experiment. We first derive a causal identification result that leverages biological theory to semiparametrically constrain a hierarchical causal model, enabling causal inference. We then develop a causal estimation strategy that uses permutation invariant neural networks and representation learning to scale to millions of sequences from hundreds of patients. Given sequence data, our method produces an estimate of the effect of interventions that add a specific TCR sequence to patient repertoires. On semisynthetic data, we demonstrate that our method can correct for unobserved confounding. We use it to analyze the effects of TCRs on COVID-19 severity, uncovering potentially therapeutic TCRs that are (1) observed in patients, (2) bind SARS-CoV-2 antigens in vitro and (3) have strong positive effects on clinical outcomes.