scviva.pl.vision.plot_signature_for_selection#

scviva.pl.vision.plot_signature_for_selection(adata, signature, coords_obsm_key, s, vmin, vmax, figsize, cmap, colorbar)[source]#

Plot signature scores on spatial coordinates for selection.

Parameters:
adata AnnData

AnnData object containing:

  • obsm['vision_signatures']: DataFrame of per-cell signature scores

  • obsm[coords_obsm_key]: spatial coordinates (array or DataFrame)

signature str

Name of the signature (column of obsm['vision_signatures']) used to color cells.

coords_obsm_key str

Key in adata.obsm with the spatial coordinates. The first two columns are used as x and y.

s float

Marker size passed to matplotlib.pyplot.scatter().

vmin float or None

Limits of the color scale passed to matplotlib.pyplot.scatter().

vmax float or None

Limits of the color scale passed to matplotlib.pyplot.scatter().

figsize tuple

Figure size.

cmap str

Colormap for the signature scores.

colorbar bool

Whether to add a colorbar.

Returns:

-p (PathCollection)

The scatter plot collection.

-ax (Axes)

The axes the scores were plotted on.

-points (ndarray)

Array of shape (n_obs, 2) with the x and y coordinates of the plotted cells.