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()
- adata
- Return type:
- Returns:
Updates
adata
with the following fields.- X_mde
np.ndarray
(adata.obs
, dtypefloat
) X_mde coordinates of data.
- X_mde
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).