troutpy.pl.sorted_heatmap

Contents

troutpy.pl.sorted_heatmap#

troutpy.pl.sorted_heatmap(celltype_by_feature, output_path='', filename='Heatmap_target_cells_by_gene', format='pdf', cmap='viridis', vmax=None, save=False, figsize=(10, 10))#

Plot a heatmap of features by cell type, sorted by each feature’s dominant cell type.

Parameters:
  • celltype_by_feature (DataFrame) – DataFrame showing the value of each feature by cell type.

  • output_path (str (default: '')) – Directory in which to save the figure. A figures subdirectory is created within it.

  • filename (str (default: 'Heatmap_target_cells_by_gene')) – Name used for the plot title and, if save is True, the saved file.

  • format (str (default: 'pdf')) – File format used when saving the figure.

  • cmap (str (default: 'viridis')) – Colormap for the heatmap.

  • vmax (Optional[float] (default: None)) – Maximum value for the colormap.

  • save (bool (default: False)) – Whether to save the figure to output_path.

  • figsize (tuple[float, float] (default: (10, 10))) – Size of the figure.

Return type:

None

Returns:

None