ehrapy.plot.paga_path#
- ehrapy.plot.paga_path(edata, 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]#
Feature changes along paths in the abstracted graph.
- Parameters:
edata (
EHRData) – Central data object.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 edata.var_names or annotations in edata.obs. They are plotted using color_map.use_raw (
bool, default:True) – Use edata.raw for retrieving feature values if it has been set.annotations (
Sequence[str], default:('dpt_pseudotime',)) – Plot these keys with color_maps_annotations. Need to be keys for edata.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) – Usually, 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 to edata.uns[‘paga’][‘groups’].xlim (
tuple[int|None,int|None], default:(None, None)) – Matplotlib x limit.left_margin (default:
None) – Margin to the left of the plot.ytick_fontsize (
int|None, default:None) – Matplotlib ytick fontsize.title_fontsize (
int|None, default:None) – Font size of the title.show_node_names (
bool, default:True) – Whether to plot the node names on the nodes bar.show_yticks (
bool, default:True) – Whether to show the y axis ticks.show_colorbar (
bool, default:True) – Whether to show the color bar.legend_fontsize (
int|float|Literal['xx-small','x-small','small','medium','large','x-large','xx-large'] |None, default:None) – Font size of the legend.legend_fontweight (
int|Literal['light','normal','medium','semibold','bold','heavy','black'] |None, default:None) – Font weight of the legend.normalize_to_zero_one (
bool, default:False) – Shift and scale the running average to [0, 1] per feature.as_heatmap (
bool, default:True) – Whether to display the plot as heatmap.return_data (
bool, default:False) – Whether to return the timeseries data in addition to the axes if True.show (
bool|None, default:None) – Whether to show the plot.save (
bool|str|None, default:None) – Whether or where to save the plot.
- Return type: