作者,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)