SOAPy_st.pl.show_ccc_embedding

SOAPy_st.pl.show_ccc_embedding(adata: AnnData, ligand: str | list, receptor: str | list, ligand_clusters: list | str | int, receptor_clusters: list | str | int, cluster_key: str = 'cell_type', ligand_region: Tuple[Any, Any] | None = None, receptor_region: Tuple[Any, Any] | None = None, ligand_color: Colormap | str | None = None, receptor_color: Colormap | str | None = None, row_region: Tuple[Any, Any] | None = None, col_region: Tuple[Any, Any] | None = None, agg_method: Literal['mean', 'min', 'gmean'] = 'gmean', title: str | None = None, figsize: Tuple[Any, Any] | None = None, dpi: int = 100, ax: Axes | None = None, size: float | None = None, obsm_spatial_label: str = 'spatial', show: bool = True, save: str | None = None, cbar_kwargs: dict | None = {}, **kwargs) Axes | None

To map the distribution of ligands and receptors expression of different cell type in a situ map of tissue.

Parameters

adataanndata.AnnData

An AnnData object containing spatial omics data and spatial information.

figsizeTuple[float, float], optional

(Width, height) of the figure.

dpifloat, optional

The resolution of the figure.

titlestr, optional

The title of shown figure.

axAxes

A matplotlib axes object.

showbool

Show the plot, do not return axis.

saveUnion[str, PathLike], optional

The path where the image is stored.

ligandUnion[str, list]

Ligand name or a list containing ligand subunits

receptorUnion[str, list]

Receptor name or a list containing receptor subunits

ligand_clustersUnion[list, str, int]

The cell type clusters of the ligand shown, cannot be duplicated with the clusters of the receptor, otherwise overlap would occur.

receptor_clustersUnion[list, str, int]

The cell type clusters of the receptor shown, cannot be duplicated with the clusters of the ligand, otherwise overlap would occur.

cluster_keystr

The label of cluster in adata.obs.

ligand_regionTuple[Any, Any]

The range of values of the ligand. (ligand_min, ligand_max)

receptor_regionTuple[Any, Any]

The range of values of the receptor. (receptor_min, receptor_max)

ligand_colorUnion[Colormap, str]

The color of the ligand.

receptor_colorUnion[Colormap, str]

The color of the receptor.

row_regionTuple[Any, Any]

The row coordinate threshold of the region in the situ map is displayed, and the expression of the whole situ map is displayed by default. (row_low, row_high)

col_regionTuple[Any, Any]

The row coordinate threshold of the region in the situ map is displayed, and the expression of the whole situ map is displayed by default. (row_low, row_high)

agg_methodstr

Integrated subunit to calculate ligand or receptor. ‘min’: ligand or receptor = min(sub1, sub2, sub3, …) ‘mean’: ligand or receptor = mean(sub1, sub2, sub3, …) ‘gmean’: geometrical mean, ligand or receptor = np.gmean(sub1, sub2, sub3, …)

sizeOptional[float]

Size of the points in figure.

obsm_spatial_labelstr

The key of spatial coordinates in adata.obsm.

cbar_kwargsOptional[dict]

Other parameters in plt.colorbar().

kwargsAny, optional

Other params of ax.scatter()

Returns

If show==False, return Axes