scatrans.pl.velocity_phase_portraits#
- scatrans.pl.velocity_phase_portraits(adata, genes, groupby=None, spliced_layer='spliced', unspliced_layer='unspliced', max_genes=6, figsize_per_gene=(2.8, 2.4), save_path=None, dpi=300, show=True, use_style=False, **kwargs)[source]#
Quick diagnostic grid of unspliced vs spliced (phase-portrait style) for selected genes.
Useful for visually inspecting whether top active genes show the expected excess nascent RNA in the target group. Points are colored by the groupby column when provided.
This is intentionally lightweight — for full control users are encouraged to write their own small U/S scatter functions.
Supports dpi, show, use_style for consistency with other pl.* functions. When groupby is provided, uses a categorical colormap (tab20) + figure-level legend.
- Parameters:
genes (list-like) – Gene names (index of adata.var) to plot.
groupby (str, optional) – obs column used for coloring (e.g. the same contrast column used in active_score).
max_genes (int) – Maximum number of genes to plot (grid will be truncated).
dpi (int) – DPI for figure creation and save (default 300 for publication quality).
show (bool) – Whether to call plt.show() (only relevant when function created the figure).
use_style (bool)