petab.visualize.helper_functions

This file should contain the functions, which PEtab internally needs for plotting, but which are not meant to be used by non-developers and should hence not be directly visible/usable when using import petab.visualize.

Functions

create_dataset_id_list_new(df, group_by, id_list)

Create dataset ID list from a list of simulation condition IDs or observable IDs.

generate_dataset_id_col(exp_data)

Generate DATASET_ID column from condition_ids and observable_ids.

petab.visualize.helper_functions.create_dataset_id_list_new(df: DataFrame, group_by: str, id_list: List[List[str]]) List[List[str]][source]

Create dataset ID list from a list of simulation condition IDs or observable IDs.

Parameters:
  • df – Measurements or simulations DataFrame.

  • group_by – Defines grouping of data to plot.

  • id_list – Grouping list. Each sublist corresponds to a subplot in a figure, and contains the IDs of observables or simulation conditions for the subplot.

Returns:

A list of datasetIds

petab.visualize.helper_functions.generate_dataset_id_col(exp_data: DataFrame) List[str][source]

Generate DATASET_ID column from condition_ids and observable_ids.

Parameters:

exp_data – A measurement (simulation) DataFrame in the PEtab format.

Returns:

  • A list with generated datasetIds for each entry in the measurement

  • (simulation) DataFrame