bento.pl.factor

bento.pl.factor(factors, labels, names, n_top=False, cut=None, show_labels=False, cluster=True, figsize=None, fname=None)

Plot a heatmap representation of a loadings matrix, optionally z-scored and subsetted to the n_top rows of each factor.

Parameters:
  • factors (list of np.ndarray) – List of factors to plot, in the order [layers, cells, *]

  • labels (dict) – Dict of {name: labels} for each factor

  • names (list of str) – List of names for each factor, in the order [layers, cells, *]

  • n_top (int or list of int, optional) – Number of top features to plot, by default None. If None, all features are plotted.

  • show_labels (bool or list of bool, optional) – Whether to show labels, by default None. If None, labels are shown.

  • cluster (bool or list of bool, optional) – Whether to cluster rows, by default False. If False, rows are not clustered.