T 细胞研究的常规方法,无非经典的流式细胞术,功能实验和基因表达分析。
流式细胞术。先使用流式细胞术检测 T 细胞表面或者胞内分子的表达,如CD4、CD8、CD25、FOXP3等标记,区分不同亚群的 T 细胞(免疫表型分析);然后检测细胞因子(如IFN-γ、IL-2等)的产生,评估 T 细胞的功能状态(功能分析)。 功能实验。杀伤功能:评估细胞毒性 T 细胞对靶细胞(如肿瘤细胞或病毒感染细胞)的杀伤能力。增殖功能:用噻唑蓝(MTT)或羧基荧光素二醋酸盐(CFSE)稀释测试,检测 T 细胞的增殖能力。 基因表达分析。实时定量PCR:用于定量分析 T 细胞特异性基因的表达。转录组测序(RNA-seq):包括常规和单细胞转录组测序,可提供 T 细胞在不同激活状态或不同亚型中全基因表达的全景视图。
在张泽民老师团队题为Landscape of Infiltrating T Cells in Liver Cancer Revealed by Single-Cell Sequencing的论文中,CD8+ T 细胞和 CD4+ T 细胞的单细胞可视化热图,其实也没那么美观!当然,美图美不美不是关键!关键是找到线索,实验验证。
CD8+ T 细胞
如果我们先做个美化,或者个性化展示,那当然更好!
## 先选择基因,将其转化为列表,然后比对到原数据。
## markers自己个性化定义
markers <- as.data.frame(markers)
markerdata <- ScaleData(scedata, features = as.character(unique(markers$markers)), assay = "RNA")
## 默认绘图
DoHeatmap(markerdata,
features = as.character(unique(markers$markers)),
group.by = "celltype",
assay = 'RNA')
## 美化绘图
DoHeatmap(markerdata,
features = as.character(unique(markers$markers)),
group.by = "celltype",
assay = 'RNA',
group.colors = c("#00BFC4","#AB82FF","#00CD00","#C77CFF"))+
scale_fill_gradientn(colors = c("white","grey","firebrick3"))
## 重新美化
markerdata$celltype <- factor(x=markerdata$celltype,
levels = c("Endothelial","Fibroblast","Epithelial","Immune","Other"))
DoHeatmap(markerdata,
features = as.character(unique(markers$markers)),
group.by = "celltype",
assay = 'RNA',
group.colors = c("#00BFC4","#AB82FF","#00CD00","#C77CFF"))+
scale_fill_gradientn(colors = c("white","grey","firebrick3"))
还可以提取表达矩阵,然后分组注释,用heatmap或者ComplexHeatmap做图。
library(Seurat)
library(stringr)
library(dplyr)
all.markers <- FindAllMarkers(scedata,
only.pos = TRUE,
min.pct = 0.25,
logfc.threshold = 0.75)
## markers个性化定义
sc_marker <- all.markers[markers,]
## 提取表达矩阵,分组注释
exp <- GetAssayData(scedata, slot = "counts")
exp <- log10(exp + 1)
head(scedata$celltype)
new_celltype <- sort(scedata$celltype)
head(new_celltype)
cs_data <- as.matrix(exp[sc_marker$gene, names(new_celltype)])
ac=data.frame(cluster=new_celltype)
rownames(ac)=colnames(cs_data)
用heatmap绘制热图
library(pheatmap)
pheatmap(cs_data,show_colnames =F,show_rownames = T,
cluster_rows = F,
cluster_cols = F,
annotation_col=ac,
border_color = "black")
library(ComplexHeatmap)
color = paletteer_d("ggsci::nrc_npg")[c(1,3,4,2,5)]
names(color) <- levels(new_celltype)
top_anno <- HeatmapAnnotation(cluster=anno_block(gp=gpar(fill=color),
labels = levels(new_celltype),
labels_gp = gpar(cex=0.5,color='white',fontsize = 18)))
Heatmap(cs_data,
cluster_rows = FALSE,
cluster_columns = FALSE,
show_column_names = FALSE,
show_row_names = T,
column_split = new_celltype,
top_annotation = top_anno,
column_title = NULL,
heatmap_legend_param = list(
title='Expression',
title_position='leftcenter-rot'),
col = colorRampPalette(c("white","#66CCFF","#333366"))(100),
border = "black",
row_names_gp = gpar(fontsize = 8))