snapatac2.tl.umap#
- snapatac2.tl.umap(adata, n_comps=2, use_dims=None, use_rep='X_spectral', key_added='umap', random_state=0, inplace=True, **kwargs)[source]#
- Parameters:
adata (
AnnData|AnnDataSet|ndarray) – The annotated data matrix.n_comps (
int) – The number of dimensions of the embedding.use_dims (
int|list[int] |None) – Use these dimensions inuse_rep.use_rep (
str) – Use the indicated representation in.obsm.key_added (
str) –adata.obskey under which to add the cluster labels.inplace (
bool) – Whether to store the result in the anndata object.**kwargs – Other parameters defined in umap.UMAP
- Returns:
if
inplace=Trueit stores UMAP embedding inadata.obsm["X_`key_added”]`. Otherwise, it returns the result as a numpy array.- Return type:
np.ndarray | None