infercnvpy.pl.chromosome_heatmap

infercnvpy.pl.chromosome_heatmap#

infercnvpy.pl.chromosome_heatmap(adata, *, groupby='cnv_leiden', use_rep='cnv', cmap='bwr', figsize=(16, 10), show=None, save=None, **kwargs)#

Plot a heatmap of smoothed gene expression by chromosome.

Wrapper around scanpy.pl.heatmap().

Parameters:
  • adata (AnnData) – annotated data matrix

  • groupby (str (default: 'cnv_leiden')) – group the cells by a categorical variable from adata.obs. It usually makes sense to either group by unsupervised clustering obtained from infercnvpy.tl.leiden() (the default) or a cell-type label.

  • use_rep (str (default: 'cnv')) – Key under which the result from infercnvpy.tl.infercnv() are stored.

  • cmap (Union[str, Colormap] (default: 'bwr')) – colormap to use

  • figsize (tuple[int, int] (default: (16, 10))) – (width, height) tuple in inches

  • show (Optional[bool] (default: None)) – Whether to show the figure or to return the axes objects.

  • save (Union[str, bool, None] (default: None)) – If True or a str, save the figure. A string is appended to the default filename. Infer the filetype if ending on {'.pdf', '.png', '.svg'}.

  • **kwargs – Arguments passed on to scanpy.pl.heatmap().

Return type:

Optional[dict[str, Axes]]

Returns:

If show is False, a dictionary of axes.