# Classification of T-cell activation via autofluorescence lifetime imaging

## Abstract

The function of a T cell depends on its subtype and activation state. Here, we show that imaging of the autofluorescence lifetime signals of quiescent and activated T cells can be used to classify the cells. T cells isolated from human peripheral blood and activated in culture using tetrameric antibodies against the surface ligands CD2, CD3 and CD28 showed specific activation-state-dependent patterns of autofluorescence lifetime. Logistic regression models and random forest models classified T cells according to activation state with 97–99% accuracy, and according to activation state (quiescent or activated) and subtype (CD3+CD8+ or CD3+CD4+) with 97% accuracy. Autofluorescence lifetime imaging can be used to non-destructively determine T-cell function.

## Main

T cells are an important component of the adaptive immune response and have diverse cytotoxic and immune-modulating, or helper activities, after activation. The two main T-cell subtypes are CD3+CD8+ T cells, which engage in cell-mediated cytotoxicity and release toxic cytokines, and CD3+CD4+ T cells, which can be further divided into additional subtypes with differing pro- and anti-inflammatory functions due to chemokine and cytokine production1,2. T cells are a promising target for immunotherapies owing to these diverse functions. Immunotherapies that directly increase T-cell cytotoxic activity, such as immune-checkpoint blockade therapies and adoptive cell transfer therapies, are presently used clinically for cancer treatment and are in development for additional diseases, including HIV3,4. Immunotherapies that enhance regulatory T cell (Treg) behaviours are in development for treating transplant rejection and autoimmune diseases, including diabetes and Crohn’s disease5,6.

New tools that are non-destructive and label-free are needed to fully characterize T cells for assessing immunotherapies. At present, T-cell subtype and function is determined from expression of surface proteins (such as CD3, CD4, CD8 and CD45RA) and cytokine production (such as interferon-gamma, transforming growth factor beta, interleukin (IL)-2, IL-4 and IL-17) using antibody-based methods such as flow cytometry, immunohistochemistry or immunofluorescence, or by transgenic fluorophore expression. However, these methods require exogenous contrast agents, and flow cytometry and immunohistochemistry require tissue dissociation and fixation, respectively. Autofluorescence imaging is an attractive method for analysing immune-cell behaviours because it is non-destructive, relies on endogenous contrast, and provides high spatial and temporal resolution. Autofluorescence imaging therefore overcomes the single-use limitation of label-based methods, is not influenced by confounding label-related factors, such as concentration and label-dependent alterations of the sample, and enables kinetic measurements of living T cells. Autofluorescence imaging can also provide functional information on limited blood volumes (such as neonates) that are inadequate for conventional assessments and assist with quality control on the same cells injected into patients for cellular immunotherapies.

After activation, T cells have increased metabolic demands to support cell growth, proliferation and differentiation23. This metabolic state of increased aerobic glycolysis is required for T cells to maintain effector function23,24,25. Thus, here we tested the hypothesis that FLIM of NAD(P)H and FAD provides quantitative features to identify activated T cells. To test this hypothesis, we isolated T cells from the blood of healthy donors, activated the cells in an antigen-independent manner using a tetrameric antibody (anti-CD2/CD3/CD28) and imaged the NAD(P)H and FAD fluorescence intensity and lifetime of quiescent and activated T cells. Here we demonstrate differences in autofluorescence lifetime between quiescent and activated T cells as well as accurate classification of T-cell activation state using machine learning models built from quantitative autofluorescence features.

## Results

### Autofluorescence imaging reveals differences between quiescent and activated T cells

Oxygen consumption rate (OCR) and extracellular acidification rate (ECAR) measurements confirmed that the metabolic rates of the activated T cells from one donor were increased (P < 0.001; Fig. 1h–j), in accordance with previously published studies of activated T cells24,26,27,28. In a metabolic-inhibitor experiment of T cells from one donor (Supplementary Fig. 5), the redox ratio of activated T cells decreased (P < 0.001) after treatment with a glycolysis inhibitor (2-deoxy-d-glucose (2DG)), and the redox ratio of quiescent T cells increased (P < 0.001) after treatment with oxidative phosphorylation inhibitors (antimycin A and rotenone). Furthermore, the glutaminolysis inhibitor Bis-2-(5-phenylacetamido-1,3,4-thiadiazol-2-yl)ethyl sulfide (BPTES) significantly decreased (P < 0.001) the optical redox ratio, NAD(P)H τm and FAD τm of both quiescent and activated T cells, suggesting that glutaminolysis makes a substantial contribution to the metabolism of quiescent and activated T cells (Supplementary Fig. 5).

### Autofluorescence imaging revealed T-cell heterogeneity within and across donors

T-cell heterogeneity was assessed within and across the six donors (Fig. 3). A heat-map representation (Fig. 3a) of the z score of autofluorescence imaging end-point values at the donor level (each row is the mean data of a single donor, cell type and activation state) revealed that the T cells cluster by activation state (that is, quiescent and activated cluster separately) and isolation (bulk CD3+ or isolated CD3+CD8+). Corresponding coefficient of variation heat maps highlight the high intradonor variability in the size of activated T cells and the low intradonor heterogeneity of the autofluorescence features (Supplementary Fig. 10).

A representative z score heat map in which each row is a single cell from one donor revealed distinct clusters of T cells by autofluorescence imaging features within the quiescent and activated CD3+CD8+ T-cell populations (Fig. 3b). Multiple quiescent and activated T-cell populations were observed across all six donors and arise from varied distributions of autofluorescence imaging features within the T-cell populations (Fig. 3c, Supplementary Figs. 1114). For example, histograms of the NAD(P)H τm values of quiescent and activated CD3+CD8+ T cells reveals a bimodal population within the quiescent CD3+CD8+ T cells, with one peak of the quiescent cells consistent with the peak of the activated cells (Fig. 3c).

