A bead-based method for high-throughput mapping of the sequence- and force-dependence of T cell activation

Adaptive immunity relies on T lymphocytes that use αβ T cell receptors (TCRs) to discriminate among peptides presented by major histocompatibility complex molecules (pMHCs). Identifying pMHCs capable of inducing robust T cell responses will not only enable a deeper understanding of the mechanisms governing immune responses but could also have broad applications in diagnosis and treatment. T cell recognition of sparse antigenic pMHCs in vivo relies on biomechanical forces. However, in vitro screening methods test potential pMHCs without force and often at high (nonphysiological) pMHC densities and thus fail to predict potent agonists in vivo. Here, we present a technology termed BATTLES (biomechanically assisted T cell triggering for large-scale exogenous-pMHC screening) that uses biomechanical force to initiate T cell triggering for peptides and cells in parallel. BATTLES displays candidate pMHCs on spectrally encoded beads composed of a thermo-responsive polymer capable of applying shear loads to T cells, facilitating exploration of the force- and sequence-dependent landscape of T cell responses. BATTLES can be used to explore basic T cell mechanobiology and T cell-based immunotherapies. BATTLES enables high-throughput analysis of TCR–pMHC interactions in a physiological force-dependent manner.

T he adaptive immune response relies on the ability of T cells to sensitively discriminate nonself from self, allowing mammals to detect pathogen infection or malignant transformations. At a molecular level, this process is mediated by αβ T cell receptors (TCRs) that recognize rare foreign peptides presented by major histocompatibility complex molecules (pMHCs) among the ubiquitous self-pMHCs expressed on an antigen presenting cell (APC). TCR recognition of an antigenic pMHC molecule triggers downstream signaling events (for example, Ca 2+ flux) that ultimately regulate T cell activation, with the activation threshold regulated by antigenic pMHC densities on the APC 1 . It remains challenging to predict which peptide sequences will engage and activate a particular TCR. Therefore, efficient pipelines capable of identifying high potency agonists are essential for understanding molecular mechanisms driving governing immune responses and ultimately improving immune and infectious disease diagnosis and treatment.
In vivo, T cell detection of antigenic peptides is sensitive, capable of identifying fewer than ten copies of nonself/altered peptides 2,3 on infected or transformed cells 4 , including sequences that differ only by a single amino acid 5 . By contrast, in vitro measured binding affinities (quantified by equilibrium dissociation constants, or K d ) for known stimulatory peptides are weak (K d of roughly μM) and do not differ substantially from nonstimulatory peptides (K d,nonself < 10 K d,self ) 6 . Moreover, these in vitro measured affinities often do not accurately correlate with T cell activity 6-8 : many high-affinity interactions do not stimulate a T cell response 9 , while many known potent agonists bind with only weak or moderate affinities 10,11 . Together, these paradoxical results establish that equilibrium binding affinities are not sufficient to explain T cell recognition in vivo.
Recent evidence suggests that the pN (piconewton) to nN (nanonewton) biomechanical forces generated at TCR-pMHC interfaces during T cell immunosurveillance and synapse formation may be critical for sensitive and specific recognition 12 . Under optimal forces, T cells can be robustly activated by as few as two stimulatory pMHCs per T cell while nonstimulatory pMHCs induce no response 9,[13][14][15] . Distinguishing agonist versus nonagonist peptides therefore requires an in vitro assay capable of quantifying downstream activation in the presence of applied loads.
Unfortunately, current mechanobiology techniques capable of applying force while monitoring activation are extremely labor-intensive and low throughput, creating a validation bottleneck. Traction force microscopy [16][17][18][19][20] , optical trapping 13,21 , atomic force microscopy 22 , biomembrane force probes 14,23,24 and optomechanical actuator nanoparticles 25 exert external well-calibrated shear loads on T cells interacting with specific pMHCs displayed at low densities and can drive robust activation at densities as low as two pMHCs per T cell. However, these techniques require extensive costly equipment and probe only a single peptide sequence and a maximum of 100 s of cells per day.
Here, we present a technology, BATTLES (biomechanically assisted T cell triggering for large-scale exogenous-pMHC screening) that profiles T cell signaling responses for thousands of cells interacting with different pMHCs at low densities and in the presence of shear loads. To test and validate BATTLES, we profiled responses of T cell lines (TCR589 and TCR55) previously shown to bind an HIV-pol-derived peptide (IPLTEEAEL, HIV-pol) with divergent signaling responses. Measurements for >11,000 TCR589 and TCR55 cells interacting with 21 peptides 9 correctly recapitulated known responses for TCR589 and identified an alternative synthetic peptide sequence (VPLTEDALL) capable of stimulating TCR55 cells with as few as three TCR-pMHC interactions at the interface. By applying BATTLES to systematically vary the rate of change of applied force and density of presented peptides, we further established that TCR55 cells interacting with this alternative synthetic peptide exhibit the strongest Ca 2+ response at 20-30 pN s −1 loads and that specificities decrease with increasing pMHC densities. Finally, we applied BATTLES to profile responses of a third clinically tested TCR (DMF5) 26 . These model systems establish BATTLES as a new technology suitable for obtaining deeper insight into the structure-activity relationships of TCR triggering and validating new pMHC antigens under conditions of physiological force.

results
To apply shear forces to cells, BATTLES deposits T cells onto the surface of pMHC-bearing hydrogel beads composed of a thermo-responsive polymer such that they swell upon small changes in temperature (Fig. 1a). To monitor downstream signaling responses via high-throughput single-cell microscopy, T cells and beads are coloaded into microwell arrays with a Ca 2+ -sensitive dye (Fig. 1b). By linking pMHCs to spectrally encoded beads with a 1:1 relationship between the presented peptide sequence and embedded spectral code, each BATTLES experiment can profile responses of roughly 1,000-3,000 cells interacting with >20 peptide sequences in <5 hours.

