*2.1. Cohort Characteristics*

We restricted analysis to participants who had samples at TB diagnosis and two months post ATT to allow the determination of changes in the activation and functional phenotype of *Mtb*-specific T-cells due to ATT. We enrolled 43 participants with pulmonary TB and excluded samples from 14 participants due to poor specimen viability (n = 6) and technical (instrument/processing) errors (n = 8, Figure 1). A total of 30 samples were analyzed: 12 HIV positive (HIV+TB), 9 HIV negative (HIV−TB) and 9 HIV-LTBI. HIV+TB participants had a median age of 39 years (Q1, Q3: 33, 48) and had been on ART for a median of 1.3 years (Q1, Q3 0.2, 6, Table 1). All participants reported a cough at baseline and had culture negative results after two months of ATT.

**Figure 1.** Study flow diagram. Samples were excluded for the following reasons: no follow-up sample available (n = 7), poor sample viability (n = 6), or technical errors (n = 8).

**Table 1.** Baseline characteristics of the study participants.


1 Viral load results for three participants with detectable viral load at baseline; one had been on ART for 1.9 years and two were not on ART at the time, but were initiated on Dolutegravir (DTG)-based ART two weeks after ATT. By the two-month study visit, all patients had viral load results below 40 copies/mL.

### *2.2. Single IFN-*γ *and Dual IFN-*γ/*TNF*α *Response Characterizes Active Tuberculosis Regardless of HIV Status*

We compared the magnitude of cytokine responses between TB and LTBI participants. Representative dot plots of the cytokine response to the four stimulation conditions are shown in the top panel of Figure 2A. At the time of TB diagnosis, IL-2−IFN-γ+TNFα+CD4<sup>+</sup> T-cell responses to ESAT-6/CFP-10 stimulation were significantly higher in TB compared to LTBI but did not differ by HIV status (Figure 2B).

In a similar manner, single IFN-γ<sup>+</sup> responses were higher for both HIV+TB (*p* = 0.01) and HIV−TB (*p* = 0.001) compared to LTBI (Figure 2). There was no difference in the frequencies of polyfunctional (*p* = 0.12) or single IFN-γ responses between HIV+TB and HIV−TB (*p* = 0.33). This was also reflected in the combinatorial polyfunctionality analysis of antigen-specific T-cells (COMPASS) heatmap (Figure 3A), which showed similar probabilities for the polyfunctional and dual expression of IFN-γ/TNFα for both TB groups. We compared the polyfunctionality score (PFS) across groups, which summarizes the functional profile of each participant by calculating the posterior probabilities of antigen-specific responses [19]. There was no difference in the polyfunctional scores (PFS) by either TB or HIV status (*p* = 0.07, Figure 3B). Interestingly, when we analyzed Gag stimulated CD8+ T-cells, no polyfunctional responses were observed, instead, responses were characterized by single IFN-γ expression (Supplementary Figure S2A). We also found an increase in the PFS of ESAT-6/CFP-10-stimulated CD4+ T-cells at 2 months post ATT only in the HIV+TB (*p* = 0.02 compared to baseline PFS, Figure 3C), but not in HIV−TB (*p* = 0.72, Figure 3D). We did not observe any other differences in the cytokine profile between the baseline and two-month timepoint (results not shown). These data sugges<sup>t</sup> that the frequency of polyfunctional *Mtb*-specific T-cells may not immediately reflect the reduction in mycobacterial burden due to TB treatment.

**Figure 2.** Comparison of the polyfunctional capacity of ESAT-6/CFP-10 CD4+ T-cells between HIV+TB, HIV−TB, and LTBI. (**A**) Representative plot of the expression of IL-2, *IFN-*γ, and TNFα in an HIV+TB participant. NS = unstimulated, ESCF = ESAT-6/CFP-10, MtbLy = Mtb-Lysate, PHA = Phytohemaglutinin. (**B**) Frequencies of CD4+ T-cells producing any of the possible combinations of IL-2, *IFN-*γ, and TNFα in response to ESAT-6/CFP-10 stimulation. Horizontal bars show the median and first and third quartile (Q1, Q3). Only statistically significant differences by the Kruskal–Wallis test with Dunn's correction for multiple comparisons are shown on the graph.