We hypothesized that memory and naive T cells within the quiescent population contributed to the observed heterogeneity within the quiescent CD3+CD8+ T-cell population (Fig. 3b,c, Supplementary Figs. 1114; that is, the multiple clusters of quiescent CD3+CD8+ cells within the heat maps and bimodal distribution of the NAD(P)H τm of quiescent CD3+CD8+ T cells). To test this, we co-stained quiescent CD3+CD8+ T cells with antibodies against CD45RA, which is a marker of naive T cells, and CD45RO, which is a marker of memory T cells. NAD(P)H τm was significantly decreased in CD45RO+ cells compared with the NAD(P)H τm of CD45RA+ cells (P = 0.00058, Fig. 3d; from three donors). Furthermore, the optical redox ratio (P = 0.007) and NAD(P)H α1 (P = 0.0009) were increased in CD45RO+CD3+CD8+ T cells compared with CD45RA+ cells (Supplementary Fig. 15).

### Culture with CD3+CD4+ T cells affects the autofluorescence of CD3+CD8+ T cells

NAD(P)H and FAD autofluorescence imaging features reveal metabolic differences between CD3+CD8+ T cells cultured as an isolated population and CD3+CD8+ T cells cultured with CD3+CD4+ T cells (bulk CD3+ isolation). A UMAP (data dimension reduction) representation of NAD(P)H and FAD autofluorescence imaging features revealed that CD3+CD8+ T cells cultured from the CD3+CD8+-specific T-cell isolations cluster separately from CD3+CD8+ T cells within bulk CD3+ T-cell populations (Fig. 4a; three donors). The optical redox ratio and NAD(P)H α1 were decreased in both quiescent and activated CD3+CD8+ T cells of the isolated CD3+CD8+ population compared with the corresponding values of quiescent and activated CD3+CD8+ T cells, respectively, within the bulk CD3+ population (Fig. 4b,c). Additional differences in NAD(P)H and FAD autofluorescence lifetime features were observed between CD3+CD8+ T cells within the bulk CD3+ population and the isolated CD3+CD8+ population (Supplementary Fig. 16).

Despite these differences between CD3+CD8+ T cells of CD3+CD8+-specific isolations and bulk CD3+ isolations, changes in NAD(P)H and FAD autofluorescence features due to activation were maintained, and classification models predict the activation status of CD3+CD8+ cells with high accuracy regardless of isolation (Fig. 4d). Random forest feature selection revealed that NAD(P)H α1 is the most important feature for distinguishing between quiescent and activated CD3+ or CD3+CD8+ T cells (Supplementary Fig. 17a).

### Autofluorescence features distinguish between CD3+CD4+ and CD3+CD8+ T cells within bulk CD3+ populations

Heterogeneity in NAD(P)H and FAD autofluorescence features between CD3+CD4+ and CD3+CD8+ T cells was observed within the bulk CD3+ isolation. CD4+ or CD8+ expression was verified in parallel T-cell populations of three donors using immunofluorescence labelling with anti-CD4–peridinin-chlorophyll-protein complex (PerCP) or anti-CD8–PerCP antibodies (Supplementary Fig. 2). A UMAP representation of the autofluorescence data enabled us to visualize quiescent and activated CD3+CD4+ and CD3+CD8+ T cells within the bulk CD3+ isolation (Fig. 4e). Significant differences in NAD(P)H and FAD features, including NAD(P)H τ2 and NAD(P)H α1, were observed between CD3+CD4+ and CD3+CD8+ T cells (P < 0.001; Fig. 4f,g, Supplementary Fig. 18). Random forest models used to classify T-cell subtype (CD3+CD4+ or CD3+CD8+) within the bulk CD3+ T-cell isolation had test data prediction accuracies of 97.5% and 99.7% for subsets of quiescent or activated T cells, respectively, and 99.4% for all four groups, when trained on 75% of the T-cell dataset and tested on the remaining 25% (Fig. 4h). Classification accuracy scales with the number of cells in the training versus test groups (Fig. 4h). Random forest feature analysis revealed that NAD(P)H τ2 is the highest weighted feature for distinguishing between activated CD3+CD4+ T cells and activated CD3+CD8+ T cells, and FAD τ1 is the highest weighted feature for distinguishing between quiescent CD3+CD4+ T cells and quiescent CD3+CD8+ T cells (Supplementary Fig. 17b).

## Discussion

T cells are an important component of the adaptive immune response and have direct cytotoxic and immune-modulating behaviours. Immunotherapies that directly modify T-cell behaviour show promise for treating a variety of conditions, including cancer and autoimmune disease. Here we developed autofluorescence-lifetime-imaging-based methods for determining T-cell activation states at the single-cell level. Autofluorescence lifetime imaging is non-destructive, label-free, and has high spatial and temporal resolution that is amenable with live cell assessment, longitudinal studies and in vivo imaging. However, autofluorescence imaging is limited by light penetration depth and in vivo applications are therefore limited to surface tissues and preclinical window chamber models.

Different redox ratio definitions with either NAD(P)H or FAD in the numerator can be found in the literature7,11,12. Here we used NAD(P)H/(NAD(P)H + FAD) to improve the intuitive interpretation of the results, in which an increase corresponds to T-cell activation. Additional commentary on the redox ratio definition is provided in the Supplementary Information.

