mantispy.pl.dose_response#

mantispy.pl.dose_response(adata, compound, key='dose_response', compound_key='Metadata_Compound', dose_key='Metadata_Concentration', response=None, ax=None)[source]#

One compound’s response against dose, with the fitted curve when there is one.

Parameters:
adata AnnData

Object holding the table dose_response() wrote.

compound str

Which compound of that table to draw.

key str (default: 'dose_response')

Name of that table in uns["mantispy"].

compound_key str (default: 'Metadata_Compound')

obs column naming the compound of each well.

dose_key str (default: 'Metadata_Concentration')

obs column holding the dose of each well.

response str | None (default: None)

obs column drawn against the dose. None reads the column dose_response() was given, so a plot cannot silently draw a different one than the table was fitted from.

ax Axes | None (default: None)

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

Return type:

Axes | None

Returns:

The axes when the caller passed ax, else None because the plot then owns the figure it created. When returned they carry a log y scale where every drawn response is positive, since a distance from the controls has a long right tail and one stray well would otherwise flatten the rest onto the baseline. The scale is decided per axes, so panels drawn side by side can differ; set it on the returned axes to compare them.

Raises:

KeyError – There is no such table, or it holds no such compound.