scanpy.pl.paga_path#
- scanpy.pl.paga_path(adata, nodes, keys, *, use_raw=True, annotations=('dpt_pseudotime',), color_map=None, color_maps_annotations=mappingproxy({'dpt_pseudotime': 'Greys'}), palette_groups=None, n_avg=1, groups_key=None, xlim=(None, None), title=None, left_margin=None, ytick_fontsize=None, title_fontsize=None, show_node_names=True, show_yticks=True, show_colorbar=True, legend_fontsize=None, legend_fontweight=None, normalize_to_zero_one=False, as_heatmap=True, return_data=False, show=None, save=None, ax=None)[source]#
Gene expression and annotation changes along paths in the abstracted graph.
- Parameters:
- adata
AnnData An annotated data matrix.
- nodes
Sequence[str|int] A path through nodes of the abstracted graph, that is, names or indices (within
.categories) of groups that have been used to run PAGA.- keys
Sequence[str] Either variables in
adata.var_namesor annotations inadata.obs. They are plotted usingcolor_map.- use_raw
bool(default:True) Use
adata.rawfor retrieving gene expressions if it has been set.- annotations
Sequence[str] (default:('dpt_pseudotime',)) Plot these keys with
color_maps_annotations. Need to be keys foradata.obs.- color_map
str|Colormap|None(default:None) Matplotlib colormap.
- color_maps_annotations
Mapping[str,str|Colormap] (default:mappingproxy({'dpt_pseudotime': 'Greys'})) Color maps for plotting the annotations. Keys of the dictionary must appear in
annotations.- palette_groups
Sequence[str] |None(default:None) Ususally, use the same
sc.pl.palettes...as used for coloring the abstracted graph.- n_avg
int(default:1) Number of data points to include in computation of running average.
- groups_key
str|None(default:None) Key of the grouping used to run PAGA. If
None, defaults toadata.uns['paga']['groups'].- as_heatmap
bool(default:True) Plot the timeseries as heatmap. If not plotting as heatmap,
annotationshave no effect.- show_node_names
bool(default:True) Plot the node names on the nodes bar.
- show_colorbar
bool(default:True) Show the colorbar.
- show_yticks
bool(default:True) Show the y ticks.
- normalize_to_zero_one
bool(default:False) Shift and scale the running average to [0, 1] per gene.
- return_data
bool(default:False) Return the timeseries data in addition to the axes if
True.- show
bool|None(default:None) Show the plot, do not return axis.
- save
bool|str|None(default:None) If
Trueor astr, save the figure. A string is appended to the default filename. Infer the filetype if ending on {'.pdf','.png','.svg'}.- ax
Axes|None(default:None) A matplotlib axes object.
- adata
- Return type:
- Returns:
A
Axesobject, ifaxisNone, elseNone. Ifreturn_data, return the timeseries data in addition to an axes.