scgenome.pl.plot_cell_cn_matrix#
- scgenome.pl.plot_cell_cn_matrix(adata, layer_name='state', cell_order_fields=(), ax=None, raw=False, max_cn=13, vmin=None, vmax=None, cmap=None, show_cell_ids=False)#
Plot a copy number matrix
- Parameters:
adata (AnnData) – copy number data
layer_name (str, optional) – layer with copy number data to plot, None for X, by default ‘state’
cell_order_fields (list, optional) – columns of obs on which to sort cells, by default None
ax (matplotlib.axes.Axes, optional) – existing axis to plot into, by default None
raw (bool, optional) – raw plotting, no integer color map, by default False
max_cn (int, optional) – clip cn at max value, raw=False only, by default 13
vmin (float, optional) – for raw=True, vmin and vmax define the data range that the colormap covers, see
matplotlib.pyplot.imshowvmax (float, optional) – for raw=True, vmin and vmax define the data range that the colormap covers, see
matplotlib.pyplot.imshowcmap (str, optional) – matplotlib colormap name, only used if raw=True
show_cell_ids (bool, optional) – show cell ids on heatmap axis, by default False
- Returns:
Dictionary of plot and data elements
- Return type:
Examples
import scgenome adata = scgenome.datasets.OV2295_HMMCopy_reduced() scgenome.pl.plot_cell_cn_matrix(adata)