mapqc.pl.umap.neighborhood_cells#
- mapqc.pl.umap.neighborhood_cells(adata, center_cell, nhood_info_df, color_by=None, color_by_palette='tab10', figsize=(6, 5), dotsize=1, return_fig=False, umap_kwargs=None)#
UMAP highlighting all cells in the neighborhood of a given center cell.
- Parameters:
adata (anndata.AnnData) – Anndata object. Both mapqc.run_mapqc() and mapqc.evaluate() should have been run on the adata object, as well as sc.tl.umap().
center_cell (str) – Center cell to plot.
nhood_info_df (pd.DataFrame) – DataFrame with neighborhood information. This is an optional output of mapqc.run(), when the return_sample_dists_to_ref_df parameter is set to True.
color_by (str, optional) – Metadata category (column name in adata.obs) to color the neighborhood cells by.
color_by_palette (str, optional) – Name of a matplotlib color palette to use for coloring the neighborhood cells by. Default is “tab10”.
figsize (tuple[float, float], optional) – Figure size. Default is (6, 5).
dotsize (float, optional) – Dot size. Default is 1.
return_fig (bool, optional) – Return the figure object. Default is False.
umap_kwargs (dict, optional) – Keyword arguments for scanpy’s UMAP plotting.