本文是参考学习CNS图表复现08—肿瘤单细胞数据第一次分群通用规则
的学习笔记。可能根据学习情况有所改动。
文章的第一次分群按照 :
immune (CD45+,PTPRC),
epithelial/cancer (EpCAM+,EPCAM),
stromal (CD10+,MME,fibo or CD31+,PECAM1,endo)
的表达量分布,文章提到的各大亚群细胞数量是:(epithelial cells [n = 5,581], immune cells [n = 13,431], stromal cells [n = 4,249]). 我们可以很容易复现出来。
首先检查第一次分群的4个基因
rm(list=ls())
options(stringsAsFactors = F)
library(Seurat)
library(ggplot2)
load(file = 'first_sce.Rdata')
sce=sce.first
# epithelial/cancer (EpCAM+,EPCAM),
# immune (CD45+,PTPRC),
# stromal (CD10+,MME,fibo or CD31+,PECAM1,endo)
genes_to_check = c("PTPRC","EPCAM",'PECAM1','MME',"CD3G","CD3E", "CD79A")
p <- DotPlot(sce, features = genes_to_check,
assay='RNA' )
p
出图如下:
为了避免出错,需要先定义下epi亚群
EPCAM=dat[dat$features.plot=='EPCAM',]
fivenum(EPCAM$avg.exp.scaled)
epi=EPCAM[EPCAM$avg.exp.scaled > -0.5,]$id
epi
[email protected]$immune_annotation <-ifelse([email protected]$seurat_clusters %in% imm ,'immune',
ifelse([email protected]$seurat_clusters %in% epi ,'epi','stromal') )
# MAke a table
table([email protected]$immune_annotation)
# The resulting cell clusters were annotated as immune, stromal (fibroblasts, endothelial cells, and melanocytes), or epithelial cells
# (epithelial cells [n = 5,581], immune cells [n = 13,431], stromal cells [n = 4,249]).
我们的数量是:得到的细胞数量也跟文章差不多:
> table([email protected]$immune_annotation)
epi immune stromal
5444 13792 4278
肉眼可以看到的分群如下:
> imm # immune (CD45+,PTPRC),
[1] "0" "1" "2" "10" "11" "14" "16" "17" "19" "21" "5"
> epi # epithelial/cancer (EpCAM+,EPCAM),
[1] "3" "8" "9" "12" "15" "17" "18" "20" "22"
> stromal
[1] "4" "6" "7" "13" "23" "24"
第一次分群后,继续看文章列出来了的各种基因的在这3个主要的细胞亚群表达情况,代码如下:
genes_to_check = c("PTPRC","EPCAM","CD3G","CD3E", "CD79A", "BLNK","MS4A1", "CD68", "CSF1R",
"MARCO", "CD207", "PMEL", "ALB", "C1QB", "CLDN5", "FCGR3B", "COL1A1")
# All on Dotplot
p <- DotPlot(sce, features = genes_to_check,group.by = 'immune_annotation') + coord_flip()
p
出图如下:
可以说是非常完美啦!
看了大概一百多篇,基本上都是首先区分成为:上皮细胞、免疫细胞、内皮细胞和成纤维细胞
比如2020年9月24日,来自新加坡基因组研究院的Ramanuj DasGupta团队在Cell上在线发表题为“Onco-fetal Reprogramming of Endothelial Cells Drives Immunosuppressive Macrophages in Hepatocellular Carcinoma”的文章,绘制了一张人类肝脏从发育到疾病的单细胞图谱,揭示了一个可以同时驱动胎肝发育和HCC的免疫抑制的肿瘤-胚胎重编程生态系统,为HCC的治疗干预提供了新靶点。也是首先区分成为:上皮细胞、免疫细胞、内皮细胞和成纤维细胞,如下:
最简单的比较,就是不同细胞亚群在不同的生物学分组的单细胞样品的比例差异,其次是各种各样的差异表达量分析。然后可以对第一次得到上皮细胞、免疫细胞、内皮细胞和成纤维细胞分群进行再分群。
尤其是免疫细胞,分群非常复杂。后续我们慢慢讲。