crested.pl.modisco.tf_expression_per_cell_type

crested.pl.modisco.tf_expression_per_cell_type#

crested.pl.modisco.tf_expression_per_cell_type(df, tf_list, log_transform=False, plot_kws=None, ax=None, **kwargs)#

Plot the expression levels of specified transcription factors (TFs) per cell type.

Parameters:
  • df (DataFrame) – The DataFrame containing mean gene expression data per cell type.

  • tf_list (list) – A list of transcription factors (TFs) to plot.

  • log_transform (bool (default: False)) – Whether to log-transform the TF expression values.

  • plot_kws (dict | None (default: None)) – Extra keyword arguments passed to plot(). Defaults: {'width': 0.8}.

  • ax (Axes | None (default: None)) – Axis to plot values on. If not supplied, creates a figure from scratch.

  • width – Width of the newly created figure if ax=None. Default is 12.

  • height – Height of the newly created figure if ax=None. Default is 5.

  • kwargs – Additional arguments passed to render_plot() to control the final plot output. Please see render_plot() for details. Defaults for tf_expression_per_cell_type: title="TF expression per cell type", xlabel="Cell type", ylabel="(Log1p-transformed) mean TF expression", xtick_rotation=45, xtick_ha=55.

Return type:

tuple[Figure, Axes] | None