Skip to content

scdef.tl.multilevel_paga

multilevel_paga(model: scDEF, neighbors_rep: str = 'X_L0', layers: Optional[List[int]] = None, reuse_pos: bool = True, layout: str = 'fa', random_seed: int = 0, **paga_kwargs: Any) -> None

Compute and cache multilevel PAGA results for plotting.

Runs PAGA once per layer over a single shared neighbourhood graph, so the coarse and fine graphs describe the same cells at different resolutions. Plot the cached result with scdef.pl.multilevel_paga.

Parameters:

Name Type Description Default
model scDEF

fitted scDEF model, annotated so that adata.obs carries the layer assignment columns.

required
neighbors_rep str

adata.obsm representation the neighbourhood graph is built from. The layer-0 scores by default.

'X_L0'
layers Optional[List[int]]

layer indices to run, coarsest first. Defaults to every layer with more than one factor — a single-factor layer has no graph to draw.

None
reuse_pos bool

initialize each layer's layout from the previous, coarser one, so a group stays in roughly the same place as resolution increases and the layers can be read side by side.

True
layout str

graph layout passed to scanpy, "fa" (ForceAtlas2) by default.

'fa'
random_seed int

seed for the layout, so repeated runs place nodes identically.

0
**paga_kwargs Any

forwarded to scanpy.tl.paga.

{}