amici.petab.petab_import

PEtab Import

Import a model in the petab (https://github.com/PEtab-dev/PEtab) format into AMICI.

Functions

import_petab_problem(petab_problem[, ...])

Create an AMICI model for a PEtab problem.

amici.petab.petab_import.import_petab_problem(petab_problem, model_output_dir=None, model_name=None, compile_=None, non_estimated_parameters_as_constants=True, **kwargs)[source]

Create an AMICI model for a PEtab problem.

Parameters:
  • petab_problem (petab.problem.Problem) – A petab problem containing all relevant information on the model.

  • model_output_dir (typing.Union[str, pathlib.Path, None]) – Directory to write the model code to. It will be created if it doesn’t exist. Defaults to current directory.

  • model_name (str) – Name of the generated model module. Defaults to the ID of the model or the model file name without the extension.

  • compile – If True, the model will be compiled. If False, the model will not be compiled. If None, the model will be compiled if it cannot be imported.

  • non_estimated_parameters_as_constants – Whether parameters marked as non-estimated in PEtab should be considered constant in AMICI. Setting this to True will reduce model size and simulation times. If sensitivities with respect to those parameters are required, this should be set to False.

  • kwargs – Additional keyword arguments to be passed to amici.sbml_import.SbmlImporter.sbml2amici() or amici.pysb_import.pysb2amici(), depending on the model type.

Return type:

amici.amici.Model

Returns:

The imported model.