PEtab-dev / libpetab-python

Python package for working with PEtab files
https://libpetab-python.readthedocs.io
MIT License
14 stars 6 forks source link

API for creating petab problems from scratch #220

Open dweindl opened 1 year ago

dweindl commented 1 year ago

It would be nice to have some high-level API to create PEtab problems from scratch, instead of manually assembling the dataframes.

Something like

pp = petab.Problem()
pp.add_condition("conditionId", param1=2, param2=3)
pp.add_observable("observable1", formula="x1", ...)
pp.add_measurement(observable_id="observable1", time=2.5, measurement=1.337, noise_parameters=0.1, ...)
pp.add_parameter(parameter_id="p1", estimated=False, nominal_value=42)

Ideally also some API for dropping conditions / observables / measurements and potentially for modifying conditions / observables / measurements.