The purpose of this script is to annotate single-cell RNA-seq clusters following filtering, normalization, and clustering of the data with Seurat. This script has been adapted from the Seurat documentation (https://satijalab.org/seurat/articles/pbmc3k_tutorial#assigning-cell-type-identity-to-clusters).
library(Seurat)
library(tidyverse)
library(patchwork)
library(pheatmap)
library(RColorBrewer)
library(SingleR)
library(celldex) # To install: BiocManager::install("celldex")
library(data.table)
library(knitr)
library(clusterProfiler)
library(presto)
Input: Pre-processed Seurat object.
setwd("/scratch/alpine/edlarsen@colostate.edu/project_scrna_01/240828_scRNAseq/Cluster_Annotation")
thym_seurat <- readRDS(file = "../Normalization_and_Clustering/THYM_NormalizedAndClustered.RData")
By default, identifies all positive and negative markers of a single cluster compared to all other cells.
thym_seurat <- FindClusters(thym_seurat, resolution = 0.2)
## Modularity Optimizer version 1.3.0 by Ludo Waltman and Nees Jan van Eck
##
## Number of nodes: 22654
## Number of edges: 677273
##
## Running Louvain algorithm...
## Maximum modularity in 10 random starts: 0.9488
## Number of communities: 11
## Elapsed time: 4 seconds
thym_seurat <- RunUMAP(thym_seurat, dims = 1:10)
thym.markers <- FindAllMarkers(thym_seurat, only.pos=TRUE)
# Export
#write.csv(thym.markers, file="THYMUS_DEfeaturesByUMAPcluster.csv")
# umap
thym_seurat <- RunUMAP(thym_seurat,
dims = 1:10,
n.neighbors = 50, # default is 30
min.dist = 0.5) # default is 0.3
DimPlot(thym_seurat,
reduction = "umap",
label = TRUE,
label.size = 6) +
plot_annotation(title = "Canine Thymus, Resolution: 0.2, \nn.neighbors = 50, min.dist = 0.5", theme = theme(plot.title = element_text(hjust = 0.5, size = 20)))
key.genes <- thym.markers[!grepl("ENSCAFG", row.names(thym.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(thym_seurat,
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))
Notes: * CD34 expression is expected only in the earliest stages of thymocyte development. * ALPL and KIT are markers of hematopoietic stem cells. * In humans, CD44 is expressed on DN1 and DN2 thymocytes, then downregulated in DN3 thymocytes before being expressed again in SP thymocytes. * CD25 (IL2RA) is expressed in DN2 and DN3 thymocytes, but not DN1 or DN4 thymocytes. * CCR9 is expressed by most DP thymocytes but not DN thymocytes, and it is subsequently downregulated with the transition from the DP stage to SP stages of thymocyte development. * In cynomolgus monkeys, CD1 is expressed in DN and DP thymocytes, then downregulated as cells progressed to the SP stages.
Markers for DN T cells, naive CD4+ and CD8+ T cells, and CD34+ unclassified cells were derived from a single-cell atlas of circulating canine leukocytes (https://github.com/dyammons/Canine_Leukocyte_scRNA).
FeaturePlot(thym_seurat,
reduction = "umap",
features = c("CD34", "KIT", "ALPL", "CD44", "NOTCH1", "IL2RA", "CCR9", "DNTT", "RAG1", "RAG2", "CD1C")) +
plot_annotation(title = "Canine Thymus Precursor & Early Thymocyte Feature Expression", theme = theme(plot.title = element_text(hjust = 0.5, size = 20))) &
scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))
FeaturePlot(thym_seurat,
reduction = "umap",
features = c("CD3E", "CD5", "CD4", "CD8A", "FOXP3", "IL2RA", "IL7R", "GATA3", "TBX21", "RORC", "CCR5", "CD7")) +
plot_annotation(title = "Canine Thymus Mature Thymocyte and T-cell Feature Expression", theme = theme(plot.title = element_text(hjust = 0.5, size = 20))) &
scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))
FeaturePlot(thym_seurat,
reduction = "umap",
features = c("TFPI", "ZNF521", "CD34", "NDST3", "GUCY1A1", "HPGD", "CLEC3B", "CLEC3B", "KIT", "CD109", "DNTT")) +
plot_annotation(title = "Canine Thymus: Expression of Markers for CD34+ Unclassified Cells from Canine Circulating Leukocyte Atlas", theme = theme(plot.title = element_text(hjust = 0.5, size = 20))) &
scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))
FeaturePlot(thym_seurat,
reduction = "umap",
features = c("KIAA0825", "TMEM132D", "KANK1", "NMB", "CTLA4", "SYNJ2", "BICDL1", "SLF1", "ID3", "KIAA1549")) +
plot_annotation(title = "Canine Thymus: Expression of Markers for DN T-cells from Canine Circulating Leukocyte Atlas", theme = theme(plot.title = element_text(hjust = 0.5, size = 20))) &
scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))
FeaturePlot(thym_seurat,
reduction = "umap",
features = c("CD8A", "ITGA1", "PTGDR", "IL2RB", "ADGRG1", "NBEA")) +
plot_annotation(title = "Canine Thymus: Expression of Markers for Naive CD8 T-cells \nfrom Canine Circulating Leukocyte Atlas", theme = theme(plot.title = element_text(hjust = 0.5, size = 20))) &
scale_color_gradientn(colours = brewer.pal(name = "RdPu", n=11))