Thermo-responsive hydrogel beads apply shear loads to cells.
Stimulus-responsive polymers have been used to probe mechanobiology within bulk tissues and for single cells 27,28 , including T cells 25 . Hydrogel beads that shrink and swell can apply homogeneous expansion forces 29,30 to pMHC-TCR complexes at the bead-cell interface (Fig. 1c), with the load applied to individual pMHC-TCR complexes depending on the number of complexes formed and their location relative to the center of the cell. For example, a cell  Fig. 1 | overview of BATTLes assay and thermo-responsive beads. a, BAttLES applies shear forces to pMHC-tCr interactions at cell surfaces via thermally responsive beads that are spectrally encoded (with a 1:1 linkage between embedded spectral code and presented pMHC sequence, presented pMHC density or the magnitude of the applied load). b, By loading t cells onto the surfaces of beads loaded into microwell arrays, BAttLES allows for high-throughput single-cell measurement of t cell responses (cellular Ca 2+ flux) via microscopy after the application of force. c, Schematic and formula detailing the maximum possible thermal bead expansion force that can be applied to pMHC-tCr interactions at the cell surface (assuming two pMHC-tCr interactions each at the cell periphery); R cell is the t cell radius (roughly 4 μm), κ is the modulus of rigidity of the bead, R bead is the radius of the bead before heating and ∆R bead is the change in bead radius on cooling from 37 to 34 °C. Force ramps are calculated assuming beads swell over 60 s after cooling. d, Cartoon schematic of polymeric thermo-responsive bead matrix. e, representative bright-field images showing the change in radius for a bead on heating (25 to 37 °C) and cooling (37 to 34 °C). Scale bar, 25 μm. f,g, Measured bead radii (f) and changes in radii (g) over time for 12 beads on heating and cooling. h, Calculated expansion forces for 12 beads. tethered to a bead by a single interaction will be translated in space on swelling without any shear load applied; conversely, attachment via multiple interactions will attenuate the shear force experienced by any individual pMHC-TCR interaction. The maximum shear load is applied for cells tethered by two well-isolated pMHC-TCR complexes positioned near the cell periphery; for cases in which the T cell is notably more rigid than the bead, this load can be approximated via continuum mechanics using equation (1): where R cell is the T cell radius (roughly 4 μm), κ is the modulus of rigidity, R bead is the starting bead radius and ∆R bead is the radius change of the bead (see Supplementary Discussion for formula derivation). Given the stochasticity of pMHC-TCR complex formation and the fact that the number of interactions likely changes over time, the precise load applied to any given pMHC-TCR complex cannot be determined. Nevertheless, by carefully tuning the density of pMHC-TCR interactions at cell surfaces and averaging temperature-induced activation behaviors for many cells with heterogeneous attachments, we can resolve statistically significant differences in activation behavior upon the application of shear forces. Temperature-responsive polymers such as poly(Nisopropy lacrylamide) (PNIPAm) change size at a critical temperature ( Fig. 1d) that can be tuned to a physiological range (for example, 34-35 °C) by adding hydrophilic comonomers (for example, acrylic acid (AAc) or sodium acrylate (SAc)) 31 . Here, we used a microfluidic droplet generator 32 to produce monodisperse NIPAm droplets containing 55 mM SAc (radius of 16.10 ± 0.4 µm, mean ± s.d.) (Extended Data Fig. 1a,b and Supplementary Video 1) and then polymerized these droplets into solid beads via batch UV exposure, yielding roughly 23.75 µm radius beads (coefficient of variation = 6.5%) at room temperature (Extended Data Fig. 1c). To quantify changes in radii on cooling, we then loaded 12 beads onto an indium tin oxide (ITO) glass slide and imaged while raising the temperature to 37 °C for 60 s and then allowing the temperature to cool to 34 °C over 120 s ( Fig. 1e and Supplementary Video 2). Bead radii shrank by 1.49 ± 0.16 µm after heating and then expanded by 0.81 ± 0.06 μm after cooling (Fig. 1f,g); after 60 s, the thermo-response reached equilibrium and the bead radius remained constant. While a 37 to 34 °C temperature can change the timing of Ca 2+ signaling, the total accumulated signal remains unchanged 33 , suggesting that the integrated Ca 2+ signal should reflect the response to force alone.
Next, we compared the relative deformability of T cells and the thermo-responsive beads to ensure that continuum mechanics can accurately describe this system. The T cell surface elastic modulus is heterogeneous and soft in isolation (roughly 5 kPa, ref. 34 ); however, interactions with a pMHC drive the formation of rigid lamellipodia (roughly 150-300 kPa, ref. 35 ). To ensure that temperature-induced expansion applied forces to pMHC-TCR complexes formed at these rigid lamellipodia, we incubated T cells with pMHC-bearing beads for 1 hour before measurement to facilitate formation of these structures. To estimate the bead elastic modulus, we measured the modulus of rigidity (κ) for a hydrogel slab composed of identical concentrations of NIPAm monomer and SAc (Extended Data Fig. 2a). The measured modulus was around 3 kPa (Extended Data Fig. 2b), roughly threefold below the modulus of stiff gels previously shown to induce T cell activation 36 and similar to rigidities for epithelial cells that support T cell crawling (4.6 ± 2.2 kPa) 37 and lymph nodes (roughly 4 kPa) 38 . Combining measured radii, changes in radii, moduli and the time required for PNIPAm beads to shrink yields maximum estimated ramping forces of 20 ± 2 pN s −1 (Fig. 1h), only slightly larger than estimates of force ramping velocity applied by T cells (roughly 2-3 pN s −1 , ref. 18 ). Together, these results indicate that thermo-responsive hydrogel beads can be used to apply pN-range forces to TCR-pMHC interactions at bead-cell interfaces.

Spectrally encoded beads can test many peptides in parallel.
Understanding how peptide sequence dictates T cell signaling requires the ability to systematically vary presented sequences while assessing downstream responses. Spectrally encoded beads allow application of force to multiple TCR-pMHC interactions in a single experiment, and we previously produced poly(ethylene glycol) diacrylate (PEG-DA) hydrogel beads containing >1,000 different spectral barcodes (MRBLEs, for microspheres with ratiometric barcode lanthanide encoding) 32,39,40 (Fig. 2a). To test whether PNIPAm is compatible with spectral encoding, we generated carboxylated PNIPAm beads containing a constant amount of Europium (Eu) and 21 combinations of Dysprosium (Dy) and Samarium (Sm) ( Fig. 2b and Supplementary Table 1). Images of pooled beads analyzed with custom software 41 revealed 21 distinct clusters of per-bead Sm/Eu and Dy/Eu ratios that were consistent with expected target ratios (Fig. 2c). Cluster variances were similar to those for PEG-DA beads 39 (Extended Data Fig. 3a), suggesting a coding capacity of 48, 80 or 143 codes for clusters separated by five, four or three standard deviations, respectively (Extended Data Fig. 3b,c).

Encoded beads can display peptides at physiologic low density.
Next, we coupled to these beads a library of HLA-B35 loaded peptides containing systematic mutations within an HIV-pol-derived peptide (Pol448-456, IPLTEEAEL). These pMHCs have previously been shown to bind two TCRs (TCR55 and TCR589) in a yeast display screen and drive activation with half-maximum effective concentration (EC 50 ) values from 1.2 to >100 μM (ref. 9 ) (Fig. 2d,e and Supplementary Table 2). To display peptides, we covalently coupled streptavidin to carboxyl groups on the hydrogel beads, loaded peptides of interest in the B35 MHC groove of biotinylated pMHC complexes via ultraviolet (UV)-facilitated exchange 42 and then incubated biotinylated pMHC complexes with streptavidin-coated beads (Fig. 2f). All UV exchanges and coupling reactions took place in separate volumes to uniquely link peptide sequences with embedded spectral codes. Codes remained easily distinguishable from one another after streptavidin coupling ( Supplementary Fig. 1a); incubation of streptavidin-coated and uncoated beads with ATTO-647-labeled biotin established that streptavidin coupling was uniform and specific (Supplementary Fig. 1b-d).
Ensuring that shear forces applied to individual pMHC-TCR complexes are not dramatically attenuated by the presence of many attachment points requires that pMHC complexes be conjugated to beads at low densities. To quantify interfacial pMHC density, we incubated beads with fluorescently labeled anti-β2 monoclonal antibodies and imaged bead surfaces at the bead-glass interface via total internal reflection fluorescence microscopy (Fig. 2g). Compliant hydrogel beads settled on coverslip surfaces to yield an observable spot roughly 50 µm in diameter (Fig. 2h), with individual antibody-labeled interfacial pMHCs appearing as scattered fluorescent punctae. Over ten beads, we observed 29 ± 9 pMHCs per roughly 840 µm 2 bead surface, corresponding to 3-4 pMHCs per 100 µm 2 of T cell surface (assuming a 4 µm T cell radius 43 ) (Extended Data Fig. 4a); negative control beads displayed only 4.4 ± 1.8 pMHCs per bead surface (Extended Data Fig. 4b). Interfacial densities were uniformly low across codes (roughly 0.03 to 0.045 molecules per µm 2 , corresponding to 3-4.5 molecules per T cell) (Fig. 2i); this low density was previously shown to stimulate only rare triggering and relatively weak Ca 2+ signals 44 .
Pairing cells and beads probes force-and sequence-dependent activation. Early T cell activation is associated with elevations in intracellular free calcium 45 , allowing visualization of T cell responses using a calcium-sensitive dye 13,14,20,[22][23][24][25]44,46,47 . To allow high-throughput imaging of individual T cells upon application of shear force to pMHC-TCR interactions, we fabricated a device containing 1,440 microwells (each approximately 50 µm in diameter and 56 µm in depth) that allowed sequential loading of a single bead within each well followed by one or several T cells on top (Fig. 3a,b and Supplementary Video 3). After an initial 1 hour of incubation to allow cells to interact with and attach to bead-bound pMHCs in the absence of flow, we gently washed out unattached cells and then increased the device temperature to 37 °C for 1 min followed by cooling to 34 °C for 2 min; subsequent imaging of Ca 2+ flux via Cal-520 fluorescence for bead-associated cells over 10 min    9 ; blue and orange residues denote tCr and MHC anchor contacts, respectively. e, Sequences of HIV-pol-derived peptides coupled to beads containing particular spectral codes. f, Schematics detailing UV-exchange method to generate biotinylated pMHCs bearing desired peptides (left) and coupling of biotinylated pMHCs to beads bearing streptavidin crosslinked to carboxyl groups via EDC chemistry (right). g, Schematics detailing the quantification of interfacial pMHCs via smtIrF microscopy using fluorescently labeled antibodies to detect peptide-loaded MHCs. h, smtIrF images of the bead-glass interface for an example pMHC-coated bead (code 8, +pMHC) and an example negative control bead (−pMHC). White dashed circles denote the bead circumference settled on the slide (diameter of roughly 50 µm); yellow circles denote the size of an average t cell; numbers indicate identified pMHCs within yellow circles. Imaging was repeated ten times per bead. Scale bar, 5 µm. i, Estimated surface density (left) and number of pMHCs per cell (right) from surface density measurements across all bead codes; markers denote means and error bars denote standard deviation. n = 10 beads for each code and 5 beads for negative control. the dashed line represents the estimated physiological number of pMHCs per cell 53 .
(4 s intervals) allowed direct monitoring of single T cell signaling by summing the fluorescence intensities for pixels associated with each cell over time. After each experiment, we imaged beads across lanthanide channels to identify the embedded spectral code and thus the displayed peptide sequence ( Supplementary Fig. 6).

