Software

library(Seurat)
library(tidyverse)
library(patchwork)
library(pheatmap)
library(RColorBrewer)
library(data.table)
library(knitr)
library(presto)

Data

Input: Pre-processed Seurat object of integrated thymocyte and T-cell subsets from canine thymus and lymph node.

setwd("/Users/eileen/PTCL/Single-cell-RNA-seq")
all_Tcells <- readRDS(file = "integrated_Tcells.Rdata")
all_Tcells <- FindNeighbors(all_Tcells, dims = 1:10)
all_Tcells <- FindClusters(all_Tcells, resolution = 0.2)
all_Tcells <- RunUMAP(all_Tcells, dims = 1:10)

DimPlot(all_Tcells,
        reduction = "umap",
        group.by = "OriginalClusters",
        label = TRUE,
        label.size = 3,
        label.box = TRUE) + plot_annotation(title= "Merged Canine T cells from Lymph Node and Thymus,\nOriginal Cluster IDs")

Top cluster markers

Tcell.markers <- FindAllMarkers(all_Tcells, only.pos=TRUE)
write.csv(Tcell.markers, file="mergedLnAndThymTCells_DEfeaturesByUMAPcluster_0.2.csv") # export
key.genes <- Tcell.markers[!grepl("ENSCAFG", row.names(Tcell.markers)),]
key.genes.sortedByPval <- key.genes[order(key.genes$p_val),]
features <- key.genes.sortedByPval %>% group_by(cluster) %>% do(head(., n=5))
features <- as.data.frame(features[!duplicated(features$gene),]) # prioritize unique clusters

DotPlot(all_Tcells,
        assay = "RNA",
        features = rev(features$gene),
        scale = TRUE) + 
  geom_point(aes(size=pct.exp), shape = 21, colour="black", stroke=0.5) +
  labs(y = "Cluster") +
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) +
  scale_color_gradientn(colours = rev(brewer.pal(name = "Spectral", n=11)))

Feature plots

T cells

Confirm that all clusters express T-cell marker CD3 and CD45RA.

FeaturePlot(all_Tcells,
            reduction = "umap",
            features = c("CD3E", "PTPRC")) +
  plot_annotation(title = "Merged Canine T-cells from Lymph Node and Thymus", theme = 
                    theme(plot.title = element_text(hjust = 0.5, size = 20))) &
  scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))

Early thymic progenitors

In humans and mice, the earliest lymphoid progenitor cells express c-kit and Flt3. CD34 is widely utilized as a marker of hematopoietic progenitor cells in dogs. DNTT encodes a terminal deoxynucleotidyl transferase (TdT), whose expression is normally restricted to primitive lymphocytes in the thymus and bone marrow. In the thymus, it plays a role in the TCR rearrangement, typically expressed in DN and double positive (DP) thymocytes and downregulated as T cells mature to single positive (SP) cells.

FeaturePlot(all_Tcells,
            reduction = "umap",
            features = c("CD34", "KIT", "FLT3", "DNTT", "ALPL")) +
  plot_annotation(title = "Merged Canine T-cells from Lymph Node and Thymus:\nExpression of HSC and Early Thymocyte Progenitor (ETP) Markers", theme = theme(plot.title = element_text(hjust = 0.5, size = 20))) &
  scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))

Double negative thymocytes

DN thymocytes should lack expression of CD4 and CD8. Four stages comprise the double negative (DN) thymocytes, distinguished by their variable expression of CD44 and CD25 (IL2RA). DN1 thymocytes are CD25-CD44+, DN2 thymocytes are CD25+CD44+, DN3 thymocytes are CD44-CD25, and DN4 thymocytes are CD44-CD25-. After this downregulation in the late DN stages, CD44 will again be expressed in SP thymocytes and is also a common marker of activation of mature T cells.

FeaturePlot(all_Tcells,
            reduction = "umap",
            features = c("CD4", "CD8A", "CD44", "IL2RA")) +
  plot_annotation(title = "Merged Canine T-cells from Lymph Node and Thymus:\nExpression of Double Negative (DN) Thymocyte Markers", theme = theme(plot.title = element_text(hjust = 0.5, size = 20))) &
  scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))

