snapatac2.tl.laplacian#
- snapatac2.tl.laplacian(data, n_comps=None, features='selected', random_state=0, inplace=True)[source]#
Convert chromatin accessibility profiles of cells into lower dimensional representations.
Convert chromatin accessibility profiles of cells into lower dimensional representations using the spectrum of the normalized graph Laplacian defined by pairwise similarity between cells.
- Parameters
data (
AnnData
) – AnnData objectn_comps (
Optional
[int
]) – Number of dimensions to keepfeatures (
Union
[str
,ndarray
,None
]) – Boolean index mask. True means that the feature is kept. False means the feature is removed.random_state (
int
) – Seed of the random state generator
- Return type
Optional
[ndarray
]- Returns
if
inplace=True
it stores Spectral embedding of data in the fieldadata.obsm["X_spectral"]
, otherwise it returns the result as a numpy array.