co occurance score
Calculate co-occurance scoring between original spatial coordinates. It can be defined as \(\frac{p(exp|cond)}{p(exp)}\).
Parameters
cluster_key: str Key by which to compute neighbouhood enrichment scores.
clusters: str Cluster annotation to use in co-occurance scoring.
Web view

Python equivalent
import squidpy as sq
sq.gr.co_occurrence(adata, cluster_key="celltype_mapped_refined")
sq.pl.co_occurrence(adata, cluster_key="celltype_mapped_refined", clusters="Lateral plate mesoderm", figsize=(10, 5))