Between the DN2 and DN3 stage, thymocytes rearrange their TCR to become committed to either the α/β or γ/δ T-cell lineage. Rearrangement of the TCR is facilitated by enzymes RAG1 and RAG2. The TCRβ chain is rearranged first, and prior to TCRα chain rearrangement, it associates with the invariant pre-Tα (PTCRA) chain and CD3 molecules to form the pre-TCR. DN3 cells that pass β-selection will lose expression of CD25 and CD44 to become DN4 cells. DNTT encodes a terminal deoxynucleotidyl transferase (TdT), whose expression is normally restricted to primitive lymphocytes in the thymus and bone marrow. In the thymus, it plays a role in the TCR rearrangement, typically expressed in DN and double positive (DP) thymocytes and downregulated as T cells mature to single positive (SP) cells.

FeaturePlot(all_Tcells,
            reduction = "umap",
            ncol = 3,
            features = c("CD4", "CD8A", "RAG1", "RAG2", "PTCRA", "DNTT")) +
  plot_annotation(title = "Merged Canine T-cells from Lymph Node and Thymus:\nExpression of Double Negative (DN) Thymocyte Markers", theme = theme(plot.title = element_text(hjust = 0.5, size = 20))) &
  scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))

DN4 thymocytes undergo a proliferative burst, which may be identified by expression of Ki67:

FeaturePlot(all_Tcells,
            reduction = "umap",
            features = c("MKI67")) +
  scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))

Double positive thymocytes

DP thymocytes should express CD4 and CD8. In mice, CCR9 is not expressed at earlier stages of thymocyte development but begins to appear around the DN3 stage, is expressed by most DP thymocytes, and is subsequently downregulated from the DP to SP stages, although a small subset of CD8+ T cells in the periphery retain CCR9 expression. In cynomolgus monkeys, CD1 is expressed in DN and DP thymocytes, then downregulated as cells progress to the SP stages.

FeaturePlot(all_Tcells,
            reduction = "umap",
            features = c("CD4", "CD8A", "ENSCAFG00000007461", "CCR9", "CD1C")) +
  plot_annotation(title = "Merged Canine T-cells from Lymph Node and Thymus:\nExpression of Double Positive Thymocyte Markers", theme = theme(plot.title = element_text(hjust = 0.5, size = 20))) &
  scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))

Single positive thymocytes

SP thymocytes should express either CD4 (mediated by transcription factors GATA3 and THPOK, encoded by ZBTB7B) or CD8 (mediated by transcription factor RUNX3). The IL-7/STAT5 axis acts upstream of Runx3 to enhance its expression and promote CD8+ differentiation. During terminal maturation, CD4+ and CD8+ T cells start expressing sphingosine 1 phosphate receptor (S1PR1) which promotes egress from the thymus and entry into circulation.

FeaturePlot(all_Tcells,
            reduction = "umap",
            ncol = 3,
            features = c("CD4", "CD8A", "ENSCAFG00000007461", "GATA3", "ZBTB7B", "RUNX3", "S1PR1")) +
  plot_annotation(title = "Merged Canine T-cells from Lymph Node and Thymus:\nExpression of Single Positive Thymocyte Markers", theme = theme(plot.title = element_text(hjust = 0.5, size = 20))) &
  scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))

Naive T cells

The homing molecule L-selectin (encoded by SELL) is primarily expressed by naive T cells and is downregulated following engagement of the TCR by antigen. Another homing molecule expressed by naive T cells is CCR7.

FeaturePlot(all_Tcells, 
            reduction = "umap",
            ncol = 2,
            features = c("SELL", "CCR7")) +
  plot_annotation(title = "Merged Canine T-cells from Lymph Node and Thymus:\nExpression of Markers of Naive T Cells", theme = theme(plot.title = element_text(hjust = 0.5, size = 20))) &
  scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))

Mature, activated T cells

In mature T cells, LY6E is a marker for T-cell activation. T cells rapidly upregulate adhesion molecule CD44 after antigen encounter/activation. The culmination of T-cell activation is their clonal expansion as a result of their secretion of IL-2. T cells increasingly upregulate inhibitory molecules CTLA-4 and LGALS3 after stimulation. CD7 is a marker for mature T cells but is also expressed by NK cells. CD122 (IL2RB) tends to be expressed more highly in activated T cells than naive T cells. Expression of transcription factor MAF increases after TCR stimulation and drives further differentiation of various T-helper cell subsets. ICOS is one of the costimulatory signals when engaged during T-cell activation.

FeaturePlot(all_Tcells, 
            reduction = "umap",
            ncol = 3,
            features = c("LY6E", "CD7", "CD44", "IL2", "CTLA4", "LGALS3", "LTB", "IL2RB", "MAF", "ICOS")) +
  plot_annotation(title = "Merged Canine T-cells from Lymph Node and Thymus:\nExpression of Markers of T-cell Maturity", theme = theme(plot.title = element_text(hjust = 0.5, size = 20))) &
  scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))

Mature T-cell subtypes

FeaturePlot(all_Tcells, 
            reduction = "umap",
            ncol = 3,
            features = c("CD4", "TBX21", "STAT4", "STAT1", "IFNG", "IL12RB1", "IL12RB2", "TNFA", "TNFB", "CXCR3")) +
  plot_annotation(title = "Merged Canine T-cells from Lymph Node and Thymus:\nExpression of Canonical Th1 Markers", theme = theme(plot.title = element_text(hjust = 0.5, size = 20))) &
  scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))

FeaturePlot(all_Tcells, 
            reduction = "umap",
            ncol = 3,
            features = c("CD4", "GATA3", "STAT6", "IL4", "IL4R", "CCR4")) +
  plot_annotation(title = "Merged Canine T-cells from Lymph Node and Thymus:\nExpression of Canonical Th2 Markers", theme = theme(plot.title = element_text(hjust = 0.5, size = 20))) &
  scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))

FeaturePlot(all_Tcells, 
            reduction = "umap",
            ncol = 2,
            features = c("CD4", "IL2RA", "FOXP3", "IL10")) +
  plot_annotation(title = "Merged Canine T-cells from Lymph Node and Thymus:\nExpression of Canonical Treg Markers", theme = theme(plot.title = element_text(hjust = 0.5, size = 20))) &
  scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))

FeaturePlot(all_Tcells, 
            reduction = "umap",
            ncol = 3,
            features = c("CD4", "RORC", "IL22", "IL23R", "IL23A", "AHR", "TGFBR1", "TGFBR2", "STAT3")) +
  plot_annotation(title = "Merged Canine T-cells from Lymph Node and Thymus:\nExpression of Canonical Th17 Markers", theme = theme(plot.title = element_text(hjust = 0.5, size = 20))) &
  scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))

FeaturePlot(all_Tcells, 
            reduction = "umap",
            ncol = 2,
            features = c("CD4", "IRF4", "SPI1", "STAT6")) +
  plot_annotation(title = "Merged Canine T-cells from Lymph Node and Thymus:\nExpression of Canonical Th9 Markers", theme = theme(plot.title = element_text(hjust = 0.5, size = 20))) &
  scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))

FeaturePlot(all_Tcells, 
            reduction = "umap",
            ncol = 2,
            features = c("CD4", "AHR", "RORC", "IL22")) +
  plot_annotation(title = "Merged Canine T-cells from Lymph Node and Thymus:\nExpression of Canonical Th22 Markers", theme = theme(plot.title = element_text(hjust = 0.5, size = 20))) &
  scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))

FeaturePlot(all_Tcells,
            reduction = "umap",
            features = c("CD69", "ITGA1", "ITGAE")) +
  plot_annotation(title = "Merged Canine T-cells from Lymph Node and Thymus:\nExpression of Canonical Memory T Cell Markers", theme = theme(plot.title = element_text(hjust = 0.5, size = 20))) &
  scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))

FeaturePlot(all_Tcells,
            reduction = "umap",
            features = c("KLRD1", "NCR3", "GZMA", "CCL5", "KLRK1", "FCER1G", "EOMES", "CD96", "GZMK")) +
  plot_annotation(title = "Merged Canine T-cells from Lymph Node and Thymus:\nExpression of CD8 T / NK Cell Markers", theme = theme(plot.title = element_text(hjust = 0.5, size = 20))) &
  scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))

Citations

