tangram.plot_utils.plot_cell_annotation
- tangram.plot_utils.plot_cell_annotation(adata_map, adata_sp, annotation='cell_type', x='x', y='y', nrows=1, ncols=1, s=5, cmap='viridis', subtitle_add=False, robust=False, perc=0, invert_y=True)
Transfer an annotation for a single cell dataset onto space, and visualize corresponding spatial probability maps.
- Parameters
adata_map (AnnData) – cell-by-spot AnnData containing mapping result
adata_sp (AnnData) – spot-by-gene spatial AnnData
annotation (str) – Optional. Must be a column in adata_map.obs. Default is ‘cell_type’.
x (str) – Optional. Column name for spots x-coordinates (must be in adata_map.var). Default is ‘x’.
y (str) – Optional. Column name for spots y-coordinates (must be in adata_map.var). Default is ‘y’.
nrows (int) – Optional. Number of rows of the subplot grid. Default is 1.
ncols (int) – Optional. Number of columns of the subplot grid. Default is 1.
s (float) – Optional. Marker size. Default is 5.
cmap (str) – Optional. Name of colormap. Default is ‘viridis’.
subtitle_add (bool) – Optional. If add annotation name as the subtitle. Default is False.
robust (bool) – Optional. If True, the colormap range is computed with given percentiles instead of extreme values.
perc (float) – Optional. percentile used to calculate colormap range, only used when robust is True. Default is zero.
invert_y (bool) – Optional. If invert the y axis for the plot. Default is True.
- Returns
None