admin管理员组文章数量:1031308
中性粒细胞的质量值到底是多低呢?
今天来学习曾老板发布在群里的第6个写作任务: 【写作任务6】,中性粒细胞的质量值到底是多低? ct=fread( 'GSE207422_RAW/GSE207422_NSCLC_scRNAseq_UMI_matrix.txt.gz', data.table = F)
中性粒细胞这两年的热度实在是太高了,随便一搜,全是大刊:
- 2019年 nature reviews clinical oncology(IF=81.1):《Tumour-associated neutrophils in patients with cancer》
- 2020年 Nat Rev Cancer(IF=72.5):《Neutrophil diversity and plasticity in tumour progression and therapy》
- 2022年 Nat Rev Immunol(IF=67.7):《Neutrophils in cancer: heterogeneous and multifaceted》
- 2022年 nature(IF=69.504):《Liver tumour immune microenvironment subtypes and neutrophil heterogeneity》
- 2024年 Cell (IF=45.5):《Neutrophil profiling illuminates anti-tumor antigen-presenting potency》
今天来看看一篇文献中使用BD单细胞测序技术,鉴定到的一大群中性粒细胞,这就来分析看看!多一点对中性粒细胞的实际认知~
数据背景
数据来自GEO数据库:.cgi?acc=GSE207422,
对应的文献标题为:《Tumor microenvironment remodeling after neoadjuvant immunotherapy in non-small cell lung cancer revealed by single-cell RNA sequencing》,于2023年3月3号发表在 Genome Med上。
文章的数据实验设计和取样情况如下:
鉴定到的细胞群如下,里面就有好大一群中性粒细胞:
总体来说就是15个样本,治疗前3个,治疗后12个。下载 GEO的附件:
代码语言:javascript代码运行次数:0运行复制GSE207422_NSCLC_bulk_RNAseq_log2TPM.txt.gz
GSE207422_NSCLC_bulk_RNAseq_metadata.xlsx
GSE207422_NSCLC_scRNAseq_UMI_matrix.txt.gz
GSE207422_NSCLC_scRNAseq_metadata.xlsx
数据读取
单细胞的表达矩阵就是这个文件:GSE207422_NSCLC_scRNAseq_UMI_matrix.txt.gz
代码语言:javascript代码运行次数:0运行复制###
### Create: Jianming Zeng
### Date: 2023-12-31
### Email: jmzeng1314@163
### Blog: /
### Forum: .html
### CAFS/SUSTC/Eli Lilly/University of Macau
### Update Log: 2023-12-31 First version
### Update Log: 2024-12-09 by juan zhang (492482942@qq)
###
rm(list=ls())
options(stringsAsFactors = F)
library(ggsci)
library(dplyr)
library(future)
library(Seurat)
library(clustree)
library(cowplot)
library(data.table)
library(ggplot2)
library(patchwork)
library(stringr)
library(qs)
library(Matrix)
getwd()
# 创建目录
getwd()
gse <- "GSE207422"
dir.create(gse)
###### step1: 导入数据 ######
ct <- data.table::fread("GSE207422/GSE207422_NSCLC_scRNAseq_UMI_matrix.txt.gz",data.table = F)
ct[1:5, 1:5]
dim(ct)
rownames(ct) <- ct[,1]
ct <- ct[,-1]
ct[1:5, 1:5]
# 创建对象
sce.all <- CreateSeuratObject(counts = ct, meta.data = meta, min.cells = 3, names.field = 2)
sce.all
创建对象的时候可以设置 names.field = 2,直接让 orig.ident 变成样本名,具体看:创建Seurat对象时忽略的两个参数竟然有这样的功能?
现在是 92330个细胞,正好是文章中过滤后的细胞数,我们就不过滤啦:
代码语言:javascript代码运行次数:0运行复制An object of class Seurat
24292 features across 92330 samples within 1 assay
接下来简单的进行降维聚类分群,并使用harmony进行去批次,在resolution=0.3的时候,分了16个亚群:
代码语言:javascript代码运行次数:0运行复制rm(list=ls())
library(Seurat)
library(ggplot2)
library(SCP) # .html
# /vignettes/plotting
library(Scillus) #
# /
library(scCustomize)
library(qs)
###### step4: 看标记基因库 ######
# 原则上分辨率是需要自己肉眼判断,取决于个人经验
sce.all.int <- sce.all
sce.all.int
table(Idents(sce.all.int))
table(sce.all.int$seurat_clusters)
table(sce.all.int$RNA_snn_res.0.3)
getwd()
dir.create('3-check-by-0.3')
select_idet <- "RNA_snn_res.0.3"
sce.all.int <- SetIdent(sce.all.int, value = select_idet)
table(sce.all.int@active.ident)
# 美化版
p <- CellDimPlot(sce.all.int, group.by = select_idet, reduction = "UMAP", label = T,label.size = 4, label_repel = T, label_insitu = T, label_point_size = 1, label_point_color =NA ,label_segment_color = NA)
ggsave(plot=p, filename="3-check-by-0.3/Dimplot_resolution_0.3.pdf",width = 7, height = 7)
简单的进行细胞注释
看看能不能注释到文章中那样一群中心粒细胞:
绘制各种marker基因:
代码语言:javascript代码运行次数:0运行复制############################## 查看marker基因
# 一般基因
markers <- list(
"Immu" = "PTPRC",
"Mast cells"=c("TPSAB1"),
"ILC" = c("KIT","KLRF1"),
"Cell Cycle" = c("TOP2A","MKI67"),
"Monocyte" = c("CD68","CD163","MARCO"),
"B cells" = c("CD79A","CD79B","CD19","MS4A1"),
"Plasma cells" = c("JCHAIN","IGKC"),
"platelets" = c("PF4", "PPBP","GP9"),
"T cells"=c("CD3D","CD3E","CD3G"),
"CD4+ T cells"=c("CD4"),
"CD8+ T cells"=c("CD8A","CD8B"),
"NK" = c("NKG7","KLRG1","KLRC1"),
"DC"=c("CD1C","LAMP3")
)
markers
p <- DotPlot(sce.all.int, features = markers, assay='RNA',group.by = select_idet,cols = c("grey", "red") ) +
ggtitle(select_idet) +
xlab("") +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) # 更改x轴标签角度
p[["theme"]][["strip.text"]]$angle <- 60
p
ggsave(filename = "3-check-by-0.3/Markers_dotplot.pdf", plot=p, width=12, height = 6,bg="white")
marker2
代码语言:javascript代码运行次数:0运行复制# paper 转移性胃癌基因 GSE163558
markers <- list("epithelial cells" = c("EPCAM", "KRT19", "CLDN4"),
"stromal cells"=c("PECAM1", "COL1A2", "VWF"),
"proliferative cells" = c("MKI67", "STMN1", "PCNA"),
"T cells" = c("CD3D", "CD3E", "CD2"),
"B cells" = c("CD79A", "IGHG1", "MS4A1"),
"NK cells" = c("KLRD1", "GNLY", "KLRF1"),
"myeloid cells" = c("CSF1R", "CSF3R", "CD68")
)
markers
p <- DotPlot(sce.all.int, features = markers, assay='RNA',group.by = select_idet,cols = c("grey", "red") ) +
ggtitle(paste0(select_idet, ": GSE163558")) +
xlab("") +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) # 更改x轴标签角度
p[["theme"]][["strip.text"]]$angle <- 60
p
ggsave(filename = "3-check-by-0.3/Markers_paperGSE163558_dotplot.pdf", plot=p, width=12, height = 6,bg="white")
marker3
代码语言:javascript代码运行次数:0运行复制#####################################################################
##### 具有配对的肿瘤和正常样本的胃癌marker基因 GSE206785
# 创建一个空的list对象
cell_markers <- list()
# 添加每种细胞类型的marker基因
cell_markers$B_cells <- c("CD19", "MS4A1")
cell_markers$plasma_cells <- c("IGHG1", "CD79A")
cell_markers$CD4_T_cells <- c("CD3D", "CD4")
cell_markers$CD8_T_cells <- c("CD8A")
cell_markers$NK_cells <- c("NCR1", "FGFBP2")
cell_markers$myeloid_cells <- c("CD14", "CD68")
cell_markers$mast_cells <- c("TPSAB1", "TPSB2")
cell_markers$endothelial_cells <- c("RAMP2", "PECAM1")
cell_markers$fibroblasts <- c("DCN", "LUM")
cell_markers$mural_cells <- c("PDGFRB", "ACTA2")
cell_markers$glial_cells <- c("PLP1", "SOX10")
cell_markers$epithelial_cells <- c("PGC", "PGA3")
# 打印list对象
print(cell_markers)
p <- DotPlot(sce.all.int, features = cell_markers, assay='RNA',group.by = select_idet,cols = c("grey", "red") ) +
ggtitle(paste0(select_idet, ": GSE206785")) +
xlab("") +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) # 更改x轴标签角度
p[["theme"]][["strip.text"]]$angle <- 60
p
ggsave(filename = "3-check-by-0.3/Markers_paperGSE206785_dotplot.pdf", plot=p, width=12, height = 6,bg="white")
marker4
中心粒细胞的这一群marker来自老板以前的帖子:BD平台单细胞的优点都被你弄丢了
代码语言:javascript代码运行次数:0运行复制## 中心粒细胞
myeloids = list(
Mac=c("C1QA","C1QB","C1QC","SELENOP","RNASE1","DAB2","LGMN","PLTP","MAF","SLCO2B1"),
mono=c("VCAN","FCN1","CD300E","S100A12","EREG","APOBEC3A","STXBP2","ASGR1","CCR2","NRG1"),
neutrophils = c("FCGR3B","CXCR2","SLC25A37","G0S2","CXCR1","ADGRG3","PROK2","STEAP4","CMTM2" ),
pDC = c("GZMB","SCT","CLIC3","LRRC26","LILRA4","PACSIN1","CLEC4C","MAP1A","PTCRA","C12orf75"),
DC1 = c("CLEC9A","XCR1","CLNK","CADM1","ENPP1","SNX22","NCALD","DBN1","HLA-DOB","PPY"),
DC2=c( "CD1C","FCER1A","CD1E","AL138899.1","CD2","GPAT3","CCND2","ENHO","PKIB","CD1B"),
DC3 = c("HMSD","ANKRD33B","LAD1","CCR7","LAMP3","CCL19","CCL22","INSM1","TNNT2","TUBB2B")
)
print(myeloids)
p <- DotPlot(sce.all.int, features = myeloids, assay='RNA',group.by = select_idet,cols = c("grey", "red") ) +
ggtitle(paste0(select_idet, ": myeloids")) +
xlab("") +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) # 更改x轴标签角度
p[["theme"]][["strip.text"]]$angle <- 90
p[["theme"]][["strip.text"]]$hjust <- 0
p
ggsave(filename = "3-check-by-0.3/Markers_myeloids_dotplot.pdf", plot=p, width=15, height = 8,bg="white")
结合前面的umap图注释如下:
增加一列注释:
代码语言:javascript代码运行次数:0运行复制################## 注释,读取注释文件
sce.all.int
Idents(sce.all.int) <- "RNA_snn_res.0.3"
Idents(sce.all.int)
temp <- read.table("3-check-by-0.3/anno.txt",sep = "\t")
temp
new.cluster.ids <- temp[,2]
names(new.cluster.ids) <- temp[,1]
new.cluster.ids
sce.all.int <- RenameIdents(sce.all.int, new.cluster.ids)
table(Idents(sce.all.int))
## 新增一列注释
anno <- as.data.frame(sce.all.int@active.ident)
sce.all.int <- AddMetaData(sce.all.int, metadata = anno, col.name = "celltype")
head(sce.all.int@meta.data)
table(sce.all.int$celltype)
# 美化版
p <- CellDimPlot(sce.all.int, group.by = "celltype", reduction = "UMAP", label = T,label.size = 3, label_repel = T, label_insitu = T,
label_point_size = 1, label_point_color =NA ,label_segment_color = NA)
ggsave(plot=p, filename="3-check-by-0.3/Dimplot_celltype.pdf",width = 8, height = 8)
中性粒细胞确实是被注释出来了,现在再来回过头看看老板说的这一群细胞的质量问题。
中性粒细胞QC指标
代码语言:javascript代码运行次数:0运行复制#########
# 1.计算线粒体基因比例
mito_genes <- grep("^MT-", rownames(sce.all.int),ignore.case = T, value = T)
# 可能是13个线粒体基因
print(mito_genes)
sce.all.int <- PercentageFeatureSet(sce.all.int, features = mito_genes, col.name = "percent_mito")
fivenum(sce.all.int@meta.data$percent_mito)
# 2.计算核糖体基因比例
ribo_genes <- grep("^Rp[sl]", rownames(sce.all.int),ignore.case = T, value = T)
print(ribo_genes)
sce.all.int <- PercentageFeatureSet(sce.all.int, features = ribo_genes, col.name = "percent_ribo")
fivenum(sce.all.int@meta.data$percent_ribo)
# 3.计算红血细胞基因比例
Hb_genes <- grep("^Hb[^(p)]", rownames(sce.all.int),ignore.case = T,value = T)
print(Hb_genes)
sce.all.int <- PercentageFeatureSet(sce.all.int, features=Hb_genes, col.name="percent_hb")
fivenum(sce.all.int@meta.data$percent_hb)
# 可视化细胞的上述比例情况
# pic2
p2 <- VlnPlot(sce.all.int, group.by = "celltype", features = c("nFeature_RNA", "nCount_RNA","percent_mito", "percent_ribo", "percent_hb"), pt.size = 0, ncol = 5) + NoLegend()
p2
这一群细胞的基因表达数和UMI count数都远低于其他细胞类型,这是为什么呢?
本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。原始发表:2025-04-10,如有侵权请联系 cloudcommunity@tencent 删除cellintlabel对象数据中性粒细胞的质量值到底是多低呢?
今天来学习曾老板发布在群里的第6个写作任务: 【写作任务6】,中性粒细胞的质量值到底是多低? ct=fread( 'GSE207422_RAW/GSE207422_NSCLC_scRNAseq_UMI_matrix.txt.gz', data.table = F)
中性粒细胞这两年的热度实在是太高了,随便一搜,全是大刊:
- 2019年 nature reviews clinical oncology(IF=81.1):《Tumour-associated neutrophils in patients with cancer》
- 2020年 Nat Rev Cancer(IF=72.5):《Neutrophil diversity and plasticity in tumour progression and therapy》
- 2022年 Nat Rev Immunol(IF=67.7):《Neutrophils in cancer: heterogeneous and multifaceted》
- 2022年 nature(IF=69.504):《Liver tumour immune microenvironment subtypes and neutrophil heterogeneity》
- 2024年 Cell (IF=45.5):《Neutrophil profiling illuminates anti-tumor antigen-presenting potency》
今天来看看一篇文献中使用BD单细胞测序技术,鉴定到的一大群中性粒细胞,这就来分析看看!多一点对中性粒细胞的实际认知~
数据背景
数据来自GEO数据库:.cgi?acc=GSE207422,
对应的文献标题为:《Tumor microenvironment remodeling after neoadjuvant immunotherapy in non-small cell lung cancer revealed by single-cell RNA sequencing》,于2023年3月3号发表在 Genome Med上。
文章的数据实验设计和取样情况如下:
鉴定到的细胞群如下,里面就有好大一群中性粒细胞:
总体来说就是15个样本,治疗前3个,治疗后12个。下载 GEO的附件:
代码语言:javascript代码运行次数:0运行复制GSE207422_NSCLC_bulk_RNAseq_log2TPM.txt.gz
GSE207422_NSCLC_bulk_RNAseq_metadata.xlsx
GSE207422_NSCLC_scRNAseq_UMI_matrix.txt.gz
GSE207422_NSCLC_scRNAseq_metadata.xlsx
数据读取
单细胞的表达矩阵就是这个文件:GSE207422_NSCLC_scRNAseq_UMI_matrix.txt.gz
代码语言:javascript代码运行次数:0运行复制###
### Create: Jianming Zeng
### Date: 2023-12-31
### Email: jmzeng1314@163
### Blog: /
### Forum: .html
### CAFS/SUSTC/Eli Lilly/University of Macau
### Update Log: 2023-12-31 First version
### Update Log: 2024-12-09 by juan zhang (492482942@qq)
###
rm(list=ls())
options(stringsAsFactors = F)
library(ggsci)
library(dplyr)
library(future)
library(Seurat)
library(clustree)
library(cowplot)
library(data.table)
library(ggplot2)
library(patchwork)
library(stringr)
library(qs)
library(Matrix)
getwd()
# 创建目录
getwd()
gse <- "GSE207422"
dir.create(gse)
###### step1: 导入数据 ######
ct <- data.table::fread("GSE207422/GSE207422_NSCLC_scRNAseq_UMI_matrix.txt.gz",data.table = F)
ct[1:5, 1:5]
dim(ct)
rownames(ct) <- ct[,1]
ct <- ct[,-1]
ct[1:5, 1:5]
# 创建对象
sce.all <- CreateSeuratObject(counts = ct, meta.data = meta, min.cells = 3, names.field = 2)
sce.all
创建对象的时候可以设置 names.field = 2,直接让 orig.ident 变成样本名,具体看:创建Seurat对象时忽略的两个参数竟然有这样的功能?
现在是 92330个细胞,正好是文章中过滤后的细胞数,我们就不过滤啦:
代码语言:javascript代码运行次数:0运行复制An object of class Seurat
24292 features across 92330 samples within 1 assay
接下来简单的进行降维聚类分群,并使用harmony进行去批次,在resolution=0.3的时候,分了16个亚群:
代码语言:javascript代码运行次数:0运行复制rm(list=ls())
library(Seurat)
library(ggplot2)
library(SCP) # .html
# /vignettes/plotting
library(Scillus) #
# /
library(scCustomize)
library(qs)
###### step4: 看标记基因库 ######
# 原则上分辨率是需要自己肉眼判断,取决于个人经验
sce.all.int <- sce.all
sce.all.int
table(Idents(sce.all.int))
table(sce.all.int$seurat_clusters)
table(sce.all.int$RNA_snn_res.0.3)
getwd()
dir.create('3-check-by-0.3')
select_idet <- "RNA_snn_res.0.3"
sce.all.int <- SetIdent(sce.all.int, value = select_idet)
table(sce.all.int@active.ident)
# 美化版
p <- CellDimPlot(sce.all.int, group.by = select_idet, reduction = "UMAP", label = T,label.size = 4, label_repel = T, label_insitu = T, label_point_size = 1, label_point_color =NA ,label_segment_color = NA)
ggsave(plot=p, filename="3-check-by-0.3/Dimplot_resolution_0.3.pdf",width = 7, height = 7)
简单的进行细胞注释
看看能不能注释到文章中那样一群中心粒细胞:
绘制各种marker基因:
代码语言:javascript代码运行次数:0运行复制############################## 查看marker基因
# 一般基因
markers <- list(
"Immu" = "PTPRC",
"Mast cells"=c("TPSAB1"),
"ILC" = c("KIT","KLRF1"),
"Cell Cycle" = c("TOP2A","MKI67"),
"Monocyte" = c("CD68","CD163","MARCO"),
"B cells" = c("CD79A","CD79B","CD19","MS4A1"),
"Plasma cells" = c("JCHAIN","IGKC"),
"platelets" = c("PF4", "PPBP","GP9"),
"T cells"=c("CD3D","CD3E","CD3G"),
"CD4+ T cells"=c("CD4"),
"CD8+ T cells"=c("CD8A","CD8B"),
"NK" = c("NKG7","KLRG1","KLRC1"),
"DC"=c("CD1C","LAMP3")
)
markers
p <- DotPlot(sce.all.int, features = markers, assay='RNA',group.by = select_idet,cols = c("grey", "red") ) +
ggtitle(select_idet) +
xlab("") +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) # 更改x轴标签角度
p[["theme"]][["strip.text"]]$angle <- 60
p
ggsave(filename = "3-check-by-0.3/Markers_dotplot.pdf", plot=p, width=12, height = 6,bg="white")
marker2
代码语言:javascript代码运行次数:0运行复制# paper 转移性胃癌基因 GSE163558
markers <- list("epithelial cells" = c("EPCAM", "KRT19", "CLDN4"),
"stromal cells"=c("PECAM1", "COL1A2", "VWF"),
"proliferative cells" = c("MKI67", "STMN1", "PCNA"),
"T cells" = c("CD3D", "CD3E", "CD2"),
"B cells" = c("CD79A", "IGHG1", "MS4A1"),
"NK cells" = c("KLRD1", "GNLY", "KLRF1"),
"myeloid cells" = c("CSF1R", "CSF3R", "CD68")
)
markers
p <- DotPlot(sce.all.int, features = markers, assay='RNA',group.by = select_idet,cols = c("grey", "red") ) +
ggtitle(paste0(select_idet, ": GSE163558")) +
xlab("") +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) # 更改x轴标签角度
p[["theme"]][["strip.text"]]$angle <- 60
p
ggsave(filename = "3-check-by-0.3/Markers_paperGSE163558_dotplot.pdf", plot=p, width=12, height = 6,bg="white")
marker3
代码语言:javascript代码运行次数:0运行复制#####################################################################
##### 具有配对的肿瘤和正常样本的胃癌marker基因 GSE206785
# 创建一个空的list对象
cell_markers <- list()
# 添加每种细胞类型的marker基因
cell_markers$B_cells <- c("CD19", "MS4A1")
cell_markers$plasma_cells <- c("IGHG1", "CD79A")
cell_markers$CD4_T_cells <- c("CD3D", "CD4")
cell_markers$CD8_T_cells <- c("CD8A")
cell_markers$NK_cells <- c("NCR1", "FGFBP2")
cell_markers$myeloid_cells <- c("CD14", "CD68")
cell_markers$mast_cells <- c("TPSAB1", "TPSB2")
cell_markers$endothelial_cells <- c("RAMP2", "PECAM1")
cell_markers$fibroblasts <- c("DCN", "LUM")
cell_markers$mural_cells <- c("PDGFRB", "ACTA2")
cell_markers$glial_cells <- c("PLP1", "SOX10")
cell_markers$epithelial_cells <- c("PGC", "PGA3")
# 打印list对象
print(cell_markers)
p <- DotPlot(sce.all.int, features = cell_markers, assay='RNA',group.by = select_idet,cols = c("grey", "red") ) +
ggtitle(paste0(select_idet, ": GSE206785")) +
xlab("") +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) # 更改x轴标签角度
p[["theme"]][["strip.text"]]$angle <- 60
p
ggsave(filename = "3-check-by-0.3/Markers_paperGSE206785_dotplot.pdf", plot=p, width=12, height = 6,bg="white")
marker4
中心粒细胞的这一群marker来自老板以前的帖子:BD平台单细胞的优点都被你弄丢了
代码语言:javascript代码运行次数:0运行复制## 中心粒细胞
myeloids = list(
Mac=c("C1QA","C1QB","C1QC","SELENOP","RNASE1","DAB2","LGMN","PLTP","MAF","SLCO2B1"),
mono=c("VCAN","FCN1","CD300E","S100A12","EREG","APOBEC3A","STXBP2","ASGR1","CCR2","NRG1"),
neutrophils = c("FCGR3B","CXCR2","SLC25A37","G0S2","CXCR1","ADGRG3","PROK2","STEAP4","CMTM2" ),
pDC = c("GZMB","SCT","CLIC3","LRRC26","LILRA4","PACSIN1","CLEC4C","MAP1A","PTCRA","C12orf75"),
DC1 = c("CLEC9A","XCR1","CLNK","CADM1","ENPP1","SNX22","NCALD","DBN1","HLA-DOB","PPY"),
DC2=c( "CD1C","FCER1A","CD1E","AL138899.1","CD2","GPAT3","CCND2","ENHO","PKIB","CD1B"),
DC3 = c("HMSD","ANKRD33B","LAD1","CCR7","LAMP3","CCL19","CCL22","INSM1","TNNT2","TUBB2B")
)
print(myeloids)
p <- DotPlot(sce.all.int, features = myeloids, assay='RNA',group.by = select_idet,cols = c("grey", "red") ) +
ggtitle(paste0(select_idet, ": myeloids")) +
xlab("") +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) # 更改x轴标签角度
p[["theme"]][["strip.text"]]$angle <- 90
p[["theme"]][["strip.text"]]$hjust <- 0
p
ggsave(filename = "3-check-by-0.3/Markers_myeloids_dotplot.pdf", plot=p, width=15, height = 8,bg="white")
结合前面的umap图注释如下:
增加一列注释:
代码语言:javascript代码运行次数:0运行复制################## 注释,读取注释文件
sce.all.int
Idents(sce.all.int) <- "RNA_snn_res.0.3"
Idents(sce.all.int)
temp <- read.table("3-check-by-0.3/anno.txt",sep = "\t")
temp
new.cluster.ids <- temp[,2]
names(new.cluster.ids) <- temp[,1]
new.cluster.ids
sce.all.int <- RenameIdents(sce.all.int, new.cluster.ids)
table(Idents(sce.all.int))
## 新增一列注释
anno <- as.data.frame(sce.all.int@active.ident)
sce.all.int <- AddMetaData(sce.all.int, metadata = anno, col.name = "celltype")
head(sce.all.int@meta.data)
table(sce.all.int$celltype)
# 美化版
p <- CellDimPlot(sce.all.int, group.by = "celltype", reduction = "UMAP", label = T,label.size = 3, label_repel = T, label_insitu = T,
label_point_size = 1, label_point_color =NA ,label_segment_color = NA)
ggsave(plot=p, filename="3-check-by-0.3/Dimplot_celltype.pdf",width = 8, height = 8)
中性粒细胞确实是被注释出来了,现在再来回过头看看老板说的这一群细胞的质量问题。
中性粒细胞QC指标
代码语言:javascript代码运行次数:0运行复制#########
# 1.计算线粒体基因比例
mito_genes <- grep("^MT-", rownames(sce.all.int),ignore.case = T, value = T)
# 可能是13个线粒体基因
print(mito_genes)
sce.all.int <- PercentageFeatureSet(sce.all.int, features = mito_genes, col.name = "percent_mito")
fivenum(sce.all.int@meta.data$percent_mito)
# 2.计算核糖体基因比例
ribo_genes <- grep("^Rp[sl]", rownames(sce.all.int),ignore.case = T, value = T)
print(ribo_genes)
sce.all.int <- PercentageFeatureSet(sce.all.int, features = ribo_genes, col.name = "percent_ribo")
fivenum(sce.all.int@meta.data$percent_ribo)
# 3.计算红血细胞基因比例
Hb_genes <- grep("^Hb[^(p)]", rownames(sce.all.int),ignore.case = T,value = T)
print(Hb_genes)
sce.all.int <- PercentageFeatureSet(sce.all.int, features=Hb_genes, col.name="percent_hb")
fivenum(sce.all.int@meta.data$percent_hb)
# 可视化细胞的上述比例情况
# pic2
p2 <- VlnPlot(sce.all.int, group.by = "celltype", features = c("nFeature_RNA", "nCount_RNA","percent_mito", "percent_ribo", "percent_hb"), pt.size = 0, ncol = 5) + NoLegend()
p2
这一群细胞的基因表达数和UMI count数都远低于其他细胞类型,这是为什么呢?
本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。原始发表:2025-04-10,如有侵权请联系 cloudcommunity@tencent 删除cellintlabel对象数据本文标签: 中性粒细胞的质量值到底是多低呢
版权声明:本文标题:中性粒细胞的质量值到底是多低呢? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/jiaocheng/1747733561a2210564.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论