顶刊中的单细胞热图,也未必那么美!

学术   2024-09-25 09:00   中国  

T 细胞研究的常规方法,无非经典的流式细胞术,功能实验和基因表达分析。

  1. 流式细胞术。先使用流式细胞术检测 T 细胞表面或者胞内分子的表达,如CD4、CD8、CD25、FOXP3等标记,区分不同亚群的 T 细胞(免疫表型分析);然后检测细胞因子(如IFN-γ、IL-2等)的产生,评估 T 细胞的功能状态(功能分析)。
  2. 功能实验杀伤功能:评估细胞毒性 T 细胞对靶细胞(如肿瘤细胞或病毒感染细胞)的杀伤能力。增殖功能:用噻唑蓝(MTT)或羧基荧光素二醋酸盐(CFSE)稀释测试,检测 T 细胞的增殖能力。
  3. 基因表达分析实时定量PCR:用于定量分析 T 细胞特异性基因的表达。转录组测序(RNA-seq):包括常规和单细胞转录组测序,可提供 T 细胞在不同激活状态或不同亚型中全基因表达的全景视图。

在张泽民老师团队题为Landscape of Infiltrating T Cells in Liver Cancer Revealed by Single-Cell Sequencing的论文中,CD8+ T 细胞和 CD4+ T 细胞的单细胞可视化热图,其实也没那么美观!当然,美图美不美不是关键!关键是找到线索,实验验证。

CD8+ T 细胞

单细胞数据分析中,在细胞注释确定marker基因后,挑选显著的gene用Seurat自带函数DoHeatmap可视化;也可以选任意自己想展示的基因进行个性化可视化。

常规单细胞热图是这样的。这样的图放在论文里面完全是可以的。

如果我们先做个美化,或者个性化展示,那当然更好!

## 先选择基因,将其转化为列表,然后比对到原数据。## 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")
用ComplexHeatmap进一步美化
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))
声明:以上代码来自KS科研分享与服务公众号,仅用于学术交流,如侵权,请联系删改。

芒果师兄聊生信
1.生信技能和基因编辑。2.论文发表和基金写作。3. 健康管理和医学科研资讯。4.幸福之路,读书,音乐和娱乐。
 最新文章