dynamo.pl.feature_genes

dynamo.pl.feature_genes(adata, layer='X', mode=None, figsize=(4, 3), save_show_or_return='show', save_kwargs={})[source]

Plot selected feature genes on top of the mean vs. dispersion scatterplot.

Parameters:
  • adata (AnnData) – an AnnData object.

  • layer (str) – the data from a particular layer (include X) used for making the feature gene plot. Defaults to “X”.

  • mode (Optional[Literal['cv_dispersion', 'fano_dispersion', 'seurat_dispersion', 'gini']]) – the method to select the feature genes (can be either one kind of dispersion or gini). Defaults to None.

  • figsize (tuple) – the size of each panel of the figure. Defaults to (4, 3).

  • save_show_or_return (Literal['save', 'show', 'return']) – whether to save, show, or return the generated figure. Can be one of ‘save’, ‘show’, or ‘return’. Defaults to “show”.

  • save_kwargs (Dict[str, Any]) – a dictionary that will be passed to the save_show_ret function. By default, it is an empty dictionary and the save_show_ret function will use the {“path”: None, “prefix”: ‘feature_genes’, “dpi”: None, “ext”: ‘pdf’, “transparent”: True, “close”: True, “verbose”: True} as its parameters. Otherwise, you can provide a dictionary that properly modify those keys according to your needs. Defaults to {}.

Raises:

ValueError – vector machine regression result not available in the AnnData object.

Return type:

Optional[PathCollection]

Returns:

None would be returned by default. If save_show_or_return is set to be ‘return’, the PathCollection generated with pyplot.scatter would be returned.