After activation, T-cell metabolism switches from tricarboxylic acid oxidation of glucose and β-oxidation of fatty acids to glycolysis and glutaminolysis23,24,25,32,33. T cells with high glycolytic activity in vitro show poor persistence, low recall responses and low proliferation rates that lead to poor effector activity in vivo, whereas T cells with high fatty acid oxidation show increased persistence, recall responses and proliferation, leading to better effector activity within the tumour34. Changes in NAD(P)H and FAD autofluorescence imaging features, including the increased optical redox ratio and increased free NAD(P)H (α1) observed in activated T cells relative to the corresponding features of quiescent T cells, reflect a shift towards glycolysis in activated T cells35 (Fig. 1, Supplementary Figs. 1, 18 and 19). An increase in glycolysis of activated T cells was verified using the Seahorse assay and metabolic inhibitor experiment (Fig. 1h–j, Supplementary Fig. 5). Changes in the lifetimes of NAD(P)H and FAD (Supplementary Fig. 1) indicate differences in the protein binding partners and microenvironment of NAD(P)H and FAD36.

Contributions from multiple metabolic pathways can alter the optical features and make interpretation of the results challenging. To help with data interpretation, the metabolic inhibitor experiment (Supplementary Fig. 5) demonstrates the effects of glycolysis, oxidative phosphorylation, fatty acid synthesis and glutaminolysis inhibition on the optical features of quiescent and activated T cells. BPTES reduced the redox ratio of both quiescent and activated T cells relative to control quiescent or activated T cells, respectively. This suggests that both quiescent and activated T cells utilize glutaminolysis. Rotenone and antimycin A selectively enhanced the optical redox ratio of quiescent cells, whereas 2DG selectively reduced the optical redox ratio of activated T cells, indicating that the optical redox ratio alterations due to activation in T cells are primarily due to alterations in glycolysis and oxidative phosphorylation.

T cells are known to be highly heterogeneous; phenotypic heterogeneity of surface proteins and effector function were observed for CD3+CD4+ and CD3+CD8+ T cells37. This heterogeneity can arise from the strength of the activating event, the microenvironment of the T cell and differences in gene regulation at the time of activation38,39,40. Heterogeneity analysis using heat maps and histograms revealed heterogeneous clustering of T cells within the autofluorescence imaging dataset. A difference in the mean NAD(P)H lifetime was found to be due to naive (CD45RO+) and memory (CD45RA+) CD3+CD8+ T cells (Fig. 3c,d), which are known to have differing metabolic states—memory T cells have increased glycolytic capacity and mitochondrial mass compared with naive T cells26. An additional subpopulation was identified within the activated T-cell subset and characterized by larger-than-average cells (Fig. 3b, Supplementary Figs. 6 and 7). These large cells may be actively dividing cells, a condition that is also accompanied by metabolic and autofluorescence differences41,42.

Machine learning approaches have been applied to extracted morphological features of phase-contrast images to identify cancer cells from immune cells, bright-field images to assess cell cycle, and phase contrast and autofluorescence images to classify macrophage exposure to lipopolysaccharide (LPS)22,43,44. Here, high ROC AUC values (at least 0.95) were achieved for test datasets using machine learning techniques to classify T cells as activated or quiescent using the autofluorescence imaging features (optical redox ratio, cell size, NAD(P)H τm, NAD(P)H τ1, NAD(P)H τ2, NAD(P)H α1, FAD τm, FAD τ1, FAD τ2 and FAD α1) quantified for each cell. Classification of activation of T cells from CD3+CD8+-specific isolations was slightly higher than that of T cells from bulk CD3+ isolations, as might be expected for a homogeneous population (CD3+CD8+) rather than a heterogeneous population (bulk CD3+ populations contain CD4+ and CD8+ subsets). Although multiple classification models were found to have similar performance, logistic regression was the best fitting model, suggesting that the predicted probability of activation is a linear combination of all 10 of the autofluorescence imaging features. Interestingly, donor normalization (Fig. 2d) of the autofluorescence imaging features did not improve classification accuracy, suggesting that the autofluorescence features reflect changes in T cells with activation that are consistent across donors such that generalized models can be used for unspecified donors or patients, which is beneficial for robust implementation of autofluorescence imaging as a universal tool to evaluate T-cell activation.

The models for classifying activation in T cells reported here have higher ROC AUC values than the previously reported accuracy of 84–87% found for binary logistic regression classification of morphological and Raman spectra features of control and LPS-exposed murine RAW264 macrophages22. Murine macrophage activation by LPS inhibits inducible nitric oxide synthase, stimulates the mammalian target of rapamycin (mTOR), increases expression of ubiquitous 6-phosphofructo-2-kinase and inhibits adenosine monophosphate-activated protein kinase (AMPK) leading to increased glycolysis and decreased oxidative phosphorylation45. Macrophages also display a spectrum of phenotypes after activation45 and the activated macrophage phenotype may therefore be more heterogeneous compared with the antigen-independent activation of T cells by anti-CD2/CD3/CD28 antibodies. These differences in molecular changes after activation may explain the observed differences in label-free classification accuracy between T cells and macrophages. Although high classification accuracy was achieved using the machine learning approaches, deep-learning methods, such as neural networks, may achieve improvements in classification accuracy, as has been previously demonstrated for the classification of cancer cells among immune cells in phase-contrast images43.

CD3+CD4+ T cells have a variety of immune-modulating behaviours. Although it is not necessary for activation of CD3+CD8+ T cells, the presence of CD3+CD4+ T cells during activation is required for the development of memory CD3+CD8+ T cells47. Furthermore, Treg cells (CD3+CD4+FoxP3+ T cells, 5–10% of the peripheral CD3+CD4+ population) suppress the activation and proliferation of other T cells48,49. Differences in the NAD(P)H and FAD autofluorescence imaging features (Fig. 4, Supplementary Fig. 16) between CD3+CD8+ T cells cultured with and without CD3+CD4+ T cells were observed, suggesting autofluorescence imaging is sensitive to CD3+CD4+-induced changes in CD3+CD8+ T cells (Fig. 4). However, despite these differences, NAD(P)H α1 remains the highest-weighted feature for classifying activation state (Supplementary Fig. 17), and activation state of CD3+CD8+ T cells can be classified from autofluorescence imaging features with high accuracy, regardless of T-cell population (Fig. 4d).

