past.Evaluation.default_louvain

past.Evaluation.default_louvain(adata, refine=False, num_nbs=6, use_rep='embedding')

Default louvain clustering algorithm applied in scanpy package with default resolution 1.0

Parameters:
  • adata – target dataset of anndata format with latent feature stored in adata.obsm[use_rep] or with result of pp.neighbors

  • refine – whether or not refine clustering results, if True, spatial coordinate should be stored in adata.obsm[“spatial”]

  • num_nbs – number of neighbors to consider when refining clustering labels, valid only if refine is True

  • use_rep – key of adata.obsm implying latent features

Returns:

target dataset of anndata format with default louvain clustering result stored in adata.obs[“Dlouvain”] and refined clustering result stored in adata.obs[“Dlouvain_refined”] if refined is True

Return type:

scanpy.anndata