Summary
PEtab import fails when a condition sets a target to a parameter (or expression) value rather than a number. PyBNF's condition importer (ADR-0028) accepts a numeric value, a base pin, or a surrogate relative op, but not a parameter-valued / expression targetValue — a common PEtab idiom for a per-condition estimated initial condition.
Error
NotImplementedError: Condition targetValue 'init_b10_1' for 'init_b10' is an expression,
not a base pin, a surrogate relative op, or a number. Evaluating PEtab condition formulae needs the sympy ...
Root cause (verified)
Bruno_JExpBot2016 condition table sets a target to a parameter:
conditionId init_b10 init_bcar ...
model1_data1 init_b10_1 0 ...
model1_data2 0 init_bcar1 ...
init_b10_1 / init_bcar1 are estimated parameters — the condition assigns the model's initial value init_b10 to a per-condition estimated parameter. Bertozzi_PNAS2020 is the same shape (I0_ = I0_CA).
Affected (PEtab benchmark collection)
Bertozzi_PNAS2020, Bruno_JExpBot2016.
Suggested fix
Support a parameter-valued (and, more generally, an expression) condition targetValue: bind the target to the referenced parameter — the per-condition estimated-initial-condition case — evaluating PEtab condition formulae (via sympy, as the error hints) when the value is not a plain number / pin / relative op.
Summary
PEtab import fails when a condition sets a target to a parameter (or expression) value rather than a number. PyBNF's condition importer (ADR-0028) accepts a numeric value, a base pin, or a surrogate relative op, but not a parameter-valued / expression
targetValue— a common PEtab idiom for a per-condition estimated initial condition.Error
Root cause (verified)
Bruno_JExpBot2016condition table sets a target to a parameter:init_b10_1/init_bcar1are estimated parameters — the condition assigns the model's initial valueinit_b10to a per-condition estimated parameter.Bertozzi_PNAS2020is the same shape (I0_ = I0_CA).Affected (PEtab benchmark collection)
Bertozzi_PNAS2020,Bruno_JExpBot2016.Suggested fix
Support a parameter-valued (and, more generally, an expression) condition
targetValue: bind the target to the referenced parameter — the per-condition estimated-initial-condition case — evaluating PEtab condition formulae (via sympy, as the error hints) when the value is not a plain number / pin / relative op.