Owing to the differing physiological functions of CD3+CD4+ and CD3+CD8+ T cells1,50, we examined whether machine learning methods could use autofluorescence imaging data to distinguish between CD3+CD8+ and CD3+CD4+ T cells within bulk CD3+ populations. Differences in NAD(P)H fluorescence lifetime values between CD3+CD4+ and CD3+CD8+ T cells suggest variations in metabolic activity after activation of CD3+CD4+ and CD3+CD8+ T cells, which is consistent with previously observed differences in T-cell activation of these subtypes. Activation of CD3+CD4+ T cells occurs through Myc, oestrogen-related receptor alpha and mTOR, whereas CD3+CD8+ T cells activate through Akt and mTOR51. High classification accuracy was achieved through random forest classification of T-cell autofluorescence features for all four groups—activated CD3+CD4+ T cells, quiescent CD3+CD4+ T cells, activated CD3+CD8+ T cells and quiescent CD3+CD8+ T cells (Fig. 4h). Furthermore, the differences in the metabolic pathways used by activated CD3+CD4+ and CD3+CD8+ T cells may contribute to the different autofluorescence feature weights observed for CD3+ and CD3+CD8+ T cells (Fig. 2c). Memory T cells and Treg cells, populations that are probably within the CD3+ isolation, use more oxidative metabolism and less glycolytic metabolism compared with activated CD3+CD8+ T cells51. This heterogeneity in metabolic-pathway utilization by cells within the CD3+ population may contribute to the differences in the optical features observed between the CD3+ and CD3+CD8+ populations, increased intradonor variability in CD3+ populations, and reduced differences in optical features between quiescent and activated cells in the CD3+ isolation compared with the CD3+CD8+ isolation.

Autofluorescence lifetime imaging has spatial and temporal resolution advantages compared with traditional assays for surveying T-cell activation and function. Autofluorescence imaging can be performed at high resolution to enable measurements at the single-cell level, enabling insights into metabolic heterogeneity within T-cell populations. Moreover, the high spatial resolution and non-destructive nature of autofluorescence imaging maintains the spatial integrity of immune cells, enabling high fidelity measurements of neighbouring cells as demonstrated in the combined population of quiescent and activated T cells (Fig. 5a). Finally, autofluorescence imaging also has a high temporal resolution (Fig. 5f) enabling time-course study of T-cell activation.

Taken together, autofluorescence lifetime imaging of NAD(P)H and FAD of T cells, combined with machine learning for classification, is an accurate tool for non-destructive label-free assessment of the activation status of T cells. NAD(P)H and FAD autofluorescence lifetime imaging provides high spatial, temporal and functional information about cell metabolism, which makes it an attractive tool for evaluating T cells. Autofluorescence lifetime imaging can be used to characterize T cells in vivo in preclinical models, in clinical applications including small blood samples (such as paediatric samples) in which antibody labelling is limited or in cultured T cells, such as those used in biomanufactured T-cell therapies.

## Methods

### T-cell isolation and culture

This study was approved by the Institutional Review Board of the University of Wisconsin-Madison (2018–0103), and informed consent was obtained from all of the donors. Peripheral blood was drawn from six healthy donors into sterile syringes containing heparin. Two blood draws were performed 183 d apart on one donor to evaluate the consistency of the experimental protocol and imaging features. The data from the second blood draw are included only in the figure that directly compares the results from the two blood draws (Supplementary Fig. 4). Bulk CD3+ T cells or an isolated CD3+CD8+ T-cell subset were extracted from whole blood using negative-selection methods (RosetteSep, StemCell Technologies). Blood was transferred from the blood-draw syringe to a 50 ml centrifuge tube. Following the RosetteSep Protocol, the CD3+ or CD8+ RosetteSep Cocktail (StemCell Technologies) was added to the blood (50 µl per ml of blood), mixed and incubated at room temperature for 10 min. The sample volume was doubled with PBS + 2% fetal bovine serum (FBS). SepMate tubes (StemCell Technologies) were prepared with a 3.5 ml bottom layer of a density gradient medium (Lymphoprep, StemCell Technologies) and a top layer of diluted blood, according to the RosetteSep instructions. The tubes were centrifuged at 1,200g for 10 min, brake on. The enriched cell layer within the supernatant was poured into a new 50 ml centrifuge tube, and was washed with PBS + 2% FBS with centrifugation twice at 300g for 10 min. Enriched cells were cultured in ImmunoCult-XF T cell Expansion Medium (StemCell Technologies). Approximately 24 h after isolation, the T cells were divided into two groups—a quiescent population that was grown in medium without activating antibodies, and an activated population that was cultured in medium supplemented with 25 µl ml−1 tetrameric antibodies against CD2, CD3 and CD28 (StemCell Technologies). Quiescent and activated T-cell populations were cultured separately for 48 h at 37 °C, 5% CO2 and 99% humidity before imaging and subsequent experiments, unless otherwise noted. Before imaging, T cells were plated at approximately 200,000 cells per 200 µl of medium on 35 mm poly-d-lysine-coated glass-bottom dishes (MatTek). To ensure that autofluorescence imaging and the classification models extend for mixed populations of quiescent and activated T cells, a subset of quiescent and activated T cells from one donor (48 h of culture with activating antibodies) were combined and plated together in a dish 1 h before imaging.

### Antibody validation

