spcoral.plot.show_cross_anchor_Sankey#
- spcoral.plot.show_cross_anchor_Sankey(adata_omics1, adata_omics2, registering_parameters, celltype_label=None, fontsize=12, color_map=None, aspect=10, leftLabels=None, rightLabels=None, rightColor=False, figsize=None, dpi=None, title=None, ax=None, show=True, save=None)#
Generate a Sankey diagram to visualize the relationship between two omics datasets based on cell type labels.
Parameters:#
- adata_omics1anndata.AnnData
AnnData object containing the first omics dataset.
- adata_omics2anndata.AnnData
AnnData object containing the second omics dataset.
- registering_parametersDict
Dictionary containing indices or keys to access anchor points for both omics datasets.
- celltype_labelOptional[str], default None
Column name in adata.obs containing cell type labels.
- fontsizeint, default 14
Font size for labels in the Sankey diagram.
- color_mapOptional[Union[List, Dict]], default None
Color mapping for the Sankey diagram. If a list, maps colors to labels; if a dict, maps labels to colors. If None, a default color palette is generated.
- aspectfloat, default 10
Aspect ratio of the Sankey diagram (vertical extent / horizontal extent).
- leftLabelsOptional[List], default None
Ordered list of labels for the left side of the Sankey diagram. If None, unique labels are used.
- rightLabelsOptional[List], default None
Ordered list of labels for the right side of the Sankey diagram. If None, unique labels are used.
- rightColorbool, default False
If True, color the strips based on right-side labels; otherwise, use left-side labels.
- figsizeOptional[Tuple[float, float]], default None
Figure size (width, height) for the plot. If None, defaults to (7, 7).
- dpiOptional[float], default None
Dots per inch for the figure. If None, uses matplotlib’s default.
- titleOptional[str], default None
Title for the plot. If None, no title is displayed.
- axOptional[matplotlib.axes.Axes], default None
Matplotlib axes object to draw the plot on. If None, a new figure and axes are created.
- showbool, default True
If True, display the plot. If False, return the axes object.
- saveOptional[Union[str, os.PathLike]], default None
File path to save the plot. If None, the plot is not saved.
- **kwargsDict[str, Any]
Additional keyword arguments passed to the sankey function.
Returns:#
: matplotlib.axes.Axes
The axes object containing the Sankey diagram, returned only if show=False.
- Parameters: