mapqc.pl.boxplot.sample_dists_to_ref_per_nhood

mapqc.pl.boxplot.sample_dists_to_ref_per_nhood#

mapqc.pl.boxplot.sample_dists_to_ref_per_nhood(adata, sample_dists_to_ref_df, figsize=(24, 8), boxplot_kwargs=None, palette=None, label_xticks_by=None, dotsize=1, max_n_nhoods=80, ylim=None, return_fig=False)#

Boxplot of sample distances to reference per neighborhood, split by case/control status.

Parameters:
  • adata (anndata.AnnData) – Anndata object. Both mapqc.run_mapqc() and mapqc.evaluate() should have been run on the adata object.

  • sample_dists_to_ref_df (pd.DataFrame) – DataFrame with sample distances to reference. This is an optional output of mapqc.run(), when the return_sample_dists_to_ref_df parameter is set to True.

  • figsize (tuple[float, float], optional) – Figure size. Default is (24, 8).

  • boxplot_kwargs (dict, optional) – Keyword arguments for seaborn’s boxplot.

  • palette (dict, optional) – Color palette. Default is None.

  • label_xticks_by (str, optional) – Label to use for x-axis ticks, based on its center cell (e.g. an annotation in adata.obs). Default is None.

  • dotsize (float, optional) – Dot size for the dots showing individual data points in the boxplot. Default is 1.

  • max_n_nhoods (int, optional) – Maximum number of neighborhoods to plot. Default is 80. These are randomly sampled (with a fixed seed).

  • ylim (tuple[float, float], optional) – y-axis limits. Default is None.

  • return_fig (bool, optional) – Return the figure object. Default is False.