We also compared CD4 responses in the HIV+TB participants across stimulation conditions and observed that the relative proportions of polyfunctional and single TNFα response were highest on Mtb-Lysate-stimulated cells compared to Gag (*p* = 0.03; Figure 4A). In addition, dual IFN-γ/TNFα was higher on Mtb-Lysate (*p* = 0.002) and ESAT-6/CFP-10 (*p* = 0.05) compared to Gag-stimulated CD4+ T-cells (Figure 4B). This was also reflected on the COMPASS heatmap that showed similar PFS with no distinct cytokine patterns separating the groups analyzed (Supplementary Figure S2B). We further analyzed the functional profile of *Mtb*-specific CD4+ T-cells by comparing the MFI of TNFα on total cytokine+ cells. While the TNFα MFI on ESAT-6/CFP-10 stimulated CD4+ T-cells did not differ by HIV or TB status (*p* = 0.15, results not shown), we observed a decline at two months of TB treatment in HIV−TB (*p* = 0.02) but not HIV+TB (*p* = 0.27) (Supplementary Figure S3).

**Figure 3.** Polyfunctionality analysis of ESAT-6/CFP-10 specific CD4+ T-cell responses (**A**) Heatmap of combinatorial polyfunctionality analysis of antigen-specific T-cells (COMPASS) posterior probabilities of the distribution of responses in ESAT-6/CFP-10 stimulated CD4+ T-cells. Columns correspond to the different cell subsets modeled using the COMPASS package in R [19], color coded by the cytokines they express (white = "off", shaded = "on", grouped by color = "degree of polyfunctionality") ordered by degree of functionality from one function on the left to all three functions on the right (shaded from light blue to green on the bottom). Rows correspond to participants; one on each line, the color of each cell represents the probability (range 0–1) that the cell subset exhibits an antigen-specific response. Each cell of the heatmap shows the probability that a given cell-subset (column) has an antigen-specific response in the corresponding participant (the groups are coded on the right of the heatmap; pink = HIV+TB, blue = HIV−TB, and green = LTBI). Plots of polyfunctional scores (PFS) stratified by patient group (**B**) and timepoint for HIV+TB (**C**) and HIV−TB (**D**)**.** Red dots represent HIV+TB, blue dots HIV−TB, and black dots LTBI. Differences between groups were compared using the Kruskal–Wallis test with Dunn's correction for multiple comparisons are shown on the graph. We assessed differences between timepoints using the Wilcoxon signed-rank test.

**Figure 4.** Functional analysis of HIV+TB. The functional profile of CD4+ T-cells specific for different antigens was assessed for CD4+ T-cells from HIV+TB patients at the time of TB diagnosis. (**A**) Each slice of the pie corresponds to a distinct combination of cytokines shown in (**B**) and defined by Boolean analysis in FlowJo. A key to the colors used for the arcs in the pie charts is shown on the top right. Pie charts were compared using the SPICE permutation test with *p* < 0.05 considered significant. (**B**) Frequency of cells producing any possible combination of IFN-γ, IL-2, or TNFα in response to the different stimulations. Horizontal bars represent median and interquartile range (IQR). Statistical comparisons were made using Kruskal–Wallis with Dunn's test for multiple comparisons. MtbLy = Mtb-Lysate; ESCF = ESAT-6/CFP-10.

### *2.3. Frequencies of CD38*+*HLA-DR*+*CD4*+ *T-cells Are Elevated in Active TB Participants Regardless of HIV Status and Decline after Two Months of TB Treatment*

We hypothesized that the activation profile of *Mtb*-specific CD4+ T-cells might differ by HIV status. We evaluated the expression of CD38, HLA-DR, and Ki67 alone or in combination on ESAT-6/CFP-10, Mtb-Lysate, and Gag-stimulated total cytokine+CD4+ T-cells. Representative dot plots of the expression of CD38, HLA-DR, and Ki67 on total cytokine CD4+ T-cells are shown in Figure 5A. All individuals tested had a positive CD4+T-cell response to Mtb-Lysate while 9/12 (75%) HIV+TB and 8/9 (89%) LTBI individuals had responses to ESAT-6/CFP10. We observed on ESAT-6/CFP-10-stimulated CD4+ T-cells that the triple expression of CD38+HLA-DR+Ki67+ was associated with active TB only in HIV+TB participants when compared to LTBI (*p* = 0.01), although there was no difference between HIV+TB and HIV−TB (*p* = 0.12; Figure 5B). On Mtb-Lysate stimulated cells, differences in the expression of CD38+HLA-DR+KI67+ CD4+ T-cells were observed between HIV+TB and LTBI (*p* = 0.002) and HIV−TB and LTBI (*p* = 0.04, Figure 5C).

