deepof.post_hoc.enrichment_across_conditions

deepof.post_hoc.enrichment_across_conditions(soft_counts: deepof_table_dict | None = None, supervised_annotations: deepof_table_dict | None = None, exp_conditions: dict | None = None, plot_speed: bool = False, bin_info: dict | None = None, roi_number: int | None = None, animals_in_roi: list | None = None, roi_mode: str = 'mousewise', normalize: bool = False)

Compute the population of each cluster across conditions.

Parameters:
  • soft_counts (TableDict) – A dictionary of soft counts, where the keys are the names of the experimental conditions, and the values are the soft counts for each condition.

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

  • exp_conditions (dict) – A dictionary of experimental conditions, where the keys are the names of the experiments, and the values are the names of their corresponding experimental conditions.

  • plot_speed (bool) – plot “speed” behavior

  • bin_info (dict) – A dictionary containing start and end positions or indices of all sections for given embeddings and ROIs

  • roi_number (int) – Number of the ROI that should be used for the plot (all behavior that occurs outside of the ROI gets excluded)

  • animals_in_roi (list) – List of ids of the animals that need to be inside of the active ROI. All frames in which any of the given animals are not inside of the ROI get excluded

  • roi_mode (str) – Determines how the rois should be applied to different behaviors. Options are “mousewise” (default, selected mice needs to be inside the ROI) and “behaviorwise” (only mice involved in a behavior need to be inside of the ROI, only for supervised behaviors)

  • normalize (bool) – Whether to normalize the population of each cluster across conditions.

Returns:

A long format dataframe with the population of each cluster across conditions.