课程补充----单细胞空间联合分析之RCTD封装版(针对visium、bin模式的Stereo-seq、HD)

作者,Evil Genius
关于RCTD,本来都不打算更新了,R版本的联合分析我觉得大家自己写写就完了,现在看来,还是需要整理一下。
文章在Robust decomposition of cell type mixtures in spatial transcriptomics | Nature Biotechnology
参考链接在GitHub - dmcable/spacexr: Spatial-eXpression-R: Cell type identification (including cell type mixtures) and cell type-specific differential expression for spatial transcriptomics
至于引用该方法的文章,那就很多了。
RCTD有三种模式:
(1)doublet mode:每个spot分配1-2种细胞类型,推荐用于具有高空间分辨率的技术,如Stereo-seq、HD等(注意bin的大小);
(2)full mode:每个spot分配任意数量的细胞类型,推荐用于具有低空间分辨率的技术,如Visium;
(3)multi mode : doublet mode的扩展,可以每个spot发现两个以上的细胞类型,作为全模式的替代选项。
很多博主、公司推文写了非常多的介绍和代码示例,大家可以借鉴一下。
不过对于这些网络写手,我更喜欢网络侠客这个称呼。
官网的教程写了很多,针对不同精度的平台都有,列举一下:
不过官网分析的结果是真的丑
Seurat官网也借鉴了RCTD的方法,在Analysis, visualization, and integration of Visium HD spatial datasets with Seurat • Seurat
示例代码如下,采用了Doublet mode模式
library(spacexr)

# set up reference
ref <- readRDS("../data/mouse_hippocampus_reference.rds")
ref <- UpdateSeuratObject(ref)
Idents(ref) <- "celltype"

# extract information to pass to the RCTD Reference function
counts <- ref[["RNA"]]$counts
cluster <- as.factor(ref$celltype)
names(cluster) <- colnames(ref)
nUMI <- ref$nCount_RNA
names(nUMI) <- colnames(ref)
reference <- Reference(counts, cluster, nUMI)

# set up query with the RCTD function SpatialRNA
slide.seq <- SeuratData::LoadData("ssHippo")
counts <- slide.seq[["Spatial"]]$counts
coords <- GetTissueCoordinates(slide.seq)
colnames(coords) <- c("x", "y")
coords[is.na(colnames(coords))] <
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值