deepof.visuals.plot_enrichment

deepof.visuals.plot_enrichment(coordinates: deepof_coordinates, embeddings: deepof_table_dict | None = None, soft_counts: deepof_table_dict | None = None, breaks: deepof_table_dict | None = None, supervised_annotations: deepof_table_dict | None = None, plot_proportions: bool = True, add_stats: str = 'Mann-Whitney', min_confidence: float = 0.0, bin_size: int | None = None, bin_index: int = 0, precomputed_bins: ndarray | None = None, exp_condition: str | None = None, exp_condition_order: list | None = None, normalize: bool = False, verbose: bool = False, ax: Any | None = None, save: bool = False)

Violin plots per cluster per condition.

Parameters:
  • coordinates (coordinates) – deepOF project where the data is stored.

  • embeddings (table_dict) – table dict with neural embeddings per animal experiment across time.

  • soft_counts (table_dict) – table dict with soft cluster assignments per animal experiment across time.

  • breaks (table_dict) – table dict with changepoint detection breaks per experiment.

  • supervised_annotations (table_dict) – table dict with supervised annotations per animal experiment across time.

  • plot_proportions (bool) – if supervised annotations are provided, display only traits that are measured as proportions instead of real values. Useful to visualize traits with different scales.

  • exp_condition (str) – Name of the experimental condition to use when plotting. If None (default) the first one available is used.

  • exp_condition_order (list) – Order in which to plot experimental conditions. If None (default), the order is determined by the order of the keys in the table dict.

  • min_confidence (float) – minimum confidence in cluster assignments used for quality control filtering.

  • bin_size (int) – bin size for time filtering.

  • bin_index (int) – index of the bin of size bin_size to select along the time dimension.

  • precomputed_bins (np.ndarray) – precomputed time bins. If provided, bin_size and bin_index are ignored.

  • add_stats (str) – test to use. Mann-Whitney (non-parametric) by default. See statsannotations documentation for details.

  • verbose (bool) – if True, prints test results and p-value cutoffs. False by default.

  • ax (plt.AxesSubplot) – axes where to plot the current figure. If not provided, new figure will be created.

  • save (bool) – Saves a time-stamped vectorized version of the figure if True.

  • normalize (bool) – whether to represent time fractions or actual time in seconds on the y axis.