stereoAlign.metrics.lisi¶
- stereoAlign.metrics.lisi(data: AnnData, key: str = 'batch', use_rep: str = 'X_umap', n_neighbors: int = 30)¶
Local inverse Simpson’s Index (LISI)
Calculate the Local inverse Simpson’s Index (LISI) metric of the data regarding a specific sample attribute and embedding. The LISI metric measures if cells from different samples mix well in their local neighborhood.
Parameters¶
- data:
Data matrix with rows for cells and columns for genes.
- key:
The sample attribute to be consider. Must exist in
data.obs.- use_rep:
The embedding representation to be used. The key must be exist in
data.obsm. By default, use UMAP coordinates.- n_neighbors:
Number of nearest neighbors.
Returns¶
- lisi_mean:
Mean of calculated score.
- lower:
Lower bound of 95% confidence interval.
- upper:
Upper bound of 95% confidence interval.