scfocus.utils.run_umap

scfocus.utils.run_umap(_adata, n_neighbors, min_dist)[source]

Compute UMAP embedding for single-cell data.

Parameters:
  • _adata (anndata.AnnData) – Preprocessed annotated data matrix.

  • n_neighbors (int) – Number of neighbors to use in UMAP computation.

  • min_dist (float) – Minimum distance parameter for UMAP.

Returns:

embedding – 2D UMAP embedding coordinates with shape (n_cells, 2).

Return type:

numpy.ndarray

Notes

This function first computes the neighborhood graph and then runs UMAP. Results are cached using Streamlit’s caching mechanism.