SOAPy_st.pl.show_ccc_netplot
- SOAPy_st.pl.show_ccc_netplot(adata: AnnData, sample_id: int | str | None = None, lr_type: Literal['contact', 'secretory'] = 'contact', pos: dict | None = None, cmap: str | None = None, font_size: int = 12, node_size_exp: int = 1, node_size_scaler: int = 1, min_counts: int = 0, ax: Axes | None = None, figsize: tuple = (8, 8), dpi: int = 100, show: bool = True, save: str | None = None, **kwargs) Axes | None
Visualize ligand-receptor interactions between two cell types in spatial omics data using network plot.
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.
- lr_type: str
The LR pair to visualise the cci network for. If None, will use spot cci counts across all LR pairs from adata.uns[f’lr_cci_use_label’].
- pos: dict
Positions to draw each cell type, format as outputted from running networkx.circular_layout(graph). If not inputted will be generated.
- cmap: str
Cmap to use when generating the cell colors, if not already specified by adata.uns[f’use_label_colors’].
- font_size: int
Size of the cell type labels.
- node_size_scaler: float
Scaler to multiply by node sizes to increase/decrease size.
- node_size_exp: int
Increases difference between node sizes by this exponent.
- min_counts: int
Minimum no. of LR interactions for connection to be drawn.
- kwargsAny
Other params of nx.draw_networkx()
Returns
- pos: dict
Dictionary of positions where the nodes are draw if return_pos is True, useful for consistent layouts.
References
- Pham, D. et al. Robust mapping of spatiotemporal trajectories and cell–cell interactions in healthy and diseased
tissues. Nat Commun 14, 7739 (2023).