sparrow.pl.cluster#
- sparrow.pl.cluster(sdata, table_layer, key_added='leiden', output=None)#
Visualize clusters.
Plot sthe clusters on a UMAP (using
scanpy.pl.umap), and shows the most differentially expressed genes/channels for each cluster on a second plot (usingscanpy.pl.rank_genes_group), if “rank_genes_groups” is insdata.tables[table_layer].uns.keys().- Parameters:
sdata (
SpatialData) – The SpatialData object containing the analyzed data.table_layer (
str) – The table layer insdatato visualize.key_added (
str(default:'leiden')) – name of the column insdata.tables[table_layer].obsthat contains the cluster id.output (
str|None(default:None)) – The file path prefix for the plots (default is None). If provided, the plots will be saved to the specified output file path with “_umap.png” and “_rank_genes_groups.png” as suffixes. If None, the plots will be displayed directly without saving.
- Return type:
None- Returns:
: None
See also