Skip to content

Latest commit

 

History

History
244 lines (164 loc) · 9.27 KB

File metadata and controls

244 lines (164 loc) · 9.27 KB

Next Steps

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. For a complete list of tools, see the PEtab software support.

pyPESTO is a Python-based Parameter EStimation TOolbox that provides a unified interface for parameter estimation, uncertainty quantification, and model selection for systems biology models.

Key features:

  • Multiple optimization algorithms (local and global)
  • Multi-start optimization for local optimizers
  • Profile likelihood and sampling for uncertainty analysis
  • Native PEtab support

PEtab example notebooks in pyPESTO

Minimal working example:

import pypesto
import pypesto.petab

# Load PEtab problem
petab_problem = pypesto.petab.PetabImporter.from_yaml("path_to_your_model.yaml")
problem = petab_problem.create_problem()

# Configure optimizer (100 multi-starts)
optimizer = pypesto.optimize.ScipyOptimizer(method='L-BFGS-B')
n_starts = 100

# Run optimization
result = pypesto.optimize.minimize(
    problem=problem,
    optimizer=optimizer,
    n_starts=n_starts
)

# Retrieve best parameters
best_params = result.optimize_result.list[0]['x']
print(f"Best parameters: {best_params}")
print(f"Best objective value: {result.optimize_result.list[0]['fval']}")

Next steps:

Documentation: https://pypesto.readthedocs.io/

AMICI (Advanced Multilanguage Interface to CVODES and IDAS) provides efficient simulation and sensitivity analysis for ordinary differential equation models.

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.

Key features:

  • C++-based simulation with Python interface
  • Fast sensitivity computation via adjoint method
  • Symbolic preprocessing for optimized code generation
  • Native PEtab support

Minimal working example:

import petab

from amici import runAmiciSimulation
from amici.petab.petab_import import import_petab_problem
from amici.petab.petab_problem import PetabProblem
from amici.petab.simulations import simulate_petab
from amici.plotting import plot_state_trajectories

petab_problem = petab.Problem.from_yaml("path_to_your_model.yaml")
amici_model = import_petab_problem(petab_problem, verbose=False)
# Simulate for all conditions
res = simulate_petab(petab_problem, amici_model)
# Visualize trajectory of first condition (indexing starts at 0)
plot_state_trajectories(res["rdatas"][0])

Next steps:

  • Start to play around with parameters (see this amici example)
  • Integrate with pyPESTO for advanced optimization features (see above)

Documentation: https://amici.readthedocs.io/

COPASI (COmplex PAthway SImulator) is a standalone software with a graphical user interface for modeling and simulation of biochemical networks.

Key features:

  • Cross-platform GUI application (Windows, macOS, Linux)
  • Advanced simulation possibilities (deterministic, stochastic, steady-state)
  • User friendly creation and adaptation of SBML models, e.g. introducing events
  • Support for parameter estimation and sensitivity analysis

Python Interface:

COPASI also provides the python interface basiCO, which supports the full feature set of PEtab.

from basico import *
import basico.petab
from petab import Problem
import petab.visualize


pp = Problem.from_yaml('./Elowitz_Nature2000/Elowitz_Nature2000.yaml')
sim = basico.petab.PetabSimulator(pp, working_dir='./temp_dir/')
df = sim.simulate()
petab.visualize.plot_problem(pp, simulations_df=df)

see here for an example notebook.

Documentation: https://copasi.org/Support/User_Manual/ and https://basico.readthedocs.io/

PEtab.jl is a Julia library for working with PEtab files, offering high-performance parameter estimation with automatic differentiation.

Key features:

  • High-performance Julia implementation
  • Automatic differentiation for fast gradient computation
  • Support for ODE and SDE models
  • Native integration with Optimization.jl

Minimal working example:

using PEtab

# Import PEtab problem from YAML
model = PEtabModel("your_model.yaml")

petab_prob = PEtabODEProblem(model)

# Parameter estimation
using Optim, Plots
x0 = get_startguesses(petab_prob, 1)
res = calibrate(petab_prob, x0, IPNewton())
plot(res, petab_prob; linewidth = 2.0)
# Multistart optimization using 50 starts
ms_res = calibrate_multistart(petab_prob, IPNewton(), 50)
plot(ms_res; plot_type=:waterfall)
plot(ms_res, petab_prob; linewidth = 2.0)

Next steps:

  • Explore different ODE solvers for your problem type
  • Use gradient-based optimizers with automatic differentiation
  • Perform uncertainty quantification with sampling methods

Documentation: https://sebapersson.github.io/PEtab.jl/stable/

Data2Dynamics (D2D) is a MATLAB-based framework for comprehensive modeling of biological processes with focus on ordinary differential equations.

Key features:

  • MATLAB-based framework with PEtab support
  • Profile likelihood-based uncertainty analysis
  • Model identifiability analysis
  • PEtab import functionality

Minimal working example:

% Setup Data2Dynamics environment
arInit;

% Import PEtab problem
arImportPEtab({'my_model','my_observables','my_measurements','my_conditions','my_parameters'}) % note the order of input arguments!

% Multi-start optimization (100 starts)
arFitLHS(100);

% Display results
arPlotFits;
arPlot;
arPrint;

Documentation: https://github.com/Data2Dynamics/d2d/wiki

Before diving into parameter estimation, consider contributing your PEtab problem to the community! The PEtab Benchmark Collection is a curated repository of parameter estimation problems that helps:

  • Validate your PEtab problem by ensuring it works with multiple tools
  • Enable reproducibility by providing a permanent reference for your model
  • Facilitate method comparison by allowing others to test algorithms on your problem
  • Support the community by expanding the available benchmark suite

How to contribute:

See their How to Contribute, and for a complete checklist see the pull request template.

PEtab Ecosystem:

Model Repositories:

Getting Help: