deepof.post_hoc.enrichment_across_conditions

deepof.post_hoc.enrichment_across_conditions(embedding: 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, exp_conditions: dict | None = None, bin_size: int | None = None, bin_index: int | None = None, precomputed: ndarray | None = None, normalize: bool = False)

Compute the population of each cluster across conditions.

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

  • 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.

  • breaks (TableDict) – A dictionary of breaks, where the keys are the names of the experimental

  • 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.

  • bin_size (int) – The size of the time bins to use. If None, the embeddings are not binned.

  • bin_index (int) – The index of the bin to use. If None, the embeddings are not binned.

  • precomputed (np.ndarray) – Boolean array. If provided, ignores every othe parameter and just indexes each experiment using the provided mask.

  • 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.