scfocus.utils.run_tsne

scfocus.utils.run_tsne(_adata, perplexity)[source]

Compute t-SNE embedding for single-cell data.

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

  • perplexity (int) – Perplexity parameter for t-SNE computation.

Returns:

embedding – 2D t-SNE embedding coordinates with shape (n_cells, 2).

Return type:

numpy.ndarray

Notes

Results are cached using Streamlit’s caching mechanism to avoid redundant computations across different runs.