In addition, the predictive ability of the triple activation profile in discriminating active from latent TB was high only in HIV+TB (AUC = 0.86, 95% CI 0.68–1.00, *p* = 0.01, Figure 6A), corresponding to a sensitivity of 78% (95% CI 45–96) and a specificity of 75% (95% CI 41–96) at a cut-off of 1.8%. The sensitivity in HIV−TB was low at the same cut-off (33% vs. 78%) with comparable specificity (75%) and an AUC = 0.68 (95% CI 0.42–0.96, *p* = 0.19, Figure 6B). Sensitivity improved with Mtb-Lysate stimulation to 100% (95% CI 74–100) for HIV+TB with similar specificity (80%, 95% CI 38–99) at a cut-off value of 0.30 (results not shown). In contrast, CD38+HLA-DR+Ki67− expression on ESAT-6/CFP-10-stimulated CD4+ T-cells had a high sensitivity for both HIV+TB (100%, 95% CI 70–100) and HIV−TB (100%, 95% CI 70–100) and modest specificity (63%, 95% CI 31–86 for HIV+TB and 88%, 95% CI 53–99 for HIV−TB) at a cut-off value of 5% and 13%, respectively. The corresponding ROC curves are shown in Figure 6C,D. On Gag-stimulated CD4+ T-cells of HIV+TB, the dominant activation

profile was CD38+HLA-DR−Ki67<sup>−</sup>, similar to bulk CD4+ T-cells (results not shown) while CD8+ T-cells showed both CD38+HLA-DR+Ki67− and CD38+HLA-DR−Ki67− phenotypes (results not shown). When we evaluated the effect of TB treatment on the activation profile of ESAT-6/CFP-10-stimulated CD4+ T-cells, we observed significant declines in the proportion of CD38+HLA-DR+ CD4+ T-cells of HIV−TB (*p* = 0.001, Supplementary Figure S4A). In HIV+TB, only the CD38+HLA-DR+Ki67+ phenotype on ESAT-6/CFP-10 stimulated CD4+ T-cells declined at two months (*p* = 0.04, Supplementary Figure S4B). On Gag stimulated total cytokine+ CD8+ T-cells, we did not observe significant declines in the frequencies of cells expressing the CD38+HLA-DR+Ki67− (*p* = 0.69) or CD38+HLA-DR−Ki67− (*p* = 0.78) phenotypes (Supplementary Figure S4C).

**Figure 5.** Comparison of the activation profiles of *Mtb*-specific CD4+ T-cells between HIV+TB, HIV−TB, and LTBI participants. (**A**) Representative dot plots of the activation profile on CD4+ T-cells of an HIV+TB patient in response to ESAT-6/CFP-10 stimulation. The proportion of each subset on ESAT-6/CFP-10 (**B**) and Mtb-Lysate (**C**) stimulated total cytokine+CD4+ T-cells. Statistical comparisons were made using the Kruskal–Wallis with Dunn's test for multiple comparisons. We used Boolean gates to derive all possible combinations of the co-expressed markers.

**Figure 6. Receiver operating characteristics** (ROC) curve analysis of the activation phenotype on total cytokine producing CD4+ T-cells for discriminating between TB and LTBI. Phenotypic analysis was only conducted in participants with a positive ESAT-6/CFP-10 response defined by a false discovery rate (FDR) < 0.05 using mixture models for single cell assays (MIMOSA) analysis: HIV+TB (n = 9); HIV−TB (n = 9); LTBI (n = 8). Comparison of the area under the curve for the phenotype CD38+HLA-DR+Ki67+ (top panel, **A**,**B**) and CD38+HLA-DR+Ki67- (bottom panel, **C**,**D**) in HIV+TB (red) and HIV−TB (blue). ROC curve analysis was done in Prism. The area under the curve (AUC) and p-values are shown. The dotted lines represent an AUC of 0.5.

### *2.4. A High CD27MFI Ratio Discriminates Active TB from Latent TB and Declines after Two Months of TB Treatment*

