swiftcnv.plot_cnv_multi

Contents

swiftcnv.plot_cnv_multi#

plot_cnv_multi(mat, ref_cells, regions, groups, output_file, **kwargs)#

Plot matrix divided by groups into a multi-page PDF file with one page per group.

Automatic limits for vmin and vmax are computed globally across observation cells from all groups. Additional keyword arguments are passed directly to plot_cnv().

Parameters:
  • mat (numpy.ndarray) – Input CNV matrix to plot.

  • ref_cells (numpy.ndarray of bool) – Boolean array indicating reference cell status.

  • regions (numpy.ndarray of str) – Array of gene region annotations (e.g., chromosomes or arms).

  • groups (numpy.ndarray) – Array of group labels (e.g., sample or cell type) used to split the plot into separate PDF pages.

  • output_file (str) – Path to the output PDF file.

  • **kwargs – Additional keyword arguments passed to plot_cnv().

Returns:

Saves a multi-page PDF document to output_file with one heatmap page per group.

Return type:

None