scrnatools.plotting.gene_embedding

scrnatools.plotting.gene_embedding(adata: AnnData, gene_list: List[str], layer: str, figsize: Tuple[int, int] = (4, 4), dpi: int = 80, dpi_save: int = 300, min_quantile: float = 0.01, max_quantile: float = 0.99, use_rep='X_umap', *args, **kwargs)[source]

Creates a UMAP/TSNE plot of a gene’s expression from a layer using scanpy.

Parameters:
  • adata (AnnData) – The dataset containing gene expression data.

  • gene_list (List[str]) – The list of genes to plot.

  • layer (str) – The layer containing expression data, or ‘X’ to use the expression data stored in adata.X.

  • figsize (Tuple[int, int], optional) – The size of each panel. Defaults to (4, 4).

  • dpi (int, optional) – The dpi of plots shown inline. Defaults to 80.

  • dpi_save (int, optional) – The dpi of saved plots. Defaults to 300.

  • min_quantile (float, optional) – The quantile of expression for a gene to set the minimum of the colorbar to. Defaults to 0.01.

  • max_quantile (float, optional) – The quantile of expression for a gene to set the maximum of the colorbar to. Defaults to 0.99.

  • use_rep (str, optional) – The embedding coordinates in ‘adata.obsm’ to use. Defaults to “X_umap”.

Raises:

ValueError – If ‘layer’ is not a valid key in ‘adata.layers’