grassp.pl.remodeling_sankey#
- remodeling_sankey(data, data2, cluster_key='leiden', ax=None, aspect=20, fontsize=12, figsize=(10, 11), show=None, save=None)[source]#
Plot a Sankey diagram showing protein transitions between clusters.
- Parameters:
- data
AnnData
First annotated data matrix
- data2
AnnData
Second annotated data matrix
- cluster_key
str
(default:'leiden'
) Key in data.obs and data2.obs containing cluster assignments
- ax
Optional
[Axes
] (default:None
) Matplotlib axes object to plot on. If None, creates new figure
- aspect
int
(default:20
) Aspect ratio of the plot
- fontsize
int
(default:12
) Font size for labels
- figsize
tuple
[float
,float
] (default:(10, 11)
) Size of the figure in inches
- show
Optional
[bool
] (default:None
) Show the plot. If None, use scanpy’s plotting settings
- save
Union
[bool
,str
,None
] (default:None
) If True or a str, save the figure. A string is appended to the default filename. Infer the filetype if ending on {‘.pdf’, ‘.png’, ‘.svg’}
- data
- Return type:
Axes
|None
- Returns:
ax or None If show=False, returns matplotlib axes object. Otherwise returns None