STutils.tl.nhood_enrichment#
- STutils.tl.nhood_enrichment(adata, coord_type='generic', library_key='batch', radius=30, cluster_key='region')#
Calculate neighborhood enrichment.
- Args:
adata: spatial anndata coord_type: Type of coordinate system, defaults to “generic” library_key: batch info, defaults to “batch” radius: Compute the graph based on neighborhood radius, defaults to 30 cluster_key: region or cell cluster key, defaults to “region”
- Return type:
- Returns:
pd.DataFrame: a dataframe of neighborhood enrichment