scdef.pl.umap ¶
umap(model: scDEF, color: Union[str, List[str]] = [], layers: Optional[List[Union[int, str]]] = None, figsize: Tuple[float, float] = (16, 4), fontsize: int = 12, legend_fontsize: int = 10, rasterized: bool = True, n_legend_cols: int = 1, factor_subset: Optional[List[str]] = None, cmap: Optional[str] = None, show: bool = True) -> None
Plot pre-computed UMAPs for different layers.
UMAP embeddings must have been computed first via scdef.tl.umap. Each
panel temporarily points adata.obsm['X_umap'] at X_umap_{layer_name};
the original X_umap is restored afterward. When layers is None,
panels follow ascending layer index (L0, L1, ...); otherwise the given
layers order is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
scDEF
|
scDEF model instance |
required |
color
|
Union[str, List[str]]
|
color key(s) to use for coloring |
[]
|
layers
|
Optional[List[Union[int, str]]]
|
which layers to plot, in panel order. Entries are layer indices;
a string entry is used as an embedding name directly, so
|
None
|
figsize
|
Tuple[float, float]
|
figure size |
(16, 4)
|
fontsize
|
int
|
font size for labels |
12
|
legend_fontsize
|
int
|
legend font size |
10
|
rasterized
|
bool
|
whether to rasterize the plot |
True
|
n_legend_cols
|
int
|
number of columns in legend |
1
|
factor_subset
|
Optional[List[str]]
|
subset of factors to plot |
None
|
cmap
|
Optional[str]
|
colormap for continuous keys; by default |
None
|
show
|
bool
|
whether to show the plot |
True
|