Antibodies against CD4 (clone OKT4, PerCP-conjugated, Biolegend, 317431, B198303), CD8 (clone SK1, PerCP-conjugated, Biolegend, 344707, B204988), CD69 (clone FN50, PerCP-conjugated, Biolegend, 310927, B180058), CD45RA (clone HI100, Alexa-647-conjugated, Biolegend, 304153, B220325) and CD45RO (clone UCHL1, PerCP-conjugated, Biolegend, 304251, B219295) were used to validate cell type and activation state. CD4, CD8 and CD69 antibody labelling was performed on T cells for three donors (B, E and F) in parallel imaging dishes, each with a different immunofluorescence antibody. CD45RA and CD45RO antibody labelling was performed on populations of quiescent CD3+CD8+ T cells for three donors. Cells (30,000–200,000 per condition) were stained with 5 µl antibodies per 106 cells in 50 µl of ImmunoCult-XF T cell Expansion Medium for 30 min in the dark at room temperature. Cells were washed with ImmunoCult 1–2 times, resuspended in 50–200 µl of medium and added to the centre of a 35 mm poly-d-lysine-coated glass-bottom dish (MatTek). Cells were kept in a 37 °C, 5% CO2 humidified environment until imaging. All cells were imaged within 3 h of staining. NAD(P)H and FAD fluorescence lifetime images were acquired as described above. To identify PerCP positive cells, an additional fluorescence intensity image was acquired with the laser tuned to 1,040 nm with a 690/45 nm bandpass filter before the PMT. To evaluate Alexa-647 fluorescence, the laser was tuned to 1,300 nm for excitation, and a 690/45 nm bandpass filter was used to filter emitted light.

### Data analysis

Fluorescence lifetime decays were analysed to extract fluorescence lifetime components (SPCImage, Becker & Hickl). A bin of 9 surrounding pixels (3 × 3) was used to increase the fluorescence counts in each decay. A threshold was used to exclude pixels with low fluorescence signal (that is, background). Fluorescence lifetime decays were deconvolved from the instrument response function and fit to a two-component exponential decay model, $$I\left( t \right) = \alpha _1{\mathrm{e}}^{ - t/\tau _1} + \alpha _2{\mathrm{e}}^{ - t/\tau _2} + C$$, where I(t) is the fluorescence intensity as a function of time t after the laser pulse, α1 and α2 are the fractional contributions of the short and long lifetime components, respectively (that is, α1 + α2 = 1), τ1 and τ2 are the short and long lifetime components, respectively, and C accounts for background light. Both NAD(P)H and FAD can exist in quenched (short lifetime) and unquenched (long lifetime) configurations8,13; the fluorescence decays of NAD(P)H and FAD are therefore fit to two components.

Images were analysed at the single-cell level to evaluate cellular heterogeneity53. NAD(P)H intensity images were segmented into cytoplasm and nucleus using edge detect and thresholding methods in CellProfiler using a customized image-processing routine54. The CellProfiler routine applied the following steps to segment the images: first, the unprocessed NAD(P)H intensity images were rescaled between 0 and 1 by dividing the image by the value of the brightest pixel within the image. Next, a Sobel edge detect computation was applied across the image. The resulting image was thresholded to remove areas of high edge values (that is, cell cytoplasm) and inverted to create a mask. This mask was multiplied by the rescaled NAD(P)H-intensity image leaving background and nuclear (low intensity) pixels. Primary objects (nuclei) were identified from this image using CellProfiler’s default object identification and a manually set threshold (0.04) to remove the non-cellular background. Secondary objects (cells) were then identified by outward propagation of the primary objects. Cytoplasm masks were determined by subtracting the nucleus mask from the cell mask.

### Statistics

Statistical analysis and data representation were performed in R. For each donor, one dish of cells was prepared for each experimental condition. Four to six fields of view separated by at least 250 µm were acquired from each dish. Each field of view contained 25–400 cells (mean, 143 cells). Each cell was considered to be an independent sample because the perturbation (activation) occurred at the cellular level. For statistical comparisons at the cellular level, a generalized linear, logistic regression model was used to evaluate differences in the autofluorescence imaging features between quiescent and activated T cells, CD45RA+ and CD45RO+ cells (Fig. 3), and CD3+CD4+ and CD3+CD8+ T cells. A donor interaction term was included in the model to account for the donor; the general equation used was outcome  imaging variable × donor. P values were computed for two-tailed tests, and an α significance level of 0.05 was used to indicate significance. Cellular data were also aggregated to the donor level, and two-tailed, simple paired t-tests were performed to assess donor-level significance (α = 0.05) for all comparisons with three or more donors. The presented boxplots show the median (centre line) and first and third quartiles (lower and upper box limits, respectively); the whiskers extend to the furthest data points that are no further than 1.5× the interquartile range; and the dots represent data points beyond 1.5× the interquartile range from the hinge.

### Classification

UMAP, which is a dimension reduction technique29, and z score heat maps were used to visualize clustering within the autofluorescence imaging datasets (Python and R, respectively). A summary of the machine learning classification models and training/testing datasets is provided in Supplementary Table 1. Random forest, logistic regression and support vector machine classification methods were trained to classify activated and quiescent T cells within either the bulk CD3+ FLIM data or the isolated CD3+CD8+ FLIM data (R). For both datasets, gain ratio, χ2 and random forest feature selection methods were used to evaluate the contribution of the NAD(P)H and FAD autofluorescence features to the accuracy of classification of quiescent versus activated T cells. These models were trained on data from donors A, B, C and D because these cells lacked immunofluorescence CD69 validation but were known to be quiescent or activated by culture conditions (n = 4,131 CD3+ cells and n = 2,655 CD3+CD8+ cells). Models were tested on data from T cells from donors B, E and F with CD69 immunofluorescence validation of activation state (n = 696 CD3+ cells and n = 595 CD3+CD8+ cells) and the presented ROC curves reflect these test data. Random forest models were developed to distinguish between CD3+CD4+ and CD3+CD8+ T cells, and cells were randomly assigned to train and test datasets for a range of train–test proportions from 12.5% to 87.5%. Each model was replicated 50 times; new training and test data was generated before each iteration. Logistic regression models were also estimated for the classification of T-cell activation from imaging features of combined quiescent and activated CD3+ T cells (both conditions together within the images). Observations were randomly divided into training and testing datasets (90% and 10%, respectively), and the presented ROC curves are the average of 1,000 iterations of data that was randomly selected for training and test sets. All of the ROC curves displayed were constructed from the test datasets using the model generated from the training datasets.

