clusterPlots
clusterPlots ¶
clusterPlots(
data,
groupBy,
subsample=100000,
palette="viridis",
useRaw=False,
size=None,
outputDir=None,
show=True,
returnData=False,
returnFig=False,
sdataTable=None,
**kwargs
)
Plot cluster labels on an existing UMAP embedding.
A convenience wrapper: clusterPlots(adata, groupBy="leiden") is
sp.pl.umap(adata, color="leiden") with a palette default suited to cluster
labels. Requires an embedding in obsm['umap'], so run
sp.tl.umap first.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
(AnnData | SpatialData | str, required)
|
The cell table. An |
required |
groupBy
|
(str, required)
|
Column in |
required |
subsample
|
int
|
Accepted for signature compatibility with scimap. The current implementation plots every cell; subsample the object yourself if you need to. |
100000
|
palette
|
str
|
Matplotlib colormap name used to build the discrete palette. |
'viridis'
|
useRaw
|
bool
|
Accepted for signature compatibility with scimap; it has no effect when colouring by a label column. |
False
|
size
|
float
|
Point size. |
None
|
outputDir
|
str
|
Directory to save the figure in. |
None
|
show
|
bool
|
Call |
True
|
returnData
|
bool
|
Return the plotted |
False
|
returnFig
|
bool
|
Return |
False
|
sdataTable
|
str
|
Which |
None
|
**kwargs
|
dict
|
Forwarded to |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
None | DataFrame | tuple
|
Whatever |