scanpy.pl.paga_path¶
-
scanpy.pl.
paga_path
(adata, nodes, keys, use_raw=True, annotations=['dpt_pseudotime'], color_map=None, color_maps_annotations={'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)¶ Gene expression and annotation changes along paths in the abstracted graph.
- Parameters
- adata :
AnnData
An annotated data matrix.
- nodes : list of group names or their category indices
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 : list of str
Either variables in
adata.var_names
or annotations inadata.obs
. They are plotted usingcolor_map
.- use_raw :
bool
, optional (default:True
) Use
adata.raw
for retrieving gene expressions if it has been set.- annotations : list of annotations, optional (default: ['dpt_pseudotime'])
Plot these keys with
color_maps_annotations
. Need to be keys foradata.obs
.- color_map : color map for plotting keys or
None
, optional (default:None
) Matplotlib colormap.
- color_maps_annotations : dict storing color maps or
None
, optional (default: {‘dpt_pseudotime’: ‘Greys’}) Color maps for plotting the annotations. Keys of the dictionary must appear in
annotations
.- palette_groups : list of colors or
None
, optional (default:None
) Ususally, use the same
sc.pl.palettes...
as used for coloring the abstracted graph.- n_avg :
int
, optional (default: 1) Number of data points to include in computation of running average.
- groups_key :
str
, optional (default:None
) Key of the grouping used to run PAGA. If
None
, defaults toadata.uns['paga']['groups']
.- as_heatmap :
bool
, optional (default:True
) Plot the timeseries as heatmap. If not plotting as heatmap,
annotations
have no effect.- show_node_names :
bool
, optional (default:True
) Plot the node names on the nodes bar.
- show_colorbar :
bool
, optional (default:True
) Show the colorbar.
- show_yticks :
bool
, optional (default:True
) Show the y ticks.
- normalize_to_zero_one :
bool
, optional (default:True
) Shift and scale the running average to [0, 1] per gene.
- return_data :
bool
, optional (default:False
) Return the timeseries data in addition to the axes if
True
.- show :
bool
, optional (default:None
) Show the plot, do not return axis.
- save :
bool
orstr
, optional (default:None
) If
True
or astr
, save the figure. A string is appended to the default filename. Infer the filetype if ending on {‘.pdf’, ‘.png’, ‘.svg’}.- ax :
Axes
A matplotlib axes object.
- adata :
- Return type
- Returns
A
Axes
object, ifax
isNone
, elseNone
. Ifreturn_data
, return the timeseries data in addition to an axes.