cospar.pl.gene_expression_heatmap

cospar.pl.gene_expression_heatmap(adata, selected_genes=None, selected_fates=None, rename_fates=None, color_bar=True, method='relative', fig_width=6, fig_height=3, horizontal='True', vmin=None, vmax=None, figure_index='', order_map_x=True, order_map_y=True, **kwargs)

Plot heatmap of gene expression within given clusters.

Parameters
adata : AnnData object

selected_genes : list, optional (default: None)

A list of selected genes.

selected_fates : list, optional (default: all)

List of cluster ids consistent with adata.obs[‘state_info’]. It allows a nested structure. If so, we merge clusters within each sub-list into a mega-fate cluster.

method : str, optional (default: ‘relative’)

Method to normalize gene expression. Options: {‘relative’,’zscore’,f’relative_{j}’}. ‘relative’: given coarse-grained gene expression in given clusters, normalize the expression across clusters to be 1; ‘zscore’: given coarse-grained gene expression in given clusters, compute its zscore. f’relative_{j}’: use j-th row for normalization

rename_fates : list, optional (default: None)

Provide new names in substitution of names in selected_fates. For this to be effective, the new name list needs to have names in exact correspondence to those in the old list.

color_bar : bool, optional (default: True)

If true, show the color bar.

fig_width : int, optional (default: 6)

Figure width.

fig_height : int, optional (default: 3)

Figure height.

horizontal : bool, optional (default: True)

Figure orientation.

vmin : float, optional (default: None)

Minimum value to show.

vmax : float, optional (default: None)

Maximum value to show.

figure_index

A string for index the figure names.

order_map_x : bool

Whether to re-order the x coordinate of the matrix or not

order_map_y : bool

Whether to re-order the y coordinate of the matrix or not

Returns

gene_expression_matrix (np.array)