### Seahorse assay

Quiescent and activated T cells were plated at 5 × 106 cells per ml on a Seahorse 96-well plate in unbuffered RPMI medium without serum. OCR and ECAR measurements were obtained every 6.5 min for 5 cycles. A generalized linear model was used to determine statistical significance (α = 0.05) within OCR and ECAR measurements between control and activated T cells.

### Metabolic inhibitors

Quiescent and activated (48 h) CD3+ T cells were plated on poly-d-lysine-coated 35 mm glass-bottom dishes at a concentration of 200,000 cells per 200 µl ImmunoCult T cell Expansion Medium as described in the ‘T-cell isolation and culture’ section. The metabolic inhibitors antimycin A (1 µM), rotenone (1 µM), 2DG (50 mM), BPTES (20 µM) and 5-(tetradecyloxy)−2-furoic acid (TOFA, 50 µg ml−1) were added individually—except for antimycin A and rotenone, which were added together—to the dishes before imaging. Cells were incubated with antimycin A and rotenone for 10 min, 2DG for 10 min, BPTES for 1 h and TOFA for 1 h. Fluorescence-lifetime images of NAD(P)H and FAD were acquired for six random fields of view as described above. A generalized linear model was used to determine autofluorescence imaging features with statistical significance (α = 0.05) between control and inhibitor-exposed cells.

### 10-min activation time course

Quiescent CD3+ T cells were isolated and plated for imaging as described above. NAD(P)H lifetime images were acquired as described above but with an image size of 128 × 128 px and an integration time of 15 s. Images were acquired sequentially for 2 min (8 frames), then 5 μl PBS was added to the cells as a mock treatment, and NAD(P)H fluorescence lifetime images were acquired for 10 min (40 frames). Subsequently, 5 µl of activating tetrameric antibodies (anti-CD2/CD3/CD28) was added and NAD(P)H fluorescence lifetime images were acquired for 10 min (40 frames). NAD(P)H FLIM images were analysed using SPCImage as described above. Individual cells and cell compartments (nucleus and cytoplasm) were manually segmented (author, I.J.), and the autofluorescence imaging features were averaged across all pixels within the segmented region (ImageJ). This procedure was repeated for three dishes of T cells from three different donors for a total of 30–34 analysed cells per donor.

### 24-h activation time course

Quiescent CD3+ T cells were isolated from a healthy donor and plated for imaging as described above with 200,000 cells per 200 µl ImmunoCult T cell Expansion Medium on glass-bottom petri dishes. NAD(P)H and FAD lifetime images were acquired as described above with an image size of 256 × 256 px and an integration time of 60 s. Four to five images were acquired from both control (5 µl PBS added to the 200 µl of cells) and activated (5 µl anti-CD2/CD3/CD28 antibodies added to the 200 µl of cells) dishes of T cells at 0.5 h, 1 h, 2 h, 3 h, 6 h, 12 h and 24 h after antibody exposure. Optical redox ratio images were computed as described above. Cell cytoplasm was segmented as described above. The optical redox ratio of the cells in the activated condition was computed as normalized to the mean redox ratio of the cells in the parallel control dish within each time point. This procedure was repeated for T cells from three different donors.

### Reporting Summary

Further information on research design is available in the Nature Research Reporting Summary linked to this article.

## Data availability

The main data supporting the results in this study are available within the paper and its Supplementary Information. The raw and analysed datasets generated during the study are too large to be publicly shared, yet they are available for research purposes from the corresponding authors on reasonable request.

## Code availability