BATTLES can identify known stimulatory agonists.
To demonstrate BATTLES, we profiled two TCRs (TCR589 and TCR55) previously shown to bind HIV-pol pMHCs at µM affinities (K D = 4 and 17 µM) with divergent downstream responses 9 . While TCR589 T cells bound HIV-pol tetramers and secreted IL-2 in a dose-dependent manner, TCR55-transduced cells failed to secrete detectable IL-2 despite only around four times weaker HIV-pol binding. If BATTLES can reliably identify stimulatory peptides, we expect to see HIV-pol-induced Ca 2+ flux for TCR589.
To test this, we quantified Ca 2+ flux for 961 TCR589-transduced T cells interacting with all 21 bead-bound pMHCs ( Fig. 2c and Supplementary Table 2). Bright-field images demonstrate loading of beads within all microwells (Fig. 3b); videos acquired during device heating and cooling establish that cooling increased bead radii as expected and that T cells remained in contact with bead surfaces throughout ( Fig. 3b and Supplementary Video 4). After cooling, fluorescence images of force-induced Ca 2+ flux across all peptides (66 ± 18 beads and 46 ± 15 cells per peptide, Supplementary Fig. 7) revealed a variety of behaviors ( Fig. 3c-e). While some T cells exhibited substantial and rapid increases in intracellular calcium (typical of a type-α calcium response indicating successful triggering) (Fig. 3d, top), most cells showed decreasing fluorescence intensities over time, reflecting an absence of triggering (type-β calcium response) combined with photobleaching (Fig. 3d, bottom and Extended Data Fig. 5a). This is consistent with previous literature suggesting that only a fraction of cells are activated at low pMHC densities, even under optimal force 44 . To probe for sequence-dependent differences in type-α calcium responses, we integrated per-cell fluorescence over time and then analyzed only 'positive' cells that increased in fluorescence (equation (2)): For TCR589 cells, the HIV-pol peptide (IPLTEEAEL) yielded a high percentage of 'positive' T cell responses (Extended Data Fig. 5b and Supplementary Video 5) and 'positive' cells had the largest integrated intensity signals (roughly twofold greater than for other peptides ( Fig. 3e-g and Supplementary Fig. 8, bootstrapped P = 10 −4 , Methods)). The overall kinetics and amplitude of Ca 2+ signaling differ between experimental replicates performed on different days, likely due to variability in cell state across the population over time (Extended Data Fig. 5 and Supplementary Fig. 9), Nevertheless, the IPLTEEAEL peptide consistently triggered the largest fraction of cells and yielded the highest integrated Ca 2+ signals within each replicate experiment ( Fig. 3h and Supplementary Figs. 9 and 10, r 2 = 0.41), establishing that BATTLES can identify peptide epitopes capable of producing a robust cytotoxic response in vivo.
BATTLES can identify new peptide agonists. Next, we tested whether BATTLES could identify alternative potent agonists for TCR55-tranduced T cells that bind HIV-pol without activation ( Fig. 4a and Supplementary Fig. 11, 67 ± 24 beads and 51 ± 23 cells per peptide). In contrast to TCR589, the HIV-pol peptide IPLTEEAEL did not induce significant Ca 2+ responses; instead, a mutant peptide (VPLTEDALL) produced the strongest functional response across two biological replicates in which we shuffled the identity of the peptide associated with each spectral code ( To confirm that observed Ca 2+ responses required force and were not simply due to changing temperatures, we first repeated the TCR55 assay after heating beads to either 34 or 37 °C without subsequent cooling (Extended Data Fig. 6a,b). In both cases, integrated Ca 2+ signals across tested peptides were twofold lower than for experiments in which we heated and cooled beads to apply force and a lower percentage of cells yielded positive integrated Ca 2+ signals (Extended Data Fig. 6c); in addition, no peptide produced a response significantly higher than the others. Although a shrinking force may be applied during heating to 37 °C, the directions of the applied force and cell contractions (roughly 6 nN after attachment 18 ) are aligned at interaction surfaces such that the net applied force is negligible. As 34 and 37 °C are below and above the lower critical solution temperature for PNIPAm, respectively, these results also confirm that observed activation at 34 °C is not due to changes in bead stiffness.
As an additional test, we simultaneously quantified integrated Ca 2+ signals for T cells interacting with: (1) encoded swellable beads bearing the stimulatory peptide VPLTEDALL, (2) encoded swellable beads bearing the nonstimulatory peptide VPIVEDSFL and (3) nonswellable PEG-DA beads (7.8% w/v PEG-DA700) bearing the stimulatory peptide VPLTEDALL (PEG-DA beads have a similar material rigidity 48 to swellable beads but do not change size upon a 37 to 34 °C temperature change) (Extended Data Fig. 7). Measured integrated Ca 2+ signals were increased only for the PNIPAm beads bearing the stimulatory peptide VPLTEDALL after heating and cooling to apply force (Extended Data Fig. 7); no significant increase was seen for the PEG-DA beads. Together, these results establish that robust activation is not induced simply by a small temperature change but depends on bead-applied forces.
Integrated Ca 2+ signals vary with rate of applied force. The rate of change of an applied force (force ramp, defined as a force increased at a constant rate) has previously been shown to affect TCR-pMHC bond stability and profile 49,50 , with rapid cycling of optimal ramped forces triggering sustained T cell Ca 2+ signaling 22,51 that can accumulate over time. If the VPLTEDALL peptide actually serves as a potent agonist for TCR55-transduced T cells, we expect to see the strongest triggering at an optimal force ramp, with weaker responses at higher or lower force ramps.
Incorporating different amounts of SAc within the PNIPAm bead matrix alters the relative hydrophilicity/hydrophobicity ratio and rate of change in radius on temperature-induced swelling (Fig. 5a), thereby tuning the rate of change of the maximum applied force. To apply a range of force ramps, we polymerized thermo-responsive beads containing 50, 55 or 60 mM SAc, respectively (Fig. 5a). After polymerization, bead radii were constant across all three formulations (24.12 ± 1.45, 23.68 ± 1.55 and 24.08 ± 1.66 µm, mean ± s.d.) but the change in radius on cooling from 37 to 34 °C varied substantially (1.44 µm (34 beads, CV 1.5%), 0.96 µm (24 beads, CV 5.4%) and 0.64 µm (23 beads, CV 2.5%)) ( Fig. 5a,b, Extended Data Fig. 8 and Supplementary Video 6). As the modulus of rigidity is unchanged by small changes in SAc concentration 31 and temperature changes lead to only minor changes in    (Fig. 5c and Supplementary Fig. 15).
Previous work using cell coculture assays suggested that the VPLTEDAEL, VPITEDSQL and HIV-pol (IPLTEEAEL) peptides drive high, medium and nonexistent signaling responses for TCR55 (ref. 9 ). Here, we profiled how differences in maximum force ramp rate for these three peptides and the VPLTEDALL peptide altered integrated Ca 2+ signals via an assay in which each spectral code corresponded to a particular sequence/ramping force combination (4 peptide sequences × 3 ramping forces/sequence = 12 codes) (Supplementary Fig. 16 and Supplementary Table 3). For VPLTEDALL, measured Ca 2+ flux increased with low and moderate ramping forces and then decreased at high ramping force, consistent with strong triggering at moderate forces (Fig. 5d). By contrast, VPITEDSQL produced only a mild Ca 2+ signal enhancement at low and moderate forces, VPLTEDAEL responses were uniformly low across all forces and HIV-pol (IPLTEEAEL) showed no significant difference between tested forces compared to no force (P = 0.06 via bootstrapping) (Fig. 5d); results were consistent across a biological replicate in which embedded codes and peptide sequences were shuffled (Extended Data Fig. 9, Supplementary  Fig. 17 and Supplementary Table 3; r 2 = 0.80 across replicates). These results indicate that BATTLES can provide physiologically valuable information detailing cell signaling responses in the presence of different candidate peptide sequences at a variety of loading rates. These results also indicate that VPLTEDALL triggers the strongest Ca 2+ signaling response for TCR55-transduced T cells, at odds with previous peptide-pulsed APC coculture results identifying VPLTEDAEL as the most potent agonist 9 (Supplementary Table 4). One explanation for this discrepancy could be the difference in presented pMHC concentrations: previous experiments used peptide-pulsed APCs present peptides at high density (dozens to hundreds or even thousands of copies per cell 53 ) compared to densities of 3-4.5 pMHCs per cell for BATTLES.

Multiplexing concentrations reveals dose-dependent responses.
To test whether signaling responses depend on presented densities, we performed BATTLES assays with the same four TCR55-binding peptide sequences (VPLTEDALL, VPITEDSQL, VPLTEDAEL and IPLTEEAEL) at three effective concentrations (1× (3-4.5 pMHCs per T cell); 7× (21-31.5 pMHCs per T cell) and 27× (81-121.5 pMHCs per T cell)) (4 sequences × 3 concentrations = 12 codes) (Fig. 5e, Supplementary Fig. 18 and Supplementary Table 5); images of fluorescently labeled streptavidin conjugated to biotinylated pMHCs confirmed quantitative differences in surface density ( Supplementary Fig. 19). At 1× concentrations, VPLTEDALL again drove the strongest downstream response (Fig. 5f-h, Extended Data Fig. 10 and Supplementary Fig. 20; bootstrapped P = 0.0075; r 2 = 0.64 between replicates). For sevenfold higher pMHC densities, the integrated Ca 2+ signal for VPLTEDALL remained constant but the signals associated with the other three peptides increased, indicating a loss of specificity ( Fig. 5f-h, Extended Data Fig. 10 and Supplementary Fig. 20). At 27-fold higher pMHC densities, the integrated Ca 2+ signal associated with the VPLTEDAEL increased even further to drive the strongest response ( Fig. 5f-h, Extended Data Fig. 10 and Supplementary Fig. 20; bootstrapped P = 0.012 for two replicates), consistent with previous observations from tetramer screening and coculture assays 9 . These results highlight the need to screen at low pMHC densities to mimic physiological mechanotransduction and identify likely potent agonists in vivo.

BATTLES can reveal cross-reactivity for clinically tested TCRs.
Finally, we applied BATTLES to profile responses for a third clinically tested TCR. DMF5 recognizes the MART-1 melanoma antigen presented by the class I MHC protein HLA-A*0201, and clinical trials of DMF5-transduced T cells interacting with MART-1 [26][27][28][29][30][31][32][33][34][35] peptide-loaded dendritic cells demonstrated robust tumor regression 54 . Previous yeast display experiments revealed two distinct classes of peptides that bound the DMF5 TCR: (1) MART-1-like peptides containing a hydrophobic core sequence (GIG in P4-6) and (2) peptides instead containing a highly charged central core (DRG in P4-6), with DRG class peptides binding in a unique 'shifted register' conformation 26 . Tetramers of the MART-1 anchor-modified decamer (ELAGIGILTV) showed the strongest binding and the strongest downstream response in peptide-pulsed APC coculture assays while IMEDVGWLNV was the most potent DRG class peptide ( Fig. 6a and Supplementary Table 6); however, it remained unclear whether both peptide classes would drive similar levels of T cell activation when presented at low densities.

discussion
T cells exert shear forces during immunosurveillance 55 and immune synapse formation on an APC 56,57 . Such physical loads on the TCR-pMHC bond can enhance sensitivity and specificity of recognition by facilitating discrimination between nonself and self. Recapitulating robust T cell activation in vitro therefore requires the ability to: (1) display a peptide capable of driving the TCR triggering at low (physiological) densities, (2) apply shear forces to drive mechanotransduction and (3) monitor downstream T cell signaling. While a wide variety of mechanobiology tools have been developed to identify potent peptide agonists 58 (Supplementary Table 7), the BATTLES platform recapitulates these physicochemical cues (for example, active force and low monomeric pMHC density) and can screen 10s of peptide sequences interacting with thousands of cells in <5 hours to identify candidate agonists that not only bind TCRs but also activate downstream signaling responses.
Accurately mimicking mechanobiological conditions requires matching not just the magnitude of applied forces but also the rate of change of applied forces and overall duration over which forces are applied. While the absolute force applied to any particular TCR-pMHC interaction cannot be measured, the estimated maximum possible force ramp (20-30 pN s −1 ) is similar to that applied during traction force microscopy 18 , optical trapping 13 and atomic force microscopy 23 . Nevertheless, critical differences in how forces are applied may allow BATTLES to more accurately mimic in vivo physiology. First, while polystyrene or silica beads used in optical trapping assays distribute applied forces across all formed pMHC-TCR interactions at the interface, the thermo-responsive beads in BATTLES likely apply force locally via pMHCs attached to PNIPAm filaments within the bead hydrogel matrix, a geometry analogous to interactions between APC-presented pMHCs and protrusive T cell microvilli before activation 59 . Second, the duration of the force ramp applied by thermo-responsive beads over 60 s of cooling and associated swelling may allow peptides with a fast 2D on-rate to iteratively rupture and rebind, driving dynamic 51 and reversible roughly 10-nm structural transitions within the TCR-pMHC complex 60 . Such energized work (10-nm transitions under 10-15 pN loads) may lead to a stronger and more sustainable Ca 2+ flux 13 similar to that observed for naïve T cells 61 . However, additional experiments are required to determine whether the observed triggering results from force sensing by individual pMHC-TCR complexes or from a collection of force-induced cellular processes (for example, triggering by force-induced TCR clustering 13,57 ).
Affinity-based screening approaches (for example, pMHC multimer screening [62][63][64] and yeast display 65 ) assay 10 3 -10 9 different sequences, facilitating deep exploration of the potential sequence space. While previous data establish that equilibrium binding affinities measured in the absence of load do not accurately predict the activation potential of presented peptides [6][7][8] , it is known that agonist peptides typically bind TCRs with at least weak-to-moderate affinity. An efficient pipeline to identify new agonists could therefore begin with a high-throughput binding screen (for example, pMHC multimer screening [62][63][64] or yeast display 65 ) and then use BATTLES to efficiently test the hundreds to thousands of candidate 'hits' for their potential to activate T cells when displayed at low density and under load.
BATTLES also provides a valuable downstream complement to high-throughput synthetic biology approaches 66-68 that coculture engineered T cell lines with peptide-pulsed APCs to assess cellular responses. While such coculture assays have the potential to recreate force-dependent intercellular molecular interactions resulting from cytoskeletal rearrangements, the TCR-transduced T cell lines typically used are notably less sensitive than primary T cells and require APCs pulsed with high peptide concentrations (roughly 1 µM) to elicit activation. As the identity of synthetic peptide sequences capable of stimulating IL-2 release and CD69 expression depends on the concentration at which they are displayed 65,69 , peptides identified in such high-density screens often fail to drive potent activation under the low density conditions typical in vivo 1 . The ability to accurately test candidate agonists identified via coculture assays using TCR-transduced T cell lines suggests that BATTLES could validate peptide agonists displayed at physiological densities and better predict results obtained using primary T cells [70][71][72][73][74][75] .
In future work, BATTLES can be applied to a wide range of additional questions. While here we assay only 21 peptides, lanthanide-based spectral encoding has previously yielded >1,100 codes 40 , suggesting BATTLES can be applied to much larger libraries in the future. Expanded peptide libraries could be used to systematically profile how variations in TCR and/or presented peptide sequences alter activation under load and peptide immunogenicity. In addition, future efforts that combine BATTLES with scRNAseq and scTCRseq could expand the number of sequences even further. In medicine, combining Ca 2+ imaging with detection of surface markers associated with activation (for example, CD69 or CD137) in BATTLES assays could allow screening of affinity-matured TCR (for example, TCRs naturally found in tumor-infiltrating lymphocytes or peripheral blood mononuclear cell) or chimeric antigen receptor (CAR) 76 T cells for cross-reactivity before autologous transfer and thereby reduce the risk of off-target toxicity. These reduced material and time requirements could pave the way for direct testing of patient-derived T cell samples to identify candidate vaccine neoantigens capable of driving robust activation of endogenous T cells. Finally, BATTLES could be applied as a general mechanobiology tool for other immune cells, adhesion cells and even neurons 77 .

Production of lentivirus.
LentiX cells were seeded in six-well plates with 0.6 × 10 5 cells per well in 2 ml of complete DMEM (Thermo Fisher). The day after seeding, for each well, 750 ng lentiviral vector, 500 ng psPAX and 260 ng pMD2G were mixed with 4.5 ml of Fugene (Promega) in 100 ml of Opti-MEM and incubated at room temperature for 20 min. After incubation, this DNA/Fugene mixture was added to the LentiX cells. The lentivirus supernatant was collected 2 or 3 days after the transfection and filtered to remove dead cells.
Cell line generation. Lentivirus encoding transfection of TCRα and TCRβ chain genes was generated as described above 9 . Briefly, we cloned either the full-length TCRα or TCRβ chain gene into the pHR lentiviral vector. After lentivirus production, 2 ml of the supernatant containing TCR α and β chains with 1:1 expression was used to infect 1 million SKW3 cells. Following infection, we added 1.5 ml of fresh completed RPMI to the mixture. After 2 days, we selected for SKW3 cells with surface-expressed TCRαβ using 5 µl of APC conjugated anti-TCR (Biolegend clone IP26, 0.1 mg ml −1 ) staining and flow cytometry (Sony SH800 sorter).

Microfluidic device design.
Molding masters for both microfluidic devices used in the paper (the parallel flow focuser for high-throughput generation of the spectrally encoded beads and the microwell array for on-chip loading of beads and T cells) were designed in AutoCAD (Autodesk). The microfluidic droplet generator was largely similar to our previously published design 32 except that the width of orifice channels and all channel heights were changed to 25 μm to yield polymerized beads roughly 24 µm in diameter. All transparency masks used for fabrication of molding masters were printed at 50,000 dpi (Fineline Imaging). Designs of all devices are provided as Supplementary Information and in an associated Open Society Foundations (OSF) repository (https://osf.io/xs7zf/). Protocols for fabricating microfluidic molding masters and devices are available in Supplementary Methods.
Droplet generation. Here, 2.5% v/v LAP (39.2 mg ml −1 in deionized water) was added to each solution right before its injection into the droplet generator. Premixed Ln-polymer mixtures and HFE7500 with Ionic Krytox and 0.05% v/v AAc were flowed into the aqueous inlet and oil inlets of the droplet generator device, respectively, yielding high-throughput production of pre-gel droplets at the flow-focusing nozzle. Droplets (radius, 16.1 ± 0.4 μm) were generated with aqueous and oil flow rates of 500 and 3,200 μl h −1 and then collected through Tygon tubing into a 24-well plate (Thermo Fisher Scientific). Roughly 80 μl of running oil was added into the each well before the collection of the droplets to prevent evaporation of HFE7500 and resultant droplet breakage.
Bead polymerization and functionalization. During droplet generation, the AAc in the oil phase gradually diffuses into the aqueous phase to form a carboxy shell to allow subsequent covalent coupling of streptavidin to the bead surface. For two formulas at a time, we applied flood UV light (IntelliRay, UV0338) at 100% amplitude (0.21 m away from the lamp, power roughly 50-60 mW cm −2 ) for 2 min to induce polymerization and crosslinking of carboxyl groups at interfacial surfaces. After polymerization, beads were transferred into a 2 ml of fritz column with roughly 20 μm pore size (Biotage) and then washed with: 2 ml of dimethylformamide (Thermo Fisher Scientific) for 20 s; 2 ml of dichloromethane (Thermo Fisher Scientific) for 10 s and 2 ml of methanol (Thermo Fisher Scientific) for 20 s. After washing, beads were resuspended in 1 ml of PBS with 0.01% v/v Tween-20 (PBST) buffer for the aqueous 1-ethyl-3-(3-dimethylaminopropyl) carbodiimide (EDC) chemistry.

Production of lanthanide-encoded PEG-DA beads.
To produce the lanthanide-encoded PEG-DA beads (code 1), aqueous mixture with 7.8% w/v PEG-DA700 and 2% v/v YVO4:Eu (50 mg ml −1 ) was prepared. The droplet generation, bead polymerization and functionalization procedures are identical to the lanthanide-encoded thermo-responsive beads.
EDC chemistry for streptavidin surface conjugation. To functionalize beads with streptavidin, 150 μl of carboxy beads (roughly 200,000 beads) were washed with 200 μl of 0.1 M MES buffer (pH 4.5) supplemented with 0.01% (v/v) Tween-20 (activating buffer) three times before resuspension in 200 μl of activating buffer. Next, 200 μl of a freshly made 2% w/v EDC (Sigma-Aldrich) in activating buffer was added to the bead solution. The entire reaction was then incubated for 3.5 h at room temperature on a rotator with end-over-end mixing (10 r.p.m.). The bead slurry was then washed with 1 ml of 0.1 M borate buffer (pH 8.5) supplemented with 0.01% (v/v) Tween-20 (conjugating buffer) and subsequently resuspended in 400 μl of of conjugating buffer. Conjugation of streptavidin (Sigma-Aldrich) was carried out by adding 16 μl of streptavidin solution (dissolved in 1× PBS at 1 mg ml −1 ) into the mixture and rotating the whole slurry overnight at 4 °C. The reaction was quenched by adding 10 μl of 0.25 M ethanolamine in conjugating buffer to the mixture and rotating for 30 min at 4 °C. The final product was washed three times with PBST buffer and resuspended in 200 μl of the same buffer for subsequent bright-field and fluorescence imaging. The efficiency and consistency of streptavidin coupling was checked by incubating 0.5 µl of 1 mg ml −1 Biotin-Atto647 and roughly 5 µl of bead slurry (around 500 beads, either streptavidin-functionalized or without streptavidin as a negative control) for 1 h at room temperature and imaging in the Cy5 channel.
Peptide exchange reaction. UV-facilitated peptide exchange was performed as described previously 42 . Briefly, we first prepared peptide exchange buffer containing 20 mM Tris-HCl (pH 7.0) and 150 mM NaCl. Next, for each exchange reaction, we combined 40.4 μl of exchange buffer, 5.6 μl of the peptide to exchange (500 μM, diluted from 20 mM stocks in DMSO in exchange buffer) and 10 μl of UV-labile pMHC (2.8 μM in PBST) in one well of a 96-well plate. The plate was placed on a thermo-mixer whose temperature was pre-equilibrized to 4 °C. A UVP compact and handheld UV Lamp (365 nm, UVP95000505, 6 W) was placed over the sample for 2 h, with the distance between the lamp and sample set to roughly 3 cm. After that, the sample was withdrawn from the wells and purified and concentrated using 3 K spin columns (Thermo Fisher) three times at 4 °C. The final concentration was estimated using a NanoDrop 2000 spectrophotometer (Thermo Scientific).
pMHC-functionalized bead. The streptavidin-coupled beads were washed with PBST buffer three times. To create sample beads with pMHC at physiological density (for normal BATTLES and force multiplex experiments), we mixed 0.5 µl of 10 nM pMHCs with roughly 20,000 streptavidin-coated beads in 50 µl of PBST buffer. The mixture was gently rotated for 1 h at room temperature, washed with 200 µl of PBST four times, and then resuspended in 200 µl of PBST buffer. Bead surfaces were blocked by adding 5 µl of 20 mg ml −1 biotin-BSA (Thermo Scientific) to the pMHC-coated bead slurry for 1 h at room temperature, washed three times in PBST and then resuspended in 50 µl of PBST for further use. The BSA-coated surface eliminates potential nonspecific binding of the bead to the T cell 13 . For the concentration multiplex experiment, we mixed 0.5 µl of 100 nM (7×) or 500 nM (27×) pMHCs with roughly 20,000 streptavidin beads in 50 µl of PBST buffer and followed identical bead-coating procedures. For quantifying the concentration difference, we added 1 μl of alexa-647 labeled anti-β2 microglobulin monoclonal antibody (Thermo Fisher, clone B2M-01, 1 mg ml −1 ) to 5 µl of beads solution containing roughly 2,000 pMHC-coated beads and gently rotated for 1 h. We then washed beads with PBST five times, resuspended in 20 µl of 1× PBS buffer, and imaged on an inverted microscope (Nikon Eclipse Ti, Nikon) with a SOLA light engine (380 nm −680 nm, Lumencor) and a Cy5 filter cube set.
pMHC quantification by single-molecule total internal reflection fluorescence (smTIRF) microscopy. To determine the actual density of pMHC molecules on thermo-responsive bead surfaces, we imaged beads at the bead-glass interface via smTIRF microscopy (evanescent wave penetration depth of around 400 nm and a 50 × 50 µm 2 field of view). To detect bead-bound pMHCs, we added 1 µl of PE anti-human β2-microglobulin antibody (BioLegend, clone: A17082A, 0.2 mg ml −1 ) to 5 µl of beads solution containing either roughly 2,000 pMHC-or 2,000 streptavidin-coated beads (for control experiment) and gently rotated for 1 h. After staining, we washed beads with PBST five times, resuspended in 50 µl of 1× PBS buffer and placed samples on ice before imaging. Stained beads were imaged by smTIRF microscopy using a simple flow cell created using Scotch double-sided tape, a cover glass (VMR, 22 × 50 mm, no. 1.5) and a glass slide (Corning, 75 × 25 mm). After loading roughly 200 beads into the flow cell, the channel was washed with 1× PBS five times and then sealed with nail polish to prevent evaporation during the imaging. For one bead in the field of view, we recorded ten sequential images at 100 ms intervals. To quantify individual pHMC molecules, we counted the number of bright spots using 'Find maxima' in ImageJ with an intensity prominence of 40 and spots with different coordinates were summed across all ten images.

Shear modulus measurement.
To access the modulus of rigidity/shear modulus of each code, we made PNIPAm slabs containing identical ingredients to the 21 codes and then added 50 µl of each code to the roughly 15 mm diameter wells in the lid of 24-well plate. After 2 min of UV polymerization, we washed the slab three times and rehydrated in colorless RPMI. We then measured the shear modulus (modulus of rigidity) using the TA rheometer (HR 10, Discovery Hybrid Rheometer) with a 20 mm parallel plate associated with Peltier plate Steel plus Solvent Well. The strain and angular frequency were set to 0.015% and 0.1 to 100 rad s −1 with five points per decade, respectively. The shear modulus is the root sum square of the storage modulus and loss modulus.
Quantifying bead shrinking and swelling with changes in temperature. All bead imaging used a small dissection scope (AmScope) equipped with a ×20 objective with either a ×0.5 relay lens or a 1× relay lens (for the force multiplexing beads) and a Thorlabs camera (DCC3240M). Before imaging, we washed streptavidin-coated thermo-responsive beads with PBST three times, resuspended in colorless RPMI buffer and then loaded them into a flow cell. After bead loading, we sealed the flow cell with nail polish (to prevent evaporation) and placed the flow cell on an ITO glass slide (Bioscience Tools, TC-1-100s). While imaging continuously, we: (1) heated the sample from room temperature (25 °C) to 37 °C for 1 min (the heating ramp took roughly 8 s) and (2) cooled the sample to 34 °C (the cooling ramp took roughly 30 s) and then maintained the sample at 34 °C for 2 min. Finally, we quantified bead edges from bright-field images by tracing bead edges for every frame using ImageJ and plotting the Feret diameter over time.
Bead loading. Before loading beads, we treated microwell devices with air plasma for 4 min at 150 W plasma (Femto, Diener). Using a syringe pump, we then immediately filled the device with PBST 100 µl h −1 to expel the air trapped inside each well (for roughly 10 min) and subsequently flowed PBST at 20 µl h −1 for 1 h to block the surface. To load beads, we pooled around 10 µl of resuspended solution from each code, washed with PBST once and then resuspended in 20 µl of PBST. This bead mixture was loaded into the microwell device at 50 µl h −1 to fill the chamber and then at 10 µl h −1 for roughly 2 h to fill most of the wells with beads. We then rinsed the device with PBST at 100 µl h −1 to flush away extra beads before introducing cells.
T cell staining. To monitor TCR signaling, Cal-520 AM (AAT Bioquest, Inc.) was used to stain T cells and observe intracellular calcium flux associated with early T cell activation. Briefly, cells were washed, resuspended at 2 million cells per ml in 600 µl of colorless RPMI 1640 (Life technology), 3% (v/v) FBS, 0.02% (w/v) Pluronic F-127 (Sigma-Aldrich, 3% w/v in PBS buffer) and 2 µM Cal-520 (AAT Bioquest, 2 mM in DMSO), and incubated for 40 min at 37 °C. During this incubation, cells were resuspended by gently pipetting the solution every 10 min. T cells were then washed with 1 ml of colorless RPMI 1640 at room temperature and resuspended in 60 µl of colorless RPMI 1640 with 3% (v/v) FBS at room temperature before loading into the device.
Cell loading. During cell staining, the microwell device was washed with colorless RPMI 1640 at 50 µl h −1 for 40 min at room temperature. The stained cells were then loaded into the microwell chip at 30 µl h −1 for 5 min and then incubated for 10 min to allow stained T cells to settle on top of the beads within the microwells. To ensure even cell loading, we then removed the syringe containing the stained cells from the device input, resuspended cells again via repetitive cycles of withdrawing and injection, and then repeated cell loading from the opposite inlet via an identical procedure. Repeating this injection twice allowed most of the beads to be associated with at least one cell. After loading, we washed away unbound cells using colorless RPMI 1640 supplemented with 3% (v/v) FBS at a flow rate of 20 μl h −1 for 30 min and then incubated at room temperature for another 30 min. Based on device microwell dimensions, flow rates <50 μl h −1 only generated drag forces <4 pN in bulk and yielded much lower force near the surface where T cells were located, preventing potential force-induced T cell activation during the loading and washing steps; cell loading was also carried out at room temperature to avoid generating any thermo-responsive forces during cell loading.
Ca 2+ flux imaging. Time-lapse imaging experiments were performed on an automated inverted microscope (Nikon Eclipse Ti, Nikon) with a motorized filter turret. For 10-min Ca 2+ imaging, exposure times were kept 300 ms during all experiments to prevent pixel intensity saturation. Images were acquired at ×4 magnification (S Plan Fluor ELWD ×20 Ph1 ADM; Nikon) with 2 × 2 binning on a sCMOS Andor camera (Zyla v.4.2, Andor Technology) using µManager Software. To heat and cool beads, the entire microwell chip assembly was placed on an ITO glass slide mounted on the ASI stage. To exert force on bead-associated T cells, the chip was heated to and maintained at 37 °C for 1 min and then cooled to and kept at 34 °C for 2 min. Immediately after cooling, we acquired a total of 150 Ca 2+ fluorescence images at 4 s intervals.
Bead imaging. To identify cells within each well, we first imaged the device via bright-field imaging with 2 × 2 binning using a ×4 objective. To identify embedded spectral codes within each bead, we then illuminated the device from above using 292 nm excitation via a Xenon arc lamp (Lambda LS, Sutter Instruments) equipped with an automated filter wheel (Lambda 10-2, Sutter Instruments) containing a 292/27 bandpass excitation filter (Semrock) paired with UG11 absorptive glass (Newport). Emitted light was passed through an additional UV blocking filter mounted within a custom 3D printed holder mounted over the objective and then collected within Ln-channels using nine emission filters (435/40, 474/10, 536/40, 546/6, 572/15, 620/14, 630/92, 650/13 and 780/20 nm). For each image, we then identified all beads and determined the Ln ratios most likely to have produced the observed spectra associated with each pixel via linear unmixing relative to a series of Ln reference spectra as described previously 41 . Finally, we created a matrix associating each microwell (indexed by row and column) with the spectral code of the bead within it.
Image analyses. Ca 2+ fluxes for individual cells were analyzed in ImageJ. First, we duplicated the full stack of the fluorescence images. For one replicate, we segmented individual cells by finding all local maxima using 'Find maxima' in ImageJ with an intensity prominence of 350. For the other replicate, we generated thresholded images using the triangle method and converted to binary images. We then combined the segmented images with the thresholded images using the ' AND' operator under image calculator to identify individual cells. For Ca 2+ measurements, we: (1) selected a region of interest associated with each cell using the particle analysis tool in ImageJ with a size from 4-pixel units to infinity, and then (2) recorded fluorescence signals and centroids across 150 images. We verified that cells do not move out of regions of interest during the course of the experiment for Ca 2+ analyses by tracking the centroid of each individual cell using the MultiTracker plugin. We then calculated time-lapse fluorescent intensities for selected regions of interest and assigned each to a cell number with unique x and y coordinates. Signals were analyzed in MATLAB (MathWorks) by custom written scripts and can be provided on request. Briefly, we: (1) extracted the spatial coordinates of centers of individual microwells from the bright-field image, (2) converted spatial coordinates to microwell row and column numbers, (3) assigned each cell to a specific microwell by comparing cell and microwell centroids and assuming a 7.5 µm well diameter and then (4) associated traces for each cell with the embedded code (and thus the peptide sequence) of the bead present within that microwell.
Ca 2+ traces were normalized for each cell by plotting the fluorescence ratio at each time point divided by the measured intensity at time zero. Integrated Ca 2+ signals were calculated by subtracting 1 from each time point and integrating Ca 2+ traces over 10 min; all cells with an integrated Ca 2+ signal >0 were considered 'positive' cells.

Statistics and reproducibility.
All experiments were replicated in at least two independent technical replicates. No statistical method was used to predetermine sample size. The experiments were not randomized. The Investigators were not blinded to allocation during experiments and outcome assessment. No data were excluded from the analyses.
Bootstrap hypothesis testing. To calculate bootstrapped P values for each peptide tested using BATTLES, we iteratively: (1) pooled integrated Ca 2+ signals of all peptides, (2) calculated the number of measurements associated with the peptide of interest (n) and for this entire pool (m), (3) sampled n and m observations with replacement from the merged pool and (4) calculated the difference (t * ) between the mean of the first n observations and mean of the second m observations. In each case, each observation was the fold change of a particular integrated Ca 2+ signal relative to the mean Ca 2+ signal across all measurements. We repeated this procedure 100,000 times and then estimated the probability that an observed distribution was statistically significantly different from the pooled distribution as follows:

100, 000
For TCR589 and TCR55 cells interacting with 21 peptides, we applied a Bonferroni correction for multiple hypothesis testing at a significance of 0.05 (0.05/21 = 0.0024). For concentration multiplex experiments, we pooled specific peptides at a given concentration with the same peptide at other concentrations for bootstrap hypothesis testing and therefore determined a Bonferroni-corrected significance threshold of P = 0.013 (0.05/4). For DMF5 T cell interacting with two different peptide classes, we pooled all five peptides within each class plus the Tax peptide and therefore determined a Bonferroni-corrected significance threshold of P = 0.008 (0.05/6).
Reporting summary. Further information on research design is available in the Nature Research Reporting Summary linked to this article.

data availability
All data required to reproduce all figures have been deposited to an OSF repository (https://osf.io/xs7zf/). Source data are provided with this paper.

Code availability
AutoCAD designs (parallel flow focuser and microwell device) and T cell Ca 2+ flux data have been deposited to an OSF repository (https://osf.io/xs7zf/). Fig. 1 | Generation of thermo-responsive beads using a microfluidic parallel flow focusing system. (a) Bead generation setup that includes a PDMS parallel flow focusing device, a low-cost inverted microscope, and two syringe pumps for injection of aqueous and oil phases. Generated droplets were collected into a 24-well plate. (b) Images of droplet generation and collection at position 1 and position 2 within the PDMS device (left), with an average droplet radius of 16.1 ± 0.4 μm (right). (c) Image of thermo-responsive beads after UV polymerization of droplets and rehydration in PBSt buffer (left), with an average bead radius of 23.75 ± 1.55 μm (right). Scale bars: 100 μm in b and 50 μm in c. Images from (b) to (c) represent 21 independent experiments. Fig. 2 | Modulus of rigidity κ measurement using thermo-responsive slabs. (a) Procedure to generate thermo-responsive slabs from an identical formulation as thermo-responsive beads followed by the measurement of κ by tA rheometer. (b) Measured storage modulus, loss modulus, and modulus of rigidity as a function of angular frequency; κ was determined from the root sum square of the storage modulus and loss modulus at each angular frequency and then averaged. Fig. 4 | single molecule TIrF fluorescence imaging analysis of pMhC molecules immobilized on 12 thermo-responsive beads at the bead/glass interface. (a) tIrF images (left) and integrated analysis (counts of bright punctae across all images, right) for a single bead from code 8 bearing biotinylated VPLtEDALL/B35 complexes. In each image, the white circle indicates the radius of the settled bead and the orange square indicates the region of interest used to estimate pMHC density. (b) representative tIrF images (left) and integrated analysis (counts of bright punctae across all images, right) for a single negative control bead. In each experiment, biotinylated pMHC molecules were detected by incubation with PE-labeled anti-β2 mAb (clone: A17082A) immunofluorescence. Detailed bead preparation methods are found in Methods; the orange square rOI is ~840 μm 2 . We acquired images similar to those shown in (a) and (b) across 10 and 5 independent experiments, respectively. Scale bars: 50 µm. Fig. 8 | Changes in bead radii as a function of temperature for bead codes containing different sAc concentrations. (a) Measured radii as a function of time for thermo-responsive beads per code upon changing the temperature to 37 °C at time t = 0 s and to 34 °C at time t = 60 s; all traces are offset such that initial bead radii are set to the mean radius for each code at time t = 0 s. the red portion of each trace indicates bead heating from rt to 37 °C; the blue portion of each trace indicates bead cooling from 37 °C to 34 °C. (b) Mean (marker) and standard deviation (error bar) for change in radius upon cooling for beads from each code. n = 5-9 beads for each code; the full dataset is available for download in the OSF repository. Fig. 10 | sequence and concentration multiplexed measurements for two TCr55 replicates. (a) Measured integrated Ca 2+ fluorescence signals for each positive cell (light grey markers) and the mean integrated Ca 2+ signal (light grey square) for two tCr55 replicates interacting with 4 different peptides at three pMHC concentrations. the box width defines the interquartile range (IQr) and whiskers extend to 1.5 × IQr in either direction. n = 2535 cells and 1699 cells for rep. #1 and rep. #2, respectively. (b) top row: mean integrated Ca 2+ signals for positive cells interacting with VPLtEDALL, VPItEDSQL, VPLtEDAEL and IPLtEEAEL peptides at 1X, 7X and 27X pMHC concentrations and the summarized integrated Ca 2+ signals for four selected peptides under three pMHC concentrations for replicate 2. Error bars indicate SEM. (c) Estimated p-value (calculated via two-sided bootstrapping, see Methods) vs. log2-transformed mean fold change of integrated Ca 2+ signals for 4 peptides at 3 different pMHC concentrations; grey area represents p-value>0.013 (Bonferroni-corrected p-value at a significance of 0.05). Correspondence between thermo-responsive beads spectral code and displayed peptide sequence combined its concentration is shown at right. (d) Correlation plot of the means of integrated Ca 2+ signals between two replicates. Dashed black line indicates the line with a slope equal to 1; red dashed line indicates a linear regression. Error bars indicate SEM.