sessionInfo()
## R version 4.4.0 (2024-04-24)
## Platform: aarch64-apple-darwin20
## Running under: macOS Sonoma 14.6.1
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRblas.0.dylib 
## LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.0
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## time zone: America/Denver
## tzcode source: internal
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] presto_1.0.0       Rcpp_1.0.14        knitr_1.47         data.table_1.16.4 
##  [5] RColorBrewer_1.1-3 pheatmap_1.0.12    patchwork_1.2.0    lubridate_1.9.3   
##  [9] forcats_1.0.0      stringr_1.5.1      dplyr_1.1.4        purrr_1.0.2       
## [13] readr_2.1.5        tidyr_1.3.1        tibble_3.2.1       ggplot2_3.5.1     
## [17] tidyverse_2.0.0    Seurat_5.2.0       SeuratObject_5.0.2 sp_2.1-4          
## 
## loaded via a namespace (and not attached):
##   [1] rstudioapi_0.16.0      jsonlite_1.8.8         magrittr_2.0.3        
##   [4] spatstat.utils_3.1-2   farver_2.1.2           rmarkdown_2.27        
##   [7] vctrs_0.6.5            ROCR_1.0-11            spatstat.explore_3.3-4
##  [10] htmltools_0.5.8.1      sass_0.4.9             sctransform_0.4.1     
##  [13] parallelly_1.41.0      KernSmooth_2.23-24     bslib_0.7.0           
##  [16] htmlwidgets_1.6.4      ica_1.0-3              plyr_1.8.9            
##  [19] plotly_4.10.4          zoo_1.8-12             cachem_1.1.0          
##  [22] igraph_2.0.3           mime_0.12              lifecycle_1.0.4       
##  [25] pkgconfig_2.0.3        Matrix_1.7-0           R6_2.5.1              
##  [28] fastmap_1.2.0          fitdistrplus_1.2-2     future_1.34.0         
##  [31] shiny_1.8.1.1          digest_0.6.35          colorspace_2.1-0      
##  [34] tensor_1.5             RSpectra_0.16-2        irlba_2.3.5.1         
##  [37] labeling_0.4.3         progressr_0.15.1       spatstat.sparse_3.1-0 
##  [40] timechange_0.3.0       httr_1.4.7             polyclip_1.10-6       
##  [43] abind_1.4-5            compiler_4.4.0         withr_3.0.2           
##  [46] fastDummies_1.7.4      highr_0.11             MASS_7.3-61           
##  [49] tools_4.4.0            lmtest_0.9-40          httpuv_1.6.15         
##  [52] future.apply_1.11.3    goftest_1.2-3          glue_1.8.0            
##  [55] nlme_3.1-165           promises_1.3.0         grid_4.4.0            
##  [58] Rtsne_0.17             cluster_2.1.6          reshape2_1.4.4        
##  [61] generics_0.1.3         gtable_0.3.5           spatstat.data_3.1-4   
##  [64] tzdb_0.4.0             hms_1.1.3              spatstat.geom_3.3-4   
##  [67] RcppAnnoy_0.0.22       ggrepel_0.9.5          RANN_2.6.2            
##  [70] pillar_1.10.1          spam_2.11-0            RcppHNSW_0.6.0        
##  [73] later_1.3.2            splines_4.4.0          lattice_0.22-6        
##  [76] survival_3.7-0         deldir_2.0-4           tidyselect_1.2.1      
##  [79] miniUI_0.1.1.1         pbapply_1.7-2          gridExtra_2.3         
##  [82] scattermore_1.2        xfun_0.45              matrixStats_1.3.0     
##  [85] stringi_1.8.4          lazyeval_0.2.2         yaml_2.3.8            
##  [88] evaluate_1.0.3         codetools_0.2-20       cli_3.6.3             
##  [91] uwot_0.2.2             xtable_1.8-4           reticulate_1.40.0     
##  [94] munsell_0.5.1          jquerylib_0.1.4        globals_0.16.3        
##  [97] spatstat.random_3.3-2  png_0.1-8              spatstat.univar_3.1-1 
## [100] parallel_4.4.0         dotCall64_1.2          listenv_0.9.1         
## [103] viridisLite_0.4.2      scales_1.3.0           ggridges_0.5.6        
## [106] rlang_1.1.4            cowplot_1.1.3
citation()
## To cite R in publications use:
## 
##   R Core Team (2024). _R: A Language and Environment for Statistical
##   Computing_. R Foundation for Statistical Computing, Vienna, Austria.
##   <https://www.R-project.org/>.
## 
## A BibTeX entry for LaTeX users is
## 
##   @Manual{,
##     title = {R: A Language and Environment for Statistical Computing},
##     author = {{R Core Team}},
##     organization = {R Foundation for Statistical Computing},
##     address = {Vienna, Austria},
##     year = {2024},
##     url = {https://www.R-project.org/},
##   }
## 
## We have invested a lot of time and effort in creating R, please cite it
## when using it for data analysis. See also 'citation("pkgname")' for
## citing R packages.