作者,Evil Genius
现在的趋势是空间转录组都走向了高精度平台,包括现在的10X HD、10X Xenium、华大、百迈客的平台,包括空间蛋白组常用的CODEX,那么高精度平台的分析上我们需要注意什么呢?
空间转录组一个关键的方面在量化不同尺度上细胞之间的空间关系,从相邻细胞的相互作用到多种类型细胞的空间网络。
高精度空转平台分析框架
其中包括的分析内容有:
Cell Phenotyping
🤹🏼♂️ Phenotype cells by unsupervised clustering
👽 Phenotype cells using a hierarchical probabilistic model
🙌 Add Regions of Interest (ROIs) for exploration
🤩 Explore the composition of defined cell types between samples and ROIs
Spatial Analysis
📍 Calculate and visualize distances between cell types
🤏 Cell-cell interaction/ co-occurrence analysis
⚖️ Compare proximity scores between samples
🔭 Search for spatial patterns
Cellular Neighbourhoods
🌳 Compute neighborhoods using cell-type or cluster information (includes LDA method)
🚀 Compute neighborhoods using expression data
我们这一篇来填补这些空间分析内容,前面空间降维聚类差异富集的基础处理大家自行分析。
先来看第一个,量化细胞间的距离关系,即拿到如下的结果,这个地方包括多个样本的距离比较处理
# import packages
import anndata as ad
# Load the data that we saved in the last tutorial (with ROIs added)
adata = ad.read_h5ad('/Users/aj/Dropbox (Partners HealthCare)/nirmal lab/resources/exemplarData/scimapExampleData/scimapExampleData.h5ad')
Compute the distances among cell types
import scimap as sm
adata = sm.tl.spatial_distance (adata, phenotype='phenotype')####就是细胞类型
sm.pl.spatial_distance (adata, figsize=(5,4))
对于包含多个图像的数据集,默认行为是对所有图像的距离取平均值。
sm.pl.spatial_distance (adata, heatmap_summarize=False, figsize=(9,4))