All code and algorithms generated during the study are available at GitHub (https://github.com/walshlab/T-cell-Activation-Paper).

## References

1. 1.

Mosmann, T. R. & Coffman, R. L. in Advances in Immunology Vol. 46 (ed. Dixon, F. J.) 111–147 (Elsevier, 1989).

2. 2.

Bettelli, E., Korn, T. & Kuchroo, V. K. Th17: the third member of the effector T cell trilogy. Curr. Opin. Immunol. 19, 652–657 (2007).

3. 3.

Pardoll, D. M. The blockade of immune checkpoints in cancer immunotherapy. Nat. Rev. Cancer 12, 252–264 (2012).

4. 4.

Restifo, N. P., Dudley, M. E. & Rosenberg, S. A. Adoptive immunotherapy for cancer: harnessing the T cell response. Nat. Rev. Immunol. 12, 269–281 (2012).

5. 5.

Canavan, J. B. et al. Developing in vitro expanded CD45RA+ regulatory T cells as an adoptive cell therapy for Crohn’s disease. Gut 65, 584–594 (2015).

6. 6.

Marek-Trzonkowska, N. et al. Administration of CD4+CD25highCD127 regulatory T cells preserves β-cell function in type 1 diabetes in children. Diabetes Care 35, 1817–1820 (2012).

7. 7.

Chance, B., Schoener, B., Oshino, R., Itshak, F. & Nakase, Y. Oxidation-reduction ratio studies of mitochondria in freeze-trapped samples. NADH and flavoprotein fluorescence signals. J. Biol. Chem. 254, 4764–4771 (1979).

8. 8.

Lakowicz, J. R., Szmacinski, H., Nowaczyk, K. & Johnson, M. L. Fluorescence lifetime imaging of free and protein-bound NADH. Proc. Natl Acad. Sci. USA 89, 1271–1275 (1992).

9. 9.

Georgakoudi, I. & Quinn, K. P. Optical imaging using endogenous contrast to assess metabolic state. Annu. Rev. Biomed. Eng. 14, 351–367 (2012).

10. 10.

Huang, S., Heikal, A. A. & Webb, W. W. Two-photon fluorescence spectroscopy and microscopy of NAD(P)H and flavoprotein. Biophys. J. 82, 2811–2825 (2002).

11. 11.

Varone, A. et al. Endogenous two-photon fluorescence imaging elucidates metabolic changes related to enhanced glycolysis and glutamine consumption in precancerous epithelial tissues. Cancer Res. 74, 3067–3075 (2014).

12. 12.

Ostrander, J. H. et al. Optical redox ratio differentiates breast cancer cell lines based on estrogen receptor status. Cancer Res. 70, 4759–4766 (2010).

13. 13.

Nakashima, N., Yoshihara, K., Tanaka, F. & Yagi, K. Picosecond fluorescence lifetime of the coenzyme of d-amino acid oxidase. J. Biol. Chem. 255, 5261–5263 (1980).

14. 14.

Skala, M. C. et al. In vivo multiphoton microscopy of NADH and FAD redox states, fluorescence lifetimes, and cellular morphology in precancerous epithelia. Proc. Natl Acad. Sci. USA 104, 19494–19499 (2007).

15. 15.

Quinn, K. P. et al. Quantitative metabolic imaging using endogenous fluorescence to detect stem cell differentiation. Sci. Rep. 3, 3432 (2013).

16. 16.

Walsh, A. J. et al. Quantitative optical imaging of primary tumor organoid metabolism predicts drug response in breast cancer. Cancer Res. 74, 5184–5194 (2014).

17. 17.

Walsh, A. J., Castellanos, J. A., Nagathihalli, N. S., Merchant, N. B. & Skala, M. C. Optical imaging of drug-induced metabolism changes in murine and human pancreatic cancer organoids reveals heterogeneous drug response. Pancreas 45, 863–869 (2016).

18. 18.

Walsh, A. J. et al. Optical metabolic imaging identifies glycolytic levels, subtypes, and early treatment response in breast cancer. Cancer Res. 73, 6164–6174 (2013).

19. 19.

Stringari, C. et al. Phasor approach to fluorescence lifetime microscopy distinguishes different metabolic states of germ cells in a live tissue. Proc. Natl Acad. Sci. USA 108, 13582–13587 (2011).

20. 20.

Alfonso-Garcia, A. et al. Label-free identification of macrophage phenotype by fluorescence lifetime imaging microscopy. J. Biomed. Opt. 21, 046005 (2016).

21. 21.

Szulczewski, J. M. et al. In vivo visualization of stromal macrophages via label-free FLIM-based metabolite imaging. Sci. Rep. 6, 25086 (2016).

22. 22.

Pavillon, N., Hobro, A. J., Akira, S. & Smith, N. I. Noninvasive detection of macrophage activation with single-cell resolution through machine learning. Proc. Natl Acad. Sci. USA 115, E2676–E2685 (2018).

23. 23.

Frauwirth, K. A. et al. The CD28 signaling pathway regulates glucose metabolism. Immunity 16, 769–777 (2002).

24. 24.

Chang, C.-H. et al. Posttranscriptional control of T cell effector function by aerobic glycolysis. Cell 153, 1239–1251 (2013).

25. 25.

Michalek, R. D. et al. Cutting edge: distinct glycolytic and lipid oxidative metabolic programs are essential for effector and regulatory CD4+ T cell subsets. J. Immunol. 186, 3299–3303 (2011).

26. 26.

Van der Windt, G. J. W. et al. CD8 memory T cells have a bioenergetic advantage that underlies their rapid recall ability. Proc. Natl Acad. Sci. USA 110, 14336–14341 (2013).

27. 27.

Tarasenko, T. N. et al. Cytochrome c oxidase activity is a metabolic checkpoint that regulates cell fate decisions during T cell activation and differentiation. Cell Metab. 25, 1254–1268 (2017).

28. 28.

Gubser, P. M. et al. Rapid effector function of memory CD8+ T cells requires an immediate-early glycolytic switch. Nat. Immunol. 14, 1064–1072 (2013).

29. 29.

McInnes, L. & Healy, J. UMAP: uniform manifold approximation and projection for dimension reduction. Preprint at http://arxiv.org/abs/1802.03426v1 (2018).

30. 30.

Zhang, Q., Piston, D. W. & Goodman, R. H. Regulation of corepressor function by nuclear NADH. Science 295, 1895–1897 (2002).

31. 31.

Hou, J. et al. Correlating two-photon excited fluorescence imaging of breast cancer cellular redox state with seahorse flux analysis of normalized cellular oxygen consumption. J. Biomed. Opt. 21, 060503 (2016).

32. 32.

Wang, R. et al. The transcription factor Myc controls metabolic reprogramming upon T lymphocyte activation. Immunity 35, 871–882 (2011).

33. 33.

Wang, R. & Green, D. R. Metabolic checkpoints in activated T cells. Nat. Immunol. 13, 907–915 (2012).

34. 34.

Kishton, R. J., Sukumar, M. & Restifo, N. P. Metabolic regulation of T cell longevity and function in tumor immunotherapy. Cell Metab. 26, 94–109 (2017).

35. 35.

Liu, Z. et al. Mapping metabolic changes by noninvasive, multiparametric, high-resolution imaging using endogenous contrast. Sci. Adv. 4, eaap9302 (2018).

36. 36.

Sharick, J. T. et al. Protein-bound NAD(P)H lifetime is sensitive to multiple fates of glucose carbon. Sci. Rep. 8, 5456 (2018).

37. 37.

Chang, J. T., Wherry, E. J. & Goldrath, A. W. Molecular regulation of effector and memory T cell differentiation. Nat. Immunol. 15, 1104–1115 (2014).

38. 38.

Kaech, S. M. & Cui, W. Transcriptional control of effector and memory CD8+ T cell differentiation. Nat. Rev. Immunol. 12, 749–761 (2012).

39. 39.

Palmer, M. J., Mahajan, V. S., Chen, J., Irvine, D. J. & Lauffenburger, D. A. Signaling thresholds govern heterogeneity in IL-7-receptor-mediated responses of naive CD8+ T cells. Immunol. Cell Biol. 89, 581–594 (2011).

40. 40.

Tubo, N. J. et al. Single naive CD4+ T cells from a diverse repertoire produce different effector cell types during infection. Cell 153, 785–796 (2013).

41. 41.

Krylov, S. N. et al. Correlating cell cycle with metabolism in single cells: combination of image and metabolic cytometry. Cytometry 37, 14–20 (1999).

42. 42.

Heaster, T. M., Walsh, A. J., Zhao, Y., Hiebert, S. W. & Skala, M. C. Autofluorescence imaging identifies tumor cell-cycle status on a single-cell level. J. Biophotonics 11, e201600276 (2017).

43. 43.

Chen, C. L. et al. Deep learning in label-free cell classification. Sci. Rep. 6, 21471 (2016).

44. 44.

Blasi, T. et al. Label-free cell cycle analysis for high-throughput imaging flow cytometry. Nat. Commun. 7, 10256 (2016).

45. 45.

Kelly, B. & O’Neill, L. A. Metabolic reprogramming in macrophages and dendritic cells in innate immunity. Cell Res. 25, 771–784 (2015).

46. 46.

Gavgiotaki, E. et al. Detection of the T cell activation state using non-linear optical microscopy. J. Biophotonics 12, e201800277 (2018).

47. 47.

Janssen, E. M. et al. CD4+ T cells are required for secondary expansion and memory in CD8+ T lymphocytes. Nature 421, 852–856 (2003).

48. 48.

Takahashi, T. et al. Immunologic self-tolerance maintained by CD25+CD4+ regulatory T cells constitutively expressing cytotoxic T lymphocyte-associated antigen 4. J. Exp. Med. 192, 303–310 (2000).

49. 49.

Dieckmann, D., Plottner, H., Berchtold, S., Berger, T. & Schuler, G. Ex vivo isolation and characterization of CD4+CD25+ T cells with regulatory properties from human blood. J. Exp. Med. 193, 1303–1310 (2001).

50. 50.

Naito, Y. et al. CD8+ T cells infiltrated within cancer cell nests as a prognostic factor in human colorectal cancer. Cancer Res. 58, 3491–3494 (1998).

51. 51.

Gerriets, V. A. & Rathmell, J. C. Metabolic pathways in T cell fate and function. Trends Immunol. 33, 168–173 (2012).

52. 52.

Bird, D. K. et al. Metabolic mapping of MCF10A human breast cells via multiphoton fluorescence lifetime imaging of the coenzyme NADH. Cancer Res. 65, 8766–8773 (2005).

53. 53.

Walsh, A. J. & Skala, M. C. Optical metabolic imaging quantifies heterogeneous cell populations. Biomed. Opt. Express 6, 559–573 (2015).

54. 54.

Walsh, A. J. & Skala, M. C. An automated image processing routine for segmentation of cell cytoplasms in high-resolution autofluorescence images. in Proc. Multiphoton Microscopy in the Biomedical Sciences XIV (Eds Periasamy, A. et al.) 161–166 (SPIE, 2014).

## Acknowledgements

We thank A. Movaghar for discussions of feature selection and machine learning classification methods and R. Schmitz for her assistance with formatting figures. This research was funded by the NIH (grant nos. R01 CA185747, R01 CA205101 and R01 CA211082, to M.C.S.); the Biotechnology Training Program of the National Institute of General Medical Sciences of the National Institutes of Health (no. T32GM008349, to K.P.M.); NIH awards (nos. R01DK098672 and R35GM131795, to D.J.P.; and T32DK007665, to N.M.N.); the NSF Graduate Research Fellowship Program (no. DGE-1747503, to K.P.M); and the National Science Foundation (no. EEC-1648035, to K.S.).

## Author information

Authors

### Contributions

A.J.W. and M.C.S. conceived the central hypotheses and K.P.M. contributed the hypothesis on distinguishing between CD3+CD8+ naive versus memory-T-cell autofluorescence properties. K.P.M. and A.J.W. designed and performed the experiments with assistance from K.T. and N.J.P.; K.T., A.J.W. and I.J. analysed the data. N.M.N. and K.P.M. performed the Seahorse assay. C.M.W. provided statistical insight and data analysis code. K.S. and M.C.S. supervised the project. A.J.W. wrote the initial draft of the manuscript. All of the authors contributed to data interpretation and the final manuscript.

### Corresponding authors

Correspondence to Alex J. Walsh or Melissa C. Skala.

## Ethics declarations

### Competing interests

A.J.W. and M.C.S. are listed as co-inventors in a patent application (Systems and methods for sorting T cells by activation state; 62/724428; August 2018; Wisconsin Alumni Research Foundation) covering devices and methods to sort T cells on the basis of fluorescence lifetime components.

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Supplementary information

### Supplementary Information

Supplementary note, figures and tables.

## Rights and permissions

Reprints and Permissions

Walsh, A.J., Mueller, K.P., Tweed, K. et al. Classification of T-cell activation via autofluorescence lifetime imaging. Nat Biomed Eng (2020). https://doi.org/10.1038/s41551-020-0592-z

• Accepted:

• Published: