metalsinglecell.gr.calculate_niche# metalsinglecell.gr.calculate_niche(adata, cluster_key, n_niches=10, connectivity_key='spatial_connectivities', key_added='niche', random_state=0, copy=False)[source]# Spatial niches from neighborhood composition (sq.gr.calculate_niche); writes obs[key_added]. Parameters: n_niches (int) connectivity_key (str) key_added (str) random_state (int) copy (bool)