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. See spectral 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 generator

  • weighted_by_sd (bool) – Whether to weight the result eigenvectors by the square root of eigenvalues. See spectral for details.

Returns:

Return the eigenvalues and eigenvectors of the Laplacian matrix.

Return type:

tuple[np.ndarray, np.ndarray]

See also

spectral