SOAPy_st.pl.show_infiltration_analysis
- SOAPy_st.pl.show_infiltration_analysis(adata: AnnData, parenchyma: str, nonparenchyma: str, min_nonparenchyma: int | None = None, sample: list | None = None, figsize: Tuple[float, float] | None = None, dpi: int = 100, color_num: str = 'red', color_score: str = 'blue', grid: bool = True, show: bool = True, save: str | PathLike | None = None) Tuple[Axes, Axes] | None
Use barplot to display infiltration scores and the number of non-parenchymal cells.
Parameters
- adataanndata.AnnData
An AnnData object containing spatial omics data and spatial information.
- parenchymastr
The cluster name of parenchyma cell.
- nonparenchymastr
The cluster name of non-parenchyma cell.
min_nonparenchyma
- sampleUnion[list, None]
Samples that need to be presented with infiltration scores. By default, all samples for which the infiltration score was calculated are displayed.
- figsizeTuple[Any, Any]
The size of format figure.(width, height).
- dpiint
Dots per inch values for the output.
- color_numstr
The color of cells number of non-parenchyma.
- color_scorestr
The color of infiltration score.
- gridbool
Whether to add grid or not.
- showbool
Show the plot, do not return axis.
- saveUnion[str, PathLike]
The path where the image is stored.
Returns
- If show==False, return a tuple of two Axes. ax_left is the barplot Axes of nonparenchyma number,
and ax_right is the barplot Axes of infiltration score.
References
- Nicolas P. Rougier. Scientific Visualization: Python + Matplotlib. Nicolas P. Rougier. , 2021, 978-2-
9579901-0-8. ffhal-03427242