To assess the effect of active disease on the memory phenotype of *Mtb*-specific CD4+ T-cells, we analyzed the Boolean combination of CD27, KLRG1, CD45RA, and CCR7 (Figure 7A shows representative dot plots). However, KLRG1 added no further information to the classification of memory subsets, therefore we used CD27, CD45RA, and CCR7 to define the memory phenotype. In agreemen<sup>t</sup> with previous reports, CD27 expression was downregulated on ESAT-6/CFP-10-stimulated CD4+ T-cells with an effector memory phenotype characterized by a high proportion of CD27−CD45RA−CCR7− within the total cytokine+ compartment (*p* < 0.001 for HIV−TB vs. LTBI and *p* = 0.02 for HIV+TB vs. LTBI, Figure 7B). In contrast, Gag-stimulated CD4+ T-cells were predominantly of a central memory phenotype (CD27+CD45RA−CCR7+; Supplementary Figure S5) with a dominant transitional memory phenotype (CD27+CD45RA+/−CCR7−; results not shown) observed on CD8+ T-cells. We did not observe statistically significant differences when we assessed the effect of TB treatment on the memory phenotype of ESAT-6/CFP-10-stimulated T-cells (Figure 7C,D).

**Figure 7.** Comparison of the memory phenotype of ESAT-6/CFP-10-stimulated CD4+ T-cells between active TB and LTBI participants. (**A**) Representative plot of the total cytokine production in the memory compartment in response to ESAT-6/CFP-10 stimulation at baseline and two months (fu) timepoints. (**B**) Comparison of the memory phenotype of ESAT-6/CFP-10 stimulated total cytokine+CD4+cells between HIV+TB and HIV−TB. Changes in the memory phenotype between baseline and two months of TB treatment in HIV+TB (red, (**C**)) and HIV−TB (blue, (**D**)). Statistical comparisons were made using Kruskal–Wallis with Dunn's test for multiple comparisons. Differences between time points were assessed using the Wilcoxon signed rank test.

We next evaluated CD27 expression as a ratio of the MFI of CD27 on CD4+ T-cells to that of CD27 on total cytokine+ CD4+ T-cells, using a modification of the calculation as suggested by Portevin et al. [10]. We observed that a high ratio was associated with active TB on ESAT-6/CFP-10 (*p* = 0.01 for HIV−TB vs. LTBI and *p* = 0.05 for HIV+TB vs. LTBI, Figure 8A), but not the Mtb-Lysate stimulated CD4+ T-cells (*p* = 0.10; results not shown). Significant declines in the ratio on ESAT-6/CFP-10-specific CD4+ T-cells were observed at two months of treatment in both HIV+TB (*p* = 0.02, Figure 8B) and HIV−TB (*p* = 0.004, Figure 8C). This decline was also observed on Gag stimulated CD8+T-cells of HIV+TB (*p* = 0.03, Figure 8D). We then assessed the diagnostic accuracy of using the CD27 MFI ratio on ESAT-6/CFP-10 stimulated CD4+ T-cells and found comparable sensitivity in HIV−TB (67%, 95% CI 35–88) and HIV+TB (63%, 95% CI 31–86) at a cut-off of 1.4. The corresponding ROC curves are shown in Figure 8E,F. Overall, our results sugges<sup>t</sup> that an approach using the CD27MFI ratio on ESAT-6/CFP-10-specific total cytokine+ CD4+ T-cells could be used to discriminate between disease and infection in HIV-uninfected individuals and monitor treatment response during active TB, regardless of HIV status.

**Figure 8.** Sensitivity of the CD27MFI ratio on ESAT-6/CFP-10-specific CD4+ T-cells to detect active TB. (**A**) Comparison of the CD27MFI ratio between active TB and latent TB. CD27MFI ratio was calculated as the CD27MFI on bulk CD4 T-cells divided by CD27MFI on total cytokine+ CD4+ T-cells. Change in the CD27 MFI ratio of total cytokine+CD4+ T-cells between baseline and two months of TB treatment in (**B**) HIV+TB, (**C**) HIV−TB, and Gag-stimulated total cytokine+CD8+T-cells (**D**). Differences between time points were assessed using the Wilcoxon signed rank test. (**E**) and (**F**) show the receiver operating characteristics (ROC) curves of the CD27 MFI ratio in HIV−TB (blue) and HIV+TB (red), respectively, as assessed by the ROC curve analysis in Prism. The dotted lines represent an area under the curve (AUC) of 0.5.
