petab.conditions

Functions operating on the PEtab condition table

Functions

create_condition_df(parameter_ids[, …])

Create empty condition DataFrame

get_condition_df(condition_file)

Read the provided condition file into a pandas.Dataframe

get_parametric_overrides(condition_df)

Get parametric overrides from condition table

write_condition_df(df, filename)

Write PEtab condition table

petab.conditions.create_condition_df(parameter_ids: Iterable[str], condition_ids: Optional[Iterable[str]] = None)pandas.core.frame.DataFrame[source]

Create empty condition DataFrame

Parameters
  • parameter_ids – the columns

  • condition_ids – the rows

Returns

A pandas.DataFrame with empty given rows and columns and all nan values

petab.conditions.get_condition_df(condition_file: Optional[Union[str, pandas.core.frame.DataFrame]])pandas.core.frame.DataFrame[source]

Read the provided condition file into a pandas.Dataframe

Conditions are rows, parameters are columns, conditionId is index.

Parameters

condition_file – File name of PEtab condition file or pandas.Dataframe

petab.conditions.get_parametric_overrides(condition_df: pandas.core.frame.DataFrame)List[str][source]

Get parametric overrides from condition table

Parameters

condition_df – PEtab condition table

Returns

List of parameter IDs that are mapped in a condition-specific way

petab.conditions.write_condition_df(df: pandas.core.frame.DataFrame, filename: str)None[source]

Write PEtab condition table

Parameters
  • df – PEtab condition table

  • filename – Destination file name