Skip to content

scdef.pl.obs_factor_dotplot

obs_factor_dotplot(model: scDEF, obs_key: str, layer_idx: int, cluster_rows: bool = True, cluster_cols: bool = True, figsize: Tuple[float, float] = (8, 2), s_min: int = 100, s_max: int = 500, titlesize: int = 12, labelsize: int = 12, legend_fontsize: int = 12, legend_titlesize: int = 12, cmap: str = FACTOR_CMAP, logged: bool = False, width_ratios: List[float] = [5, 1, 1], show_ylabel: bool = True, show: bool = True) -> Optional[Figure]

Plot dotplot showing factor assignments for observations.

Parameters:

Name Type Description Default
model scDEF

scDEF model instance

required
obs_key str

key in model.adata.obs to use for grouping

required
layer_idx int

layer index to plot

required
cluster_rows bool

whether to cluster rows

True
cluster_cols bool

whether to cluster columns

True
figsize Tuple[float, float]

figure size

(8, 2)
s_min int

minimum circle size

100
s_max int

maximum circle size

500
titlesize int

title font size

12
labelsize int

label font size

12
legend_fontsize int

legend font size

12
legend_titlesize int

legend title font size

12
cmap str

colormap name

FACTOR_CMAP
logged bool

whether to log transform colors

False
width_ratios List[float]

width ratios for subplots

[5, 1, 1]
show_ylabel bool

whether to show y-axis label

True
show bool

whether to show the plot

True

Returns:

Type Description
Optional[Figure]

Figure object if show is False, None otherwise