dynamo.pl.curl

dynamo.pl.curl(adata, basis='umap', color=None, cmap='bwr', frontier=True, sym_c=True, *args, **kwargs)[source]

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

Cells with negative or positive curl correspond to cells with clock-wise rotation vectors or counter-clock-wise ration vectors. Currently only support for 2D vector field. But in principal could be generated to high dimension space.

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

  • basis (str) – the embedding data in which the vector field was reconstructed and RNA curl was estimated. Defaults to “umap”.

  • color (Union[List[str], str, None]) – any column names or gene names, etc. in addition to the curl to be used for coloring cells. Defaults to None.

  • cmap (str) – the color map used for the plot. Defaults to “bwr”.

  • frontier (bool) – 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. Defaults to True.

  • sym_c (bool) – whether do you want to make the limits of continuous color to be symmetric, normally this should be used for plotting velocity, curl, divergence or other types of data with both positive or negative values. Defaults to True.

  • *args – any other positional arguments to be passed to dynamo.pl.scatters.

  • **kwargs – any other kwargs to be passed to dynamo.pl.scatters.

Raises:

ValueError – curl information not found in adata.

Return type:

Union[Axes, List[Axes], Tuple[Axes, List[str], Literal['white', 'black']], Tuple[List[Axes], List[str], Literal['white', 'black']], None]

Returns:

None would be returned by default. If in kwargs save_show_or_return is set to be ‘return’ or ‘all’, the matplotlib axes object of the generated plots would be returned. If return_all is set to be true, the list of colors used and the font color would also be returned. See docs of dynamo.pl.scatters for more information.