Skip to content

Commit

Permalink
Fix handling of PEtab fixed parameters (#1514)
Browse files Browse the repository at this point in the history
Follow-up to #1493 and #1509, which only filled in PEtab-fixed parameters for simulation but not preequilibration in the parameter mapping.

Adding Weber_BMC2015 to the PEtab tests, where this issue popped up.
  • Loading branch information
dweindl authored Nov 20, 2024
1 parent c5bfd72 commit 4611586
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
6 changes: 6 additions & 0 deletions pypesto/objective/amici/amici.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,3 +713,9 @@ def update_from_problem(
) in condition_mapping.map_sim_fix.items():
if (val := id_to_val.get(mapped_to_par)) is not None:
condition_mapping.map_sim_fix[model_par] = val
for (
model_par,
mapped_to_par,
) in condition_mapping.map_preeq_fix.items():
if (val := id_to_val.get(mapped_to_par)) is not None:
condition_mapping.map_preeq_fix[model_par] = val
11 changes: 6 additions & 5 deletions test/petab/test_petab_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ def setUpClass(cls):
cls.obj_edatas = []

def test_0_import(self):
for model_name in ["Zheng_PNAS2012", "Boehm_JProteomeRes2014"]:
for model_name in [
"Zheng_PNAS2012",
"Boehm_JProteomeRes2014",
"Weber_BMC2015",
]:
# test yaml import for one model:
yaml_config = os.path.join(
models.MODELS_DIR, model_name, model_name + ".yaml"
)
petab_problem = petab.Problem.from_yaml(yaml_config)
petab_problem = models.get_problem(model_name)
self.petab_problems.append(petab_problem)

def test_1_compile(self):
Expand Down

0 comments on commit 4611586

Please sign in to comment.