10X-Visum空间转录组(3)---细胞注释|基因集评分

学术   科学   2024-07-01 09:30   甘肃  
觉得小编内容有用的、有意思的,点赞、分享、关注一下呗!

1、《KS科研分享与服务》公众号有QQ交流群,进入门槛是20元(完全是为了防止白嫖党,请理解),请考虑清楚。群里有免费推文的注释代码和示例数据(终身拥有),没有付费内容,群成员福利是购买单个付费内容半价!


2、《KS科研分享与服务》微信VIP群只针对购买打包代码的小伙伴(公众号所有付费内容合集)!微信群不是单独的,是对于打包的人答疑解惑和交流的平台、群成员专享视频教程,帖子提前发布,以及其他更多福利!


点击:→ 加入微信vip群:2024-2025《KS科研分享与服务》付费内容打包集合


3、需进QQ群或者打包代码入微信VIP的小伙伴请添加作者微信了解,请备注目的,除此之外请勿添加,谢谢!


详情请联系作者:

前面我们演示了10X空转的基本分析流程,其实和scRNA的流程很相似。接下来就是对于spots的celltype定义了。那么大家也知道,目前的技术没有达到单个细胞的水平,一个spots中是包含多个细胞的,这对于细胞的定义是具有挑战性。一般见到的方法有,与scRNA整合,各种反卷积算法,或者根据切片位置确认等等。当然了,我们还是希望后续技术的发展达到单细胞的水平。这里我们直接对细胞进行注释,进行一些基本的演示,至于其他的方法,我们后续继续分享。

找marker基因:按照celltype对组织空间区域进行注释。
#marker genes 和scRNA一样得操作Spatial_integrated = PrepSCTFindMarkers(Spatial_integrated)Markers <- FindAllMarkers(object = Spatial_integrated, only.pos = TRUE, min.pct = 0.1,                            thresh.use = 0.1, verbose = T, assay = 'SCT')
current.cluster.ids <- c(0, 1, 2, 3,                         4, 5, 6, 7,                         8, 9, 10, 11,                         12, 13, 14, 15,                         16, 17, 18, 19,                         20, 21, 22, 23,                         24, 25, 26)
new.cluster.ids_clusterLevel <- c("White matter", "Th1", "Th2", "GPi", "Striatum", "V", "Hy", "Amy", "II", "III", "IV", "Mol", "Cort.sub", "I", "DG", "Rsp1&2", "I", "Bla", "Rtn", "VI", "Ent", "Cort.sub", "Vent", "Ep", "Chor.plx", "Th3", "CA3")
new.cluster.ids_regionLevel <- c("White matter", "Thalamus", "Thalamus", "GPi", "Striatum", "Cortex", "Hypoth", "Amyg", "Cortex", "Cortex", "Cortex", "Hipp.", "Cort.sub", "Cortex", "Hipp.", "Cortex", "Cortex", "Bla", "Rtn", "Cortex", "Cortex", "Cort.sub", "Vent", "Cortex", "Chor.plx", "Thalamus", "Hipp.")

可视化celltype:
Idents(Spatial_integrated) <- 'clusterLevel'SpatialDimPlot(Spatial_integrated, images = 'Early2',               stroke=0.1, label = T, label.size = 4,               label.box=F, label.color = 'black',repel = T)&  scale_fill_manual(values = cols) &  theme_bw()&  theme(axis.text = element_blank(),        axis.ticks = element_blank(),        axis.title = element_blank(),        legend.position = "none")&  ggtitle("#Replicate2 Early")

有些时候,展示太多的celltype很乱,我们可能像单独或者标注展示一种celltype,可以将其highlight:比如这里我们强调下’II’。
SpatialDimPlot(Spatial_integrated,                ncol = 3,               cells.highlight = CellsByIdentities(object = Spatial_integrated, idents = c('II')))

对于对应的spot,可视化基因的表达:
DefaultAssay(Spatial_integrated) <- 'SCT'pdf('./Figures/figure4.pdf', height = 8, width = 12)SpatialFeaturePlot(Spatial_integrated, 'Ttr', ncol = 3)&  theme_bw()&  theme(axis.text = element_blank(),        axis.ticks = element_blank(),        axis.title = element_blank())dev.off()

基因集评分:
#注意,基因集是listCASgene <- list(c("Trem2","C4b","Lyz2","Gfap","Cd52","Ctss","C1qc","H2-D1",                  "Gpr17","Hsph1","Ctsz","Hist3h2a"))
#计算评分Spatial_integrated <- AddModuleScore(object = Spatial_integrated, features = CASgene, name = 'CAS')#plot==figure9SpatialFeaturePlot(Spatial_integrated, features = c("CAS1"), alpha = c(0.1,1), ncol = 3, min.cutoff = 0, max.cutoff = 1)& theme_bw()& theme(axis.text = element_blank(), axis.ticks = element_blank(), axis.title = element_blank())

其实从基因表达和基因集评分,就可以看出定义的celltype了。处于celltype群中间的定义可能没有问题,因为是同一类细胞的集合,但是在不同区域边缘,其实这个信息是不准确的。所以,空转还是需要结合实际情况,各方验证才行。希望我们的分享对你有用,觉得还行的点个赞再走呗!

KS科研分享与服务
科研学习交流于分享,生信学习笔记,科研经历和生活!
 最新文章