mapqc.pl.boxplot.mapqc_scores

Contents

mapqc.pl.boxplot.mapqc_scores#

mapqc.pl.boxplot.mapqc_scores(adata, grouping_key, group_order=None, min_n_cells_per_box=10, figsize=(24, 8), dotsize=1, return_fig=False, palette_case_control=None, color_dots_by=None, palette_dots=None, ylim=None, boxplot_kwargs=None)#

Boxplot of MapQC scores according to a grouping key, 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.

  • grouping_key (str) – Key in adata.obs to group the cells by. Note that each group in turn will be split by case/control status.

  • group_order (list[str], optional) – Order of the groups to plot. If not provided, the groups will be plotted alphabetically. Note that this list can also be a subset of the groups in adata.obs[grouping_key].

  • min_n_cells_per_box (int, optional) – Minimum number of cells per box. Default is 10. Boxes based on groups with fewer than min_n_cells_per_box cells are excluded from the plot.

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

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

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

  • palette_case_control (dict, optional) – Color palette for the boxes (controls and case categories). Default is None.

  • color_dots_by (str, optional) – Metadata category (column in adata.obs) to color the dots by. Default is None.

  • palette_dots (dict, optional) – Color palette for the dots, if color_dots_by is provided. Default is None.

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

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