本文是參考學(xué)習(xí) CNS圖表復(fù)現(xiàn)03—單細(xì)胞區(qū)分免疫細(xì)胞和腫瘤細(xì)胞
的學(xué)習(xí)筆記。可能根據(jù)學(xué)習(xí)情況有所改動(dòng)。
今天講解第三步:根據(jù)一些基因的表達(dá)來區(qū)分細(xì)胞是否屬于免疫細(xì)胞。
我在單細(xì)胞天地的教程:是否是免疫細(xì)胞很容易區(qū)分那是否是腫瘤細(xì)胞呢?提到過Cells were defined as non-immune if belonging to a cluster low for PTPRC (gene for CD45)
>rm(list=ls())
options(stringsAsFactors = F)
library(Seurat)
library(ggplot2)
load(file = 'first_sce.Rdata')
# Specify genes
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) + coord_flip()
p
可以看到;

image.png
不同標(biāo)記基因在不同細(xì)胞亞群的表達(dá)情況
其中PTPRC基因代表的是CD45分子,是免疫細(xì)胞的標(biāo)記,所以可以使用它來區(qū)分:
# Annotate Immune vs Nonimmune clusters
# At this point we dont care for a more detailed annotation as we will annotate immune and non-immune separately later
dat=p$data
cd45=dat[dat$features.plot=='PTPRC',]
fivenum(cd45$avg.exp.scaled)
imm=cd45[cd45$avg.exp.scaled > -0.5,]$id
imm
sce@meta.data$immune_annotation <-ifelse(sce@meta.data$RNA_snn_res.0.5 %in% imm ,'immune','non-immune')
# MAke a table
table(sce@meta.data$immune_annotation)
# Make and save relevant plots
接下來可以進(jìn)行 TSNE plot 可視化,看到免疫細(xì)胞和非免疫細(xì)胞是涇渭分明:
p <- TSNEPlot(object = sce, group.by = 'immune_annotation')
p

image.png
TSNE plot 可視化看免疫細(xì)胞