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)[source]#
- Parameters
adata (
AnnData|AnnDataSet|ndarray) – The annotated data matrix.n_comps (
int) – The number of dimensions of the embedding.use_dims (
Union[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.random_state (
int) – Random seed.inplace (
bool) – Whether to store the result in the anndata object.
- 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