dynamo.tl.mnn(adata, n_pca_components=30, n_neighbors=250, layers='all', use_pca_fit=True, save_all_to_adata=False)[source]

Function to calculate mutual nearest neighbor graph across specific data layers.

  • adata (AnnData) – an Annodata object

  • n_pca_components (‘int’ (optional, default 30)) – Number of PCA components.

  • layers (str or list (default: all)) – The layer(s) to be normalized. Default is all, including RNA (X, raw) or spliced, unspliced, protein, etc.

  • use_pca_fit (bool (default: True)) – Whether to use the precomputed pca model to transform different data layers or calculate pca for each data layer separately.

  • save_all_to_adata (bool (default: False)) – Whether to save_fig all calculated data to adata object.


adata: AnnData

An updated anndata object that are updated with the mnn or other relevant data that are calculated during mnn calculation.