snapatac2.tl.multi_spectral#
- snapatac2.tl.multi_spectral(adatas, n_comps=30, features='selected', weights=None, random_state=0, weighted_by_sd=True)[source]#
Compute Laplacian Eigenmaps simultaneously on multiple modalities, with linear space and time complexity.
This is similar to
spectral
, but it can work on multiple modalities.- Parameters:
adatas (
list
[AnnData
] |list
[AnnDataSet
]) – A list of AnnData objects, representing single-cell data from different modalities.n_comps (
int
) – Number of dimensions to keep. Seespectral
for details.features (
str
|list
[str
] |list
[ndarray
] |None
) – Boolean index mask. True means that the feature is kept. False means the feature is removed.weights (
list
[float
] |None
) – Weights for each modality. If None, all modalities are weighted equally.random_state (
int
) – Seed of the random state generatorweighted_by_sd (
bool
) – Whether to weight the result eigenvectors by the square root of eigenvalues. Seespectral
for details.
- Returns:
Return the eigenvalues and eigenvectors of the Laplacian matrix.
- Return type:
tuple[np.ndarray, np.ndarray]
See also