Skip to content

Commit 284110d

Browse files
committed
Added next steps with minimal code examples.
1 parent 9c1d057 commit 284110d

File tree

2 files changed

+229
-0
lines changed

2 files changed

+229
-0
lines changed

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ To get started with PEtab GUI, check out the :doc:`installation instructions <re
4949

5050
readme
5151
tutorial
52+
next_steps
5253

5354
.. toctree::
5455
:maxdepth: 1

docs/source/next_steps.rst

Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
==========
2+
Next Steps
3+
==========
4+
5+
Congratulations on completing your PEtab file! Now that you have a standardized parameter estimation problem, you can use various tools to perform parameter estimation, sensitivity analysis, and model simulation. This page provides minimal working examples for the most commonly used tools in the PEtab ecosystem.
6+
7+
.. contents::
8+
:depth: 2
9+
:local:
10+
11+
Contribute to the Benchmark Collection
12+
---------------------------------------
13+
14+
Before diving into parameter estimation, consider contributing your PEtab problem to the community! The `PEtab Benchmark Collection <https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab>`_ is a curated repository of parameter estimation problems that helps:
15+
16+
* **Validate** your PEtab problem by ensuring it works with multiple tools
17+
* **Enable reproducibility** by providing a permanent reference for your model
18+
* **Facilitate method comparison** by allowing others to test algorithms on your problem
19+
* **Support the community** by expanding the available benchmark suite
20+
21+
**How to contribute:**
22+
23+
You basically create a new github branch and open a pull request. For a complete checklist see the
24+
`pull request template <https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab/blob/master/.github/pull_request_template.md>`_.
25+
26+
Parameter Estimation with pyPESTO
27+
----------------------------------
28+
29+
`pyPESTO <https://pypesto.readthedocs.io/>`_ is a Python-based Parameter EStimation TOolbox that provides a unified interface for parameter estimation, uncertainty quantification, and model selection for systems biology models.
30+
31+
**Key features:**
32+
33+
* Multiple optimization algorithms (local and global)
34+
* Multi-start optimization for local optimizers
35+
* Profile likelihood and sampling for uncertainty analysis
36+
* Native PEtab support
37+
38+
**PEtab example notebooks in pyPESTO**
39+
40+
* `Model import using the PEtab format <https://pypesto.readthedocs.io/en/latest/example/petab_import.html>`_ for a basic optimization of a PEtab problem using pyPESTO.
41+
* `AMICI in pyPESTO <https://pypesto.readthedocs.io/en/latest/example/amici.html#Create-a-pyPESTO-problem-+-objective-from-Petab>`_ for a complete workflow of parameter estimation of a PEtab problem using AMICI as simulation engine within pyPESTO.
42+
43+
**Minimal working example:**
44+
45+
.. code-block:: python
46+
47+
import pypesto
48+
import pypesto.petab
49+
50+
# Load PEtab problem
51+
petab_problem = pypesto.petab.PetabImporter.from_yaml("path_to_your_model.yaml")
52+
problem = petab_problem.create_problem()
53+
54+
# Configure optimizer (100 multi-starts)
55+
optimizer = pypesto.optimize.ScipyOptimizer(method='L-BFGS-B')
56+
n_starts = 100
57+
58+
# Run optimization
59+
result = pypesto.optimize.minimize(
60+
problem=problem,
61+
optimizer=optimizer,
62+
n_starts=n_starts
63+
)
64+
65+
# Retrieve best parameters
66+
best_params = result.optimize_result.list[0]['x']
67+
print(f"Best parameters: {best_params}")
68+
print(f"Best objective value: {result.optimize_result.list[0]['fval']}")
69+
70+
**Next steps:**
71+
72+
* Perform profile likelihood: `pypesto.profile <https://pypesto.readthedocs.io/en/latest/api/pypesto.profile.html>`_
73+
* Run sampling for uncertainty: `pypesto.sample <https://pypesto.readthedocs.io/en/latest/api/pypesto.sample.html>`_
74+
* Explore different optimizers and settings in pyPESTO, with many more examples in the `pyPESTO documentation <https://pypesto.readthedocs.io/en/latest/example.html>`_.
75+
76+
**Documentation:** https://pypesto.readthedocs.io/
77+
78+
Model Simulation with AMICI
79+
----------------------------
80+
81+
`AMICI <https://amici.readthedocs.io/>`_ (Advanced Multilanguage Interface to CVODES and IDAS) provides efficient simulation and sensitivity analysis for ordinary differential equation models.
82+
83+
*Disclaimer*: AMICI is currently preparing a release v1.0.0, which will have significant changes to the API. The example below corresponds to the current stable release v0.34.2.
84+
85+
**Key features:**
86+
87+
* C++-based simulation with Python interface
88+
* Fast sensitivity computation via adjoint method
89+
* Symbolic preprocessing for optimized code generation
90+
* Native PEtab support
91+
92+
**Minimal working example:**
93+
94+
.. code-block:: python
95+
96+
97+
import petab
98+
99+
from amici import runAmiciSimulation
100+
from amici.petab.petab_import import import_petab_problem
101+
from amici.petab.petab_problem import PetabProblem
102+
from amici.petab.simulations import simulate_petab
103+
from amici.plotting import plot_state_trajectories
104+
105+
petab_problem = petab.Problem.from_yaml("path_to_your_model.yaml")
106+
amici_model = import_petab_problem(petab_problem, verbose=False)
107+
# Simulate for all conditions
108+
res = simulate_petab(petab_problem, amici_model)
109+
# Visualize trajectory of first condition (indexing starts at 0)
110+
plot_state_trajectories(res["rdatas"][0])
111+
112+
**Next steps:**
113+
114+
* Start to play around with parameters (see `this amici example <https://amici.readthedocs.io/en/v0.34.2/examples/example_petab/petab.html>`_)
115+
* Integrate with pyPESTO for advanced optimization features (see above)
116+
117+
**Documentation:** https://amici.readthedocs.io/
118+
119+
Model Simulation with COPASI
120+
---------------------------------
121+
122+
`COPASI <https://copasi.org/>`_ (COmplex PAthway SImulator) is a standalone software with a graphical user interface for modeling and simulation of biochemical networks.
123+
124+
**Key features:**
125+
126+
* Cross-platform GUI application (Windows, macOS, Linux)
127+
* Advanced simulation possibilities (deterministic, stochastic, steady-state)
128+
* User friendly creation and adaptation of sbml models, e.g. introducing events
129+
* Support for parameter estimation and sensitivity analysis
130+
131+
**Installation:**
132+
133+
Download COPASI for your platform from: https://copasi.org/download/
134+
135+
**Documentation:** https://copasi.org/Support/User_Manual/
136+
137+
Parameter Estimation with PEtab.jl
138+
-----------------------------------
139+
140+
`PEtab.jl <https://sebapersson.github.io/PEtab.jl/stable/>`_ is a Julia library for working with PEtab files, offering high-performance parameter estimation with automatic differentiation.
141+
142+
**Key features:**
143+
144+
* High-performance Julia implementation
145+
* Automatic differentiation for fast gradient computation
146+
* Support for ODE and SDE models
147+
* Native integration with Optimization.jl
148+
149+
**Minimal working example:**
150+
151+
.. code-block:: julia
152+
153+
using PEtab
154+
155+
# Import PEtab problem from YAML
156+
model = PEtabModel("your_model.yaml")
157+
158+
petab_prob = PEtabODEProblem(model)
159+
160+
# Parameter estimation
161+
using Optim, Plots
162+
x0 = get_startguesses(petab_prob, 1)
163+
res = calibrate(petab_prob, x0, IPNewton())
164+
plot(res, petab_prob; linewidth = 2.0)
165+
# Multistart optimization using 50 starts
166+
ms_res = calibrate_multistart(petab_prob, IPNewton(), 50)
167+
plot(ms_res; plot_type=:waterfall)
168+
plot(ms_res, petab_prob; linewidth = 2.0)
169+
170+
**Next steps:**
171+
172+
* Explore different ODE solvers for your problem type
173+
* Use gradient-based optimizers with automatic differentiation
174+
* Perform uncertainty quantification with sampling methods
175+
176+
**Documentation:** https://sebapersson.github.io/PEtab.jl/stable/
177+
178+
Parameter Estimation with Data2Dynamics
179+
----------------------------------------
180+
181+
`Data2Dynamics (D2D) <https://github.com/Data2Dynamics/d2d>`_ is a MATLAB-based framework for comprehensive modeling of biological processes with focus on ordinary differential equations.
182+
183+
**Key features:**
184+
185+
* MATLAB-based framework with PEtab support
186+
* Profile likelihood-based uncertainty analysis
187+
* Model reduction and identifiability analysis
188+
* PEtab import functionality
189+
190+
**Minimal working example:**
191+
192+
.. code-block:: matlab
193+
194+
% Setup Data2Dynamics environment
195+
arInit;
196+
197+
% Import PEtab problem
198+
arImportPEtab({'my_model','my_observables','my_measurements','my_conditions','my_parameters'}) % note the order of input arguments!
199+
200+
% Multi-start optimization (100 starts)
201+
arFitLHS(100);
202+
203+
% Display results
204+
arPlotFits;
205+
arPlot;
206+
arPrint;
207+
208+
**Documentation:** https://github.com/Data2Dynamics/d2d/wiki
209+
210+
Additional Resources
211+
--------------------
212+
213+
**PEtab Ecosystem:**
214+
215+
* `PEtab Format Specification <https://petab.readthedocs.io/en/latest/v1/documentation_data_format.html>`_ - Complete PEtab documentation
216+
* `PEtab Select <https://petab-select.readthedocs.io/>`_ - Model selection extension
217+
218+
**Model Repositories:**
219+
220+
* `Benchmark Collection <https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab>`_ - Curated PEtab problems
221+
* `BioModels <https://www.ebi.ac.uk/biomodels/>`_ - Database of published SBML models
222+
223+
**Getting Help:**
224+
225+
* PEtab-GUI Issues: https://github.com/PEtab-dev/PEtab-GUI/issues
226+
* PEtab Issues: https://github.com/PEtab-dev/PEtab/issues
227+
* PEtab Discussion: https://github.com/PEtab-dev/PEtab/discussions
228+
* Systems Biology Community: https://groups.google.com/g/sbml-discuss

0 commit comments

Comments
 (0)