rapids_singlecell.tl.mde

Contents

rapids_singlecell.tl.mde#

rapids_singlecell.tl.mde(adata, *, device=None, n_neighbors=15, n_pcs=None, use_rep=None, **kwargs)[source]#

Util to run pymde.preserve_neighbors() for visualization of single cell embeddings.

Parameters:
adata AnnData

Annotated data matrix.

device Optional[Literal['cpu', 'cuda']] (default: None)

Whether to run on cpu or gpu (“cuda”). If None, tries to run on gpu if available.

n_neighbors int (default: 15)

use this many neighbors

n_pcs int (default: None)

use this many PCs

use_rep str (default: None)

use this obsm keys (defaults to X_pca)

kwargs

Keyword args to pymde.preserve_neighbors()

Return type:

None

Returns:

Updates adata with the following fields.

X_mdenp.ndarray (adata.obs, dtype float)

X_mde coordinates of data.

Notes

This function adapted from scvi-tools. The appropriateness of use of visualization of high-dimensional spaces in single- cell omics remains an open research questions. See: Chari, Tara, Joeyta Banerjee, and Lior Pachter. “The specious art of single-cell genomics.” bioRxiv (2021). If you use this function in your research please cite: Agrawal, Akshay, Alnur Ali, and Stephen Boyd. “Minimum-distortion embedding.” arXiv preprint arXiv:2103.02559 (2021).