a, Comparison of differentially expressed genes between human cancer and viral specific CD8 T cell subsets. RNA-seq from cancer subsets compared to RNA-seq data collected from yellow fever (YF) antigen specific CD8 T cells (GSE100745) during effector (14 days post-vaccination) and memory (4+ years post-vaccination) time points. The number of differentially expressed genes (DEG) versus naive CD8 T cells was determined using DESeq2. Venn diagrams show number of DEG shared or unique between viral and cancer subsets. Although the cancer subsets of T cells share many genes with the YF specific cells, there are also many distinct genes only expressed in cancer T cell subsets. b, DEGs were clustered using cluster affinity search technique (CAST). Clusters with greater than 5% of total genes are shown. Heat map shows z-score of averages from each group. c, Principal component analysis of T cell subsets form cancer and viral-specific CD8 T cells, performed on genes that were differentially expressed in any group versus naive cells. d, Comparison of cancer subsets to transient effector programs found in YF specific T cells. Previously we have identified transient gene expression signatures that are expressed in YF-specific effector cells, but return to a naive state after antigen is cleared. These genes not expressed in memory or naive cells are highly expressed in both cancer subsets suggesting a similarity to an effector cell. e, Pairwise comparison of transient effector program genes between effector and cancer subsets shows the relationship of this subset of genes re-initiated program (blue) and the transient effector program (red) compared between YF and cancer subsets. Dotted 45-degree line represents equal fold change versus a naive CD8 T cell in cancer and yellow fever cells. f, GSEA and network analysis of pathways associated with differentiation. Gene set enrichment performed with GSEA and visualized with Cytoscape. The most significant networks are shown. Red indicates enrichment of nodes in terminally differentiated T cells, while blue shows enrichment in stem-like T cells. g, Histogram shows the distribution of the continuous region size of DMRs. h, Histograms show the relative frequency of DMRs within 10kb of transcription start sites. i, Global changes in methylation. Violin plots show the distribution of total methylation within identified DMRs in naïve, stem-like, and terminally differentiated cells. j, DMR patterns of differentiation. DMRs identified in Fig. 2d were clustered using CAST. Box plots show the interquartile range and mean of DMRs in each cluster by cell type k, Histograms show the total methylation from 0–100% in regions near important genes. Dot plots show the methylation of each CpG motif within highlighted regions of interest. l, Transcriptionally active transcription factors have over-represented binding in epigenetically modified regions of chromatin. Plots show the enrichment of transcription factor binding sites within differentially methylated regions in each cell type on the x-axis, and the y-axis shows the enrichment of transcription factor binding sites within the promoters of differentially expressed genes. Colour of dots represents the relative expression in stem-like (green) or terminally differentiated (red) cells, and the size of the dot is proportional to total expression of the transcription factor.