spatialtis.plotting.expression_map#

spatialtis.plotting.expression_map(data, rois, markers, use_shape=False, x_axis='marker', figsize=None, wspace=0, hspace=0.2, selected_types=None, cell_type_key=None, marker_key=None, shape_key=None, centroid_key=None, roi_key=None, **plot_options)[source]#

Visualize marker expression in ROI

Parameters
dataAnnData

The AnnData object for plotting.

roislist of str

A list of ROI name that you want to plot.

markerslist of str

A list of markers name that you want to plot.

x_axis{‘marker’, ‘roi’}, default: ‘marker’

What is on the x-axis, the marker or roi.

use_shapebool

Plot cell in polygon only when shape data is available.

figsizetuple of float

The size of figure.

wspacefloat, default: 0

The space between plots vertically.

hspacefloat, default: 0.1

The space between plots horizontally.

selected_typeslist of str

Select your interested cell types.

cell_type_keystr, default: Config.cell_type_key

The column in .obs to store cell types.This will temporarily overwrite the global config.

marker_keystr, default: Config.marker_key

The column in .var to store marker names.By default will read from the index of .var. This will temporarily overwrite the global config.

shape_keystr, default: Config.shape_key

The column in .var to store cell shape in wkt format. This will temporarily overwrite the global config.

centroid_keystr or list of str, default: Config.centroid_key

The column in .obs or .obsm to store centroid. This will temporarily overwrite the global config.

roi_keystr, default: Config.roi_key

The columns in .obs that specific ROI.This will temporarily overwrite the global config.

**plot_options

Pass to milkviz.point_map() or milkviz.polygon_map()