mantispy.pl.cell_counts#

mantispy.pl.cell_counts(adata, groupby='Metadata_Plate', ax=None, count_key='Metadata_CellCount', group_label=None, labels=None)[source]#

Distribution of cells per well, split by groupby.

Parameters:
adata AnnData

Cells, which are counted per well, or profiles, whose count_key is drawn.

groupby str (default: 'Metadata_Plate')

obs column whose groups become the boxes.

ax Axes | None (default: None)

Axes to draw on, or None for a new figure.

count_key str (default: 'Metadata_CellCount')

obs column holding the cell count of profiles.

group_label str | None (default: None)

Axis title for the grouping variable, or None to use groupby.

labels Mapping[Any, str] | None (default: None)

Display names for group values, keyed by value; values left out keep their own name.

Return type:

Axes | None

Returns:

The axes when the caller passed ax, else None because the plot then owns the figure it created.

Raises:

KeyError – Profiles carry no count_key.