SOAPy_st.pl.show_neighborhood_analysis
- SOAPy_st.pl.show_neighborhood_analysis(adata: AnnData, method: Literal['excluded', 'include'] = 'excluded', sample_id: int | str | None = None, figsize: Tuple[float, float] | None = (8, 8), dpi: int = 100, title: str | None = None, vmin: float | None = None, vmax: float | None = None, cmap: Any | None = None, show: bool = True, save: str | PathLike | None = None, ax: Axes | None = None, **kwargs: Any) Axes | None
Use heatmap to display the results of neighbor analysis.
Parameters
- adataanndata.AnnData
An AnnData object containing spatial omics data and spatial information.
- methodstr, optional
‘included’: Z-scores of edges between two cell types were counted directly after randomization. ‘excluded’: After randomization, remove self-connected edges between cells of the same type and calculate the z-score of edges between two cell types.
- sample_idUnion[int, str], optional
The sample number which to be shown.
- figsizeTuple[float, float], optional
(Width, height) of the figure.
- dpifloat, optional
The resolution of the figure.
- titlestr, optional
The title of shown figure.
- vminfloat, optional
Lower end of scale bar.
- vmaxfloat, optional
Upper end of scale bar.
- cmapAny, optional
Color map to use for continuous variables.
- showbool, optional
Show the plot, do not return axis.
- saveUnion[str, PathLike], optional
The path where the image is stored.
- axAxes, optional
A matplotlib axes object.
- kwargsAny
Other params of sns.heatmap().
Returns
- Optional[Axes]
The matplotlib axes object if show is False, otherwise None.