ICB-DCM / pyPESTO

python Parameter EStimation TOolbox
https://pypesto.readthedocs.io
BSD 3-Clause "New" or "Revised" License
216 stars 47 forks source link

PEtab import: species in condition table not handled properly #184

Closed dweindl closed 4 years ago

dweindl commented 4 years ago

In PEtab, at some point we allowed to specify species IDs in the condition table. This should set the concentration of the respective species to the specified value. This is not handled correctly in pypesto/objective/petab_import.py and results in "KeyError: 'Cannot make **** a constant parameter: Parameter does not exist.' during AMICI model import.

EDIT: This may also be a chance to reduce the redundancy of pypesto/objective/petab_import.py and https://github.com/ICB-DCM/AMICI/blob/master/python/bin/amici_import_petab.py.

yannikschaelte commented 4 years ago

Not sure exactly what is meant. The species concentration value should be replaced by the corresponding parameter's value at runtime? (Where) has this been done in amici/parpe already?

dweindl commented 4 years ago

Not sure exactly what is meant. The species concentration value should be replaced by the corresponding parameter's value at runtime?

Independently of how it is implemented exactly, all occurrences of the respective species should be replaced by the provided value from the condition table.

(Where) has this been done in amici/parpe already?

I did it here by converting the species to parameters: https://github.com/ICB-DCM/AMICI/blob/master/python/bin/amici_import_petab.py#L127 ff This felt like the easiest way.

paulstapor commented 4 years ago

If nobody manages it by tonight and if I get Speedy5 running, I will try it...

paulstapor commented 4 years ago

Working on it from now...