scib.metrics.clisi_graph

scib.metrics.clisi_graph(adata, batch_key, label_key, k0=90, type_=None, subsample=None, scale=True, n_cores=1, verbose=False)

Cell-type LISI (cLISI) score

Local Inverse Simpson’s Index metrics adapted from https://doi.org/10.1038/s41592-019-0619-0 to run on all full feature, embedding and kNN integration outputs via shortest path-based distance computation on single-cell kNN graphs. By default, this function returns a value scaled between 0 and 1 instead of the original LISI range of 0 to the number of labels.

Parameters
  • adata – adata object to calculate on

  • batch_key – batch column name in adata.obs

  • label_key – label column name in adata.obs

  • k0 – number of nearest neighbors to compute lisi score Please note that the initial neighborhood size that is used to compute shortest paths is 15.

  • type_ – type of data integration, either knn, full or embed

  • subsample – Percentage of observations (integer between 0 and 100) to which lisi scoring should be subsampled

  • scale – scale output values between 0 and 1 (True/False)

  • n_cores – number of cores (i.e. CPUs or CPU cores to use for multiprocessing)

Returns

Median of cLISI scores per cell type labels