课前准备----细胞“communities”

作者,Evil Genius

什么是cellular communities? identified regions of the heart that were spatially composed of distinct combinations of co-segregating cell populations (‘cellular communities’ (CCs)). Cellular neighbours for each cell of the heart were defined within a 150 µm radius, which represents a typical diffusion ‘zone’ for extracellular signalling molecules from an individual cell。文章Spatially organized cellular communities form the developing human heart | Nature

细胞社区(cellular communities)是基于距离中心细胞特定距离范围内不同细胞类型的局部密度区分的组织区域。

Graphical depiction of relationship between number of neighbors and neigh bor order

简单的代码

# packages
library(SeuratData)
library(Seurat)
library(banyan)
library(patchwork)

# load data
InstallData("stxBrain")
brain <- LoadData("stxBrain","anterior1")

# run Seurat processing steps
brain <- SCTransform(brain, assay = "Spatial", verbose = FALSE)
brain <- RunPCA(brain, assay = "SCT", verbose = FALSE)

# fit banyan model
brain_fit <- fit_banyan(seurat_obj = brain, K = 6)
save(brain_fit,file = paste0(data_dir,"brain_fit_banyan.RData"))
load(paste0(data_dir,"brain_fit_banyan.RData"))

# plot labels
plot_labels(brain_fit)

# calculate scores
brain_fit <- get_scores(brain_fit)

# plot uncertainty
plot_uncertainty(brain_fit)

# plot propensity
plot_propensity(brain_fit,k = 1) + plot_propensity(brain_fit,k = 2)

# plot connectivity matrix
plot_connectivity_matrix(brain_fit)

# plot connectivity interval
plot_connectivity_intervals(brain_fit) 

生活很好,有你更好

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值