pyXenium.multimodal.build_spatial_niches#

build_spatial_niches(adata, *, cell_state_key='joint_cell_state', spatial_obsm='spatial', niche_key='spatial_niche', niche_score_key='spatial_niche_score', niche_margin_key='spatial_niche_margin', n_neighbors=15, min_score=0.25)#

Build spatial niches from local composition of joint cell states.

Parameters:
  • adata (AnnData)

  • cell_state_key (str)

  • spatial_obsm (str)

  • niche_key (str)

  • niche_score_key (str)

  • niche_margin_key (str)

  • n_neighbors (int)

  • min_score (float)

Return type:

dict[str, DataFrame]