a, Heatmap showing expression of marker genes for the 14 T-/NK-cell phenotypes. b, UMAP color-coded for marker gene expression of T-/NK-cell phenotypes. c, Heatmap showing expression of functional genes in the 14 T-/NK-cell phenotypes. d, UMAP depicting the T-cell phenotypes detected in the proliferative T-cell subcluster. e, Heatmap showing marker gene expression for TREG, CD4+ and CD8+ TEX-cells in the proliferative T-cell subcluster. f, T-/NK-cell phenotypes after assigning proliferating T-cells to their respective subtype (CD4+, CD8+ TEX-cells and CD4+ TREG). g, Relative contribution (in %) of each T-cell phenotype in on-treatment biopsies, comparing Es (n = 9) versus NEs (n = 20). h, UMAP showing all T-cell clonotypes expanding on-treatment (left panel) and pie charts showing the distribution of expanding T-cells across T-cell phenotypes (right panel) in Es. Each clonotype on the UMAP has a specific color and clonotypes in pre- and on-treatment tissues are shown separately. i, T-cell clonality, Gini index and T-cell clonality of each T-cell phenotype both pre- (upper panel) and on-treatment (lower panel), comparing Es (n = 9) versus NEs (n = 20). j, ROC curves for the indicated parameter pre-treatment to predict T-cell expansion. AUC values and 95% confidence intervals are shown. Panels g and i: exact P values by two-sided Mann-Whitney test or Wilcoxon matched-pairs signed rank test for paired samples (pre- versus on-treatment); *P < 0.05, *P < 0.01, ***P < 0.001. Panels g and i: box, median ± interquartile range; whiskers, minimum and maximum.