dynamo.pl.speed

dynamo.pl.speed(adata, basis='pca', color=None, frontier=True, *args, **kwargs)[source]

Scatter plot with cells colored by the estimated velocity speed (and other information if provided).

Parameters
  • adata (AnnData) – an Annodata object with speed estimated.

  • basis (str or None (default: pca)) – The embedding data in which the vector field was reconstructed and RNA speed was estimated.

  • color (str, list or None:) – Any column names or gene names, etc. in addition to the curl to be used for coloring cells.

  • frontier (bool (default: False)) – Whether to add the frontier. Scatter plots can be enhanced by using transparency (alpha) in order to show area of high density and multiple scatter plots can be used to delineate a frontier. See matplotlib tips & tricks cheatsheet (https://github.com/matplotlib/cheatsheets). Originally inspired by figures from scEU-seq paper: https://science.sciencemag.org/content/367/6482/1151.

Returns

Return type

Nothing but plots scatterplots with cells colored by the estimated speed (and other information if provided)

Examples

>>> import dynamo as dyn
>>> adata = dyn.sample_data.hgForebrainGlutamatergic()
>>> adata = dyn.pp.recipe_monocle(adata)
>>> dyn.tl.dynamics(adata)
>>> dyn.tl.reduceDimension(adata)
>>> dyn.tl.VectorField(adata, basis='pca')
>>> dyn.tl.speed(adata)
>>> dyn.pl.speed(adata)

See also:: external.ddhodge.curl() for calculating curl with a diffusion graph built from reconstructed vector field.