From 989497a4cb384edc8322a0320eaefcc512cf38d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Fr=C3=B6hlich?= Date: Wed, 14 Apr 2021 09:47:53 -0400 Subject: [PATCH 01/13] fix serialization and == operator (#1493) * fix serialization and == operator * add hdf5 reader --- include/amici/serialization.h | 2 ++ src/hdf5.cpp | 11 +++++++++++ src/model.cpp | 4 +++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/include/amici/serialization.h b/include/amici/serialization.h index 0e2e6e0902..ebb2ec87dc 100644 --- a/include/amici/serialization.h +++ b/include/amici/serialization.h @@ -116,6 +116,8 @@ void serialize(Archive &ar, amici::Model &m, const unsigned int /*version*/) { ar &m.nmaxevent_; ar &m.state_is_non_negative_; ar &m.pythonGenerated; + ar &m.min_sigma_; + ar &m.sigma_res_; } diff --git a/src/hdf5.cpp b/src/hdf5.cpp index 2dc974bb8d..b548e4d54f 100644 --- a/src/hdf5.cpp +++ b/src/hdf5.cpp @@ -960,6 +960,17 @@ void readModelDataFromHDF5(const H5::H5File &file, Model &model, model.setUnscaledInitialStateSensitivities(sx0); } } + + if(attributeExists(file, datasetPath, "sigma_res")) { + auto sigma_res = getIntScalarAttribute(file, datasetPath, "sigma_res"); + model.setAddSigmaResiduals(static_cast(sigma_res)); + } + + if(attributeExists(file, datasetPath, "min_sigma")) { + auto min_sigma = getDoubleScalarAttribute(file, datasetPath, + "min_sigma"); + model.setMinimumSigmaResiduals(min_sigma); + } } diff --git a/src/model.cpp b/src/model.cpp index 1058655bf7..2123be7427 100644 --- a/src/model.cpp +++ b/src/model.cpp @@ -185,7 +185,9 @@ bool operator==(const Model &a, const Model &b) { (a.state_.plist == b.state_.plist) && (a.x0data_ == b.x0data_) && (a.sx0data_ == b.sx0data_) && (a.nmaxevent_ == b.nmaxevent_) && - (a.state_is_non_negative_ == b.state_is_non_negative_); + (a.state_is_non_negative_ == b.state_is_non_negative_) && + (a.sigma_res_ == b.sigma_res_) && + (a.min_sigma_ == b.min_sigma_); } bool operator==(const ModelDimensions &a, const ModelDimensions &b) { From 2243699ba2ae0c7982dbafd89fe0f06abc1d2318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Fr=C3=B6hlich?= Date: Wed, 14 Apr 2021 10:36:54 -0400 Subject: [PATCH 02/13] fix #1492 (#1495) --- src/rdata.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rdata.cpp b/src/rdata.cpp index 50400d5af2..df64d76eb0 100644 --- a/src/rdata.cpp +++ b/src/rdata.cpp @@ -946,7 +946,7 @@ void ReturnData::fFIM(int it, Model &model, const ExpData &edata) { auto dy_i = sy_it.at(iy + ny * ip); auto ds_i = ssigmay_it.at(iy + ny * ip); auto sr_i = amici::fsres(y, dy_i, m, s, ds_i); - realtype sre_i; + realtype sre_i = 0.0; if (sigma_res) sre_i = amici::fsres_error(s, ds_i, sigma_offset); for (int jp = 0; jp < nplist; ++jp) { From cc0b2539c876415d521910f57d4012ad70eb144e Mon Sep 17 00:00:00 2001 From: willov Date: Thu, 15 Apr 2021 20:36:17 +0200 Subject: [PATCH 03/13] Doc: Update OpenBLAS Windows installation instructions (#1496) The current version of compileBLAS.cmd / installOpenBLAS.ps1 does not use a "v" in the top-level OpenBLAS-0.3.12 folder. Backward slashes got removed during installation of amici. Switching to forward slashes worked. Co-authored-by: Daniel Weindl --- INSTALL.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 2d41535029..61140d2e2c 100755 --- a/INSTALL.md +++ b/INSTALL.md @@ -231,14 +231,14 @@ This will download openBLAS and compile it, creating You will also need to define two environment variables: BLAS_LIBS="/LIBPATH:C:/BLAS/lib openblas.lib" - BLAS_CFLAGS="/IC:/BLAS/OpenBLAS-v0.3.12/OpenBLAS-0.3.12" + BLAS_CFLAGS="/IC:/BLAS/OpenBLAS-0.3.12/OpenBLAS-0.3.12" One way to do that is to run a PowerShell script with the following commands: - [System.Environment]::SetEnvironmentVariable("BLAS_LIBS", "/LIBPATH:C:\BLAS\lib openblas.lib", [System.EnvironmentVariableTarget]::User) - [System.Environment]::SetEnvironmentVariable("BLAS_LIBS", "/LIBPATH:C:\BLAS\lib openblas.lib", [System.EnvironmentVariableTarget]::Process) - [System.Environment]::SetEnvironmentVariable("BLAS_CFLAGS", "-IC:\BLAS\OpenBLAS-v0.3.12\OpenBLAS-0.3.12", [System.EnvironmentVariableTarget]::User) - [System.Environment]::SetEnvironmentVariable("BLAS_CFLAGS", "-IC:\BLAS\OpenBLAS-v0.3.12\OpenBLAS-0.3.12", [System.EnvironmentVariableTarget]::Process) + [System.Environment]::SetEnvironmentVariable("BLAS_LIBS", "/LIBPATH:C:/BLAS/lib openblas.lib", [System.EnvironmentVariableTarget]::User) + [System.Environment]::SetEnvironmentVariable("BLAS_LIBS", "/LIBPATH:C:/BLAS/lib openblas.lib", [System.EnvironmentVariableTarget]::Process) + [System.Environment]::SetEnvironmentVariable("BLAS_CFLAGS", "-IC:/BLAS/OpenBLAS-0.3.12/OpenBLAS-0.3.12", [System.EnvironmentVariableTarget]::User) + [System.Environment]::SetEnvironmentVariable("BLAS_CFLAGS", "-IC:/BLAS/OpenBLAS-0.3.12/OpenBLAS-0.3.12", [System.EnvironmentVariableTarget]::Process) The call ending in `Process` sets the environment variable in the current process, and it is no longer in effect in the next process. The call ending in `User` is permanent, and takes effect the next time the user logs on. From 2b77792a5a1a15cce2631347d1ec6ef3bfbe77e2 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Thu, 15 Apr 2021 21:35:44 +0200 Subject: [PATCH 04/13] Fix Biosimulators deployment ("ref" wasn't supplied) (#1497) --- .github/workflows/release_biosimulators.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_biosimulators.yml b/.github/workflows/release_biosimulators.yml index 2f0479e3cd..53d5a55595 100644 --- a/.github/workflows/release_biosimulators.yml +++ b/.github/workflows/release_biosimulators.yml @@ -29,4 +29,4 @@ jobs: -u ${GH_ISSUE_USERNAME}:${GH_ISSUE_TOKEN} \ -H "Accept: application/vnd.github.v3+json" \ https://api.github.com/repos/${DOWNSTREAM_REPOSITORY}/actions/workflows/${WORKFLOW_FILE}/dispatches \ - -d "{\"inputs\": {\"simulatorVersion\": \"${PACKAGE_VERSION}\", \"simulatorVersionLatest\": \"true\"}}" + -d "{\"ref\": \"dev\", \"inputs\": {\"simulatorVersion\": \"${PACKAGE_VERSION}\", \"simulatorVersionLatest\": \"true\"}}" From 57b3cb44739bcecfe0185aad699200c59a46e174 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Thu, 15 Apr 2021 22:42:44 +0200 Subject: [PATCH 05/13] Doc: Update how-to-cite to Bionformatics paper (#1499) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fabian Fröhlich --- README.md | 14 ++++++++++---- documentation/how_to_cite.rst | 16 +++++++++++----- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4f37d0680a..ed0db4beae 100644 --- a/README.md +++ b/README.md @@ -127,14 +127,20 @@ If you used AMICI in your work, we are happy to include your project, please let us know via a Github issue. When using AMICI in your project, please cite -* Fröhlich, F., Weindl, D., Schälte, Y., Pathirana, D., Paszkowski, Ł., Lines, G.T., Stapor, P. and Hasenauer, J., 2020. - AMICI: High-Performance Sensitivity Analysis for Large Ordinary Differential Equation Models. arXiv preprint [arXiv:2012.09122](https://arxiv.org/abs/2012.09122). +* Fröhlich, F., Weindl, D., Schälte, Y., Pathirana, D., Paszkowski, Ł., Lines, G.T., Stapor, P. and Hasenauer, J., 2021. + AMICI: High-Performance Sensitivity Analysis for Large Ordinary Differential Equation Models. Bioinformatics, btab227, + [DOI:10.1093/bioinformatics/btab227](https://doi.org/10.1093/bioinformatics/btab227). ``` @article{frohlich2020amici, title={AMICI: High-Performance Sensitivity Analysis for Large Ordinary Differential Equation Models}, author={Fr{\"o}hlich, Fabian and Weindl, Daniel and Sch{\"a}lte, Yannik and Pathirana, Dilan and Paszkowski, {\L}ukasz and Lines, Glenn Terje and Stapor, Paul and Hasenauer, Jan}, - journal={arXiv preprint arXiv:2012.09122}, - year={2020} + journal = {Bioinformatics}, + year = {2021}, + month = {04}, + issn = {1367-4803}, + doi = {10.1093/bioinformatics/btab227}, + note = {btab227}, + eprint = {https://academic.oup.com/bioinformatics/advance-article-pdf/doi/10.1093/bioinformatics/btab227/36866220/btab227.pdf}, } ``` diff --git a/documentation/how_to_cite.rst b/documentation/how_to_cite.rst index b94673e0b8..5439a8e042 100644 --- a/documentation/how_to_cite.rst +++ b/documentation/how_to_cite.rst @@ -13,17 +13,23 @@ your project, please let us know via a Github issue. When using AMICI in your project, please cite -* Fröhlich, F., Weindl, D., Schälte, Y., Pathirana, D., Paszkowski, Ł., Lines, G.T., Stapor, P. and Hasenauer, J., 2020. - AMICI: High-Performance Sensitivity Analysis for Large Ordinary Differential Equation Models. arXiv preprint `arXiv:2012.09122 `_. +* Fröhlich, F., Weindl, D., Schälte, Y., Pathirana, D., Paszkowski, Ł., Lines, G.T., Stapor, P. and Hasenauer, J., 2021. + AMICI: High-Performance Sensitivity Analysis for Large Ordinary Differential Equation Models. Bioinformatics, btab227, + `DOI:10.1093/bioinformatics/btab227 `_. .. code-block:: bibtex @article{frohlich2020amici, title={AMICI: High-Performance Sensitivity Analysis for Large Ordinary Differential Equation Models}, author={Fr{\"o}hlich, Fabian and Weindl, Daniel and Sch{\"a}lte, Yannik and Pathirana, Dilan and Paszkowski, {\L}ukasz and Lines, Glenn Terje and Stapor, Paul and Hasenauer, Jan}, - journal={arXiv preprint arXiv:2012.09122}, - year={2020} - } + journal = {Bioinformatics}, + year = {2021}, + month = {04}, + issn = {1367-4803}, + doi = {10.1093/bioinformatics/btab227}, + note = {btab227}, + eprint = {https://academic.oup.com/bioinformatics/advance-article-pdf/doi/10.1093/bioinformatics/btab227/36866220/btab227.pdf}, + } When presenting work that employs AMICI, feel free to use one of the icons in `documentation/gfx/ `_, From 980ace231019ce83ee658abff983e9ea8f1f0002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Fr=C3=B6hlich?= Date: Fri, 16 Apr 2021 10:31:44 -0400 Subject: [PATCH 06/13] Remove sllh computation from `petab_objective.simulate_petab` (#1498) * fix aggregate_sllh for petab objectives * extend benchmark tests to check gradient of simulate_petab * fixup * fix by removing functionality * fixup * cleanup * cleanup --- python/amici/petab_objective.py | 47 +-------------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/python/amici/petab_objective.py b/python/amici/petab_objective.py index 2039d68033..6ae8ab0ca1 100644 --- a/python/amici/petab_objective.py +++ b/python/amici/petab_objective.py @@ -139,9 +139,6 @@ def simulate_petab( # Compute total llh llh = sum(rdata['llh'] for rdata in rdatas) - # Compute total sllh - sllh = aggregate_sllh(amici_model=amici_model, rdatas=rdatas, - parameter_mapping=parameter_mapping) # Log results sim_cond = petab_problem.get_simulation_conditions_from_measurement_df() @@ -151,7 +148,6 @@ def simulate_petab( return { LLH: llh, - SLLH: sllh, RDATAS: rdatas } @@ -732,45 +728,4 @@ def rdatas_to_simulation_df( df = rdatas_to_measurement_df(rdatas=rdatas, model=model, measurement_df=measurement_df) - return df.rename(columns={MEASUREMENT: SIMULATION}) - - -def aggregate_sllh( - amici_model: AmiciModel, - rdatas: Sequence[amici.ReturnDataView], - parameter_mapping: Optional[ParameterMapping], -) -> Union[None, Dict[str, float]]: - """ - Aggregate likelihood gradient for all conditions, according to PEtab - parameter mapping. - - :param amici_model: - AMICI model from which ``rdatas`` were obtained. - :param rdatas: - Simulation results. - :param parameter_mapping: - PEtab parameter mapping to condition-specific - simulation parameters - - :return: - aggregated sllh - """ - sllh = {} - model_par_ids = amici_model.getParameterIds() - for condition_par_map, rdata in \ - zip(parameter_mapping, rdatas): - par_map_sim_var = condition_par_map.map_sim_var - if rdata['status'] != amici.AMICI_SUCCESS \ - or 'sllh' not in rdata \ - or rdata['sllh'] is None: - return None - - for model_par_id, problem_par_id in par_map_sim_var.items(): - if isinstance(problem_par_id, str): - model_par_idx = model_par_ids.index(model_par_id) - cur_par_sllh = rdata['sllh'][model_par_idx] - try: - sllh[problem_par_id] += cur_par_sllh - except KeyError: - sllh[problem_par_id] = cur_par_sllh - return sllh + return df.rename(columns={MEASUREMENT: SIMULATION}) \ No newline at end of file From 2473c7d98edc3ab72967659d3cb21a70dcae3411 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Thu, 22 Apr 2021 16:42:28 +0200 Subject: [PATCH 07/13] Add __main__.py to Python package... (#1500) ... for testing / displaying AMICI information -> `python -m amici` --- .github/workflows/test_install.yml | 4 +++- python/amici/__main__.py | 25 +++++++++++++++++++++++++ python/sdist/amici/__main__.py | 1 + scripts/installAmiciArchive.sh | 4 ++++ 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 python/amici/__main__.py create mode 120000 python/sdist/amici/__main__.py diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index 82ef251f4c..b075d8d6f2 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -75,4 +75,6 @@ jobs: run: | pip3 install -v --user $(ls -t python/sdist/dist/amici-*.tar.gz | head -1) - + - name: Test import + run: | + python -m amici diff --git a/python/amici/__main__.py b/python/amici/__main__.py new file mode 100644 index 0000000000..dac5230270 --- /dev/null +++ b/python/amici/__main__.py @@ -0,0 +1,25 @@ +"""Package-level entrypoint""" + +from . import __version__, compiledWithOpenMP, has_clibs, hdf5_enabled +import os +import sys + +def print_info(): + """Displays information on the current AMICI installation. + + Useful for verifying package installation of submitting bug reports""" + features = [] + + if has_clibs: + features.append("extensions") + + if compiledWithOpenMP(): + features.append("OpenMP") + + if hdf5_enabled: + features.append("HDF5") + + print(f"AMICI ({sys.platform}) version {__version__} ({','.join(features)})") + +if __name__ == '__main__': + print_info() diff --git a/python/sdist/amici/__main__.py b/python/sdist/amici/__main__.py new file mode 120000 index 0000000000..cfa13d34da --- /dev/null +++ b/python/sdist/amici/__main__.py @@ -0,0 +1 @@ +../../amici/__main__.py \ No newline at end of file diff --git a/scripts/installAmiciArchive.sh b/scripts/installAmiciArchive.sh index 20f4251ee1..25de4f9f93 100755 --- a/scripts/installAmiciArchive.sh +++ b/scripts/installAmiciArchive.sh @@ -33,4 +33,8 @@ else fi pip install $(ls -t ${AMICI_PATH}/build/python/amici-*.tar.gz | head -1) + +# verify import succeeds +python -m amici + deactivate From e8054118c7ae83ef400d89050227b91095990348 Mon Sep 17 00:00:00 2001 From: Dilan Pathirana <59329744+dilpath@users.noreply.github.com> Date: Tue, 27 Apr 2021 20:06:40 +0200 Subject: [PATCH 08/13] avoid w in root and stau headers (refactor) (#1503) * avoid w in root and stau headers (refactor) by substituting in roots --- python/amici/ode_export.py | 39 +++++++++++++++----------------------- 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/python/amici/ode_export.py b/python/amici/ode_export.py index 713ecf468f..931b8c38f4 100644 --- a/python/amici/ode_export.py +++ b/python/amici/ode_export.py @@ -1215,17 +1215,6 @@ def transform_dxdt_to_concentration(species_id, dxdt): # fill in 'self._sym' based on prototypes and components in ode_model self.generate_basic_variables(from_sbml=True) - # substitute 'w' expressions into event expressions now, to avoid - # rewriting '{model_name}_root.cpp' headers to include 'w.h' - w_sorted = toposort_symbols(dict(zip(self._syms['w'], self._eqs['w']))) - for index, event in enumerate(self._events): - self._events[index] = Event( - identifier=event.get_id(), - name=event.get_name(), - value=event.get_val().subs(w_sorted), - state_update=event._state_update, - event_observable=event._observable, - ) self._has_quadratic_nllh = all( llh['dist'] in ['normal', 'lin-normal'] for llh in si.symbols[SymbolId.LLHY].values() @@ -1631,21 +1620,15 @@ def generate_basic_variables(self, *, from_sbml: bool = False) -> None: """ Generates the symbolic identifiers for all variables in ODEModel.variable_prototype - """ - # Workaround to generate `'w'` before events, such that `'w'` can be - # replaced in events, to avoid adding `w` to the header of - # "{model_name}_stau.cpp". - if 'w' not in self._syms: - self._generate_symbol('w', from_sbml=from_sbml) + :param from_sbml: + whether the model is generated from SBML + """ # We need to process events and Heaviside functions in the ODE Model, # before adding it to ODEExporter self.parse_events() for var in self._variable_prototype: - # Part of the workaround described earlier in this method. - if var == 'w': - continue if var not in self._syms: self._generate_symbol(var, from_sbml=from_sbml) @@ -1658,7 +1641,6 @@ def parse_events(self) -> None: and replaces the formulae of the found roots by identifiers of AMICI's Heaviside function implementation in the right hand side """ - # Track all roots functions in the right hand side roots = copy.deepcopy(self._events) for state in self._states: @@ -1667,6 +1649,11 @@ def parse_events(self) -> None: for expr in self._expressions: expr.set_val(self._process_heavisides(expr.get_val(), roots)) + # remove all possible Heavisides from roots, which may arise from + # the substitution of `'w'` in `_collect_heaviside_roots` + for root in roots: + root.set_val(self._process_heavisides(root.get_val(), roots)) + # Now add the found roots to the model components for root in roots: # skip roots of SBML events, as these have already been added @@ -2411,7 +2398,7 @@ def _get_unique_root( def _collect_heaviside_roots( self, - args: Sequence[sp.Expr] + args: Sequence[sp.Expr], ) -> List[sp.Expr]: """ Recursively checks an expression for the occurrence of Heaviside @@ -2432,8 +2419,12 @@ def _collect_heaviside_roots( root_funs.extend(self._collect_heaviside_roots(arg.args)) # substitute 'w' expressions into root expressions now, to avoid - # rewriting '{model_name}_stau.cpp' headers to include 'w.h' - w_sorted = toposort_symbols(dict(zip(self._syms['w'], self.eq('w')))) + # rewriting '{model_name}_root.cpp' and '{model_name}_stau.cpp' headers + # to include 'w.h' + w_sorted = toposort_symbols(dict(zip( + [expr.get_id() for expr in self._expressions], + [expr.get_val() for expr in self._expressions], + ))) root_funs = [ r.subs(w_sorted) for r in root_funs From 95d40ede4ee03cfcf4aa9f90b7691c383d889104 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Fri, 28 May 2021 22:09:57 +0200 Subject: [PATCH 09/13] Update list of papers using AMICI (#1509) Closes #1504 Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com> --- documentation/amici_refs.bib | 84 +++++++++++++++++++++++++++++++++--- documentation/references.md | 30 ++++++++++--- 2 files changed, 103 insertions(+), 11 deletions(-) diff --git a/documentation/amici_refs.bib b/documentation/amici_refs.bib index e73d87ed43..6803ee7e6f 100644 --- a/documentation/amici_refs.bib +++ b/documentation/amici_refs.bib @@ -549,7 +549,7 @@ @Article{LinesPas2019 @Article{VillaverdeRai2019, author = {Alejandro F. Villaverde and Elba Raimúndez and Jan Hasenauer and Julio R. Banga}, journal = {IFAC-PapersOnLine}, - title = {A Comparison of Methods for Quantifying Prediction Uncertainty in Systems Biology⁎⁎This research has received funding from the European Unions Horizon 2020 research and innovation program under grant agreement No 686282 (CanPathPro) and the German Ministry of Education and Research (BMBF) under the grant agreement No 01ZX1310B (SYS-Stomach) and No 01ZX1705A (INCOME).}, + title = {A Comparison of Methods for Quantifying Prediction Uncertainty in Systems Biology}, year = {2019}, issn = {2405-8963}, note = {8th Conference on Foundations of Systems Biology in Engineering FOSBE 2019}, @@ -711,7 +711,7 @@ @Article{Schaelte2020.01.30.927004 url = {https://www.biorxiv.org/content/early/2020/01/31/2020.01.30.927004}, } -@Article{Adlung866871, +@Article{AdlungSta2019, author = {Adlung, Lorenz and Stapor, Paul and T{\"o}nsing, Christian and Schmiester, Leonard and Schwarzm{\"u}ller, Luisa E. and Wang, Dantong and Timmer, Jens and Klingm{\"u}ller, Ursula and Hasenauer, Jan and Schilling, Marcel}, journal = {bioRxiv}, title = {Cell-to-cell variability in JAK2/STAT5 pathway components and cytoplasmic volumes define survival threshold in erythroid progenitor cells}, @@ -725,10 +725,10 @@ @Article{Adlung866871 url = {https://www.biorxiv.org/content/early/2019/12/07/866871}, } -@Article{PITT201872, +@Article{PittGom2018, author = {Jake Alan Pitt and Lucian Gomoescu and Constantinos C. Pantelides and Benoît Chachuat and Julio R. Banga}, journal = {IFAC-PapersOnLine}, - title = {Critical Assessment of Parameter Estimation Methods in Models of Biological Oscillators⁎⁎This project has received funding from the European Unions Horizon 2020 research and innovation program under grant agreement 675585 (Marie Sklodowska-Curie ITN SyMBioSys). The authors JAP and LG are Marie Sklodowska-Curie Early Stage Researchers at IIM-CSIC (Spain) and PSE Ltd (UK) respectively.}, + title = {Critical Assessment of Parameter Estimation Methods in Models of Biological Oscillators}, year = {2018}, issn = {2405-8963}, note = {7th Conference on Foundation of Systems Biology in Engineering FOSBE 2018}, @@ -752,7 +752,7 @@ @MastersThesis{Watanabe2019 url = {https://hdl.handle.net/20.500.12380/256855}, } -@Article{Erdem2020.11.09.373407, +@Article{ErdemBen2020, author = {Erdem, Cemal and Bensman, Ethan M. and Mutsuddy, Arnab and Saint-Antoine, Michael M. and Bouhaddou, Mehdi and Blake, Robert C. and Dodd, Will and Gross, Sean M. and Heiser, Laura M. and Feltus, F. Alex and Birtwistle, Marc R.}, journal = {bioRxiv}, title = {A Simple and Efficient Pipeline for Construction, Merging, Expansion, and Simulation of Large-Scale, Single-Cell Mechanistic Models}, @@ -811,6 +811,80 @@ @Article{RaimundezDud2021 url = {https://www.sciencedirect.com/science/article/pii/S1755436521000037}, } +@Article{vanRosmalenSmi2021, + author = {R.P. {van Rosmalen} and R.W. Smith and V.A.P. {Martins dos Santos} and C. Fleck and M. Suarez-Diez}, + journal = {Metabolic Engineering}, + title = {Model reduction of genome-scale metabolic models as a basis for targeted kinetic models}, + year = {2021}, + issn = {1096-7176}, + pages = {74-84}, + volume = {64}, + abstract = {Constraint-based, genome-scale metabolic models are an essential tool to guide metabolic engineering. However, they lack the detail and time dimension that kinetic models with enzyme dynamics offer. Model reduction can be used to bridge the gap between the two methods and allow for the integration of kinetic models into the Design-Built-Test-Learn cycle. Here we show that these reduced size models can be representative of the dynamics of the original model and demonstrate the automated generation and parameterisation of such models. Using these minimal models of metabolism could allow for further exploration of dynamic responses in metabolic networks.}, + doi = {https://doi.org/10.1016/j.ymben.2021.01.008}, + keywords = {Metabolic engineering, DBTL cycle, Model reduction, Model optimisation, Model-driven design, Synthetic biology}, + url = {https://www.sciencedirect.com/science/article/pii/S1096717621000161}, +} + +@Article{StenPod2021, + author = {Sten, Sebastian and Pod{\'e}us, Henrik and Sundqvist, Nicolas and Elinder, Fredrik and Engstr{\"o}m, Maria and Cedersund, Gunnar}, + journal = {bioRxiv}, + title = {A multi-data based quantitative model for the neurovascular coupling in the brain}, + year = {2021}, + abstract = {The neurovascular coupling (NVC) forms the foundation for functional imaging techniques of the brain, since NVC connects neural activity with observable hemodynamic changes. Many aspects of the NVC have been studied both experimentally and with mathematical models: various combinations of blood volume and flow, electrical activity, oxygen saturation measures, blood oxygenation level-dependent (BOLD) response, and optogenetics have been measured and modeled in rodents, primates, or humans. We now present a first inter-connected mathematical model that describes all such data types simultaneously. The model can predict independent validation data not used for training. Using simulations, we show for example how complex bimodal behaviors appear upon stimulation. These simulations thus demonstrate how our new quantitative model, incorporating most of the core aspects of the NVC, can be used to mechanistically explain each of its constituent datasets.Competing Interest StatementThe authors have declared no competing interest.}, + doi = {10.1101/2021.03.25.437053}, + elocation-id = {2021.03.25.437053}, + eprint = {https://www.biorxiv.org/content/early/2021/03/26/2021.03.25.437053.full.pdf}, + publisher = {Cold Spring Harbor Laboratory}, + url = {https://www.biorxiv.org/content/early/2021/03/26/2021.03.25.437053}, +} + +@PhdThesis{Gaspari2021, + author = {Gaspari, Erika}, + school = {Wageningen University}, + title = {Model-driven design of Mycoplasma as a vaccine chassis}, + year = {2021}, + address = {Wageningen}, + comment = {WU thesis 7758 Includes bibliographical references. - With summaries in English, Italian and Spanish +10.18174/539593}, + doi = {10.18174/539593}, + issn = {9789463956864}, + url = {https://edepot.wur.nl/539593}, +} + +@Article{VanhoeferMat2021, + author = {Jakob Vanhoefer and Marta R. A. Matos and Dilan Pathirana and Yannik Schälte and Jan Hasenauer}, + journal = {Journal of Open Source Software}, + title = {yaml2sbml: Human-readable and -writable specification of ODE models and their conversion to SBML}, + year = {2021}, + number = {61}, + pages = {3215}, + volume = {6}, + doi = {10.21105/joss.03215}, + publisher = {The Open Journal}, + url = {https://doi.org/10.21105/joss.03215}, +} + +@Misc{VillaverdePat2021, + author = {Alejandro F. Villaverde and Dilan Pathirana and Fabian Fröhlich and Jan Hasenauer and Julio R. Banga}, + title = {A protocol for dynamic model calibration}, + year = {2021}, + archiveprefix = {arXiv}, + eprint = {2105.12008}, + primaryclass = {q-bio.QM}, +} +@article {Froehlich2021.05.20.445065, + author = {Fr{\"o}hlich, Fabian and Sorger, Peter K.}, + title = {Fides: Reliable Trust-Region Optimization for Parameter Estimation of Ordinary Differential Equation Models}, + elocation-id = {2021.05.20.445065}, + year = {2021}, + doi = {10.1101/2021.05.20.445065}, + publisher = {Cold Spring Harbor Laboratory}, + abstract = {Motivation Because they effectively represent mass action kinetics, ordinary differential equation models are widely used to describe biochemical processes. Optimization-based calibration of these models on experimental data can be challenging, even for low-dimensional problems. However, reliable model calibration is a prerequisite for many subsequent analysis steps, including uncertainty analysis, model selection and biological interpretation. Although multiple hypothesis have been advanced to explain why optimization based calibration of biochemical models is challenging, there are few comprehensive studies that test these hypothesis and tools for performing such studies are also lacking.Results We implemented an established trust-region method as a modular python framework (fides) to enable structured comparison of different approaches to ODE model calibration involving Hessian approximation schemes and trust-region subproblem solvers. We evaluate fides on a set of benchmark problems that include experimental data. We find a high variability in optimizer performance among different implementations of the same algorithm, with fides performing more reliably that other implementations investigated. Our investigation of possible sources of poor optimizer performance identify shortcomings in the widely used Gauss-Newton approximation. We address these shortcomings by proposing a novel hybrid Hessian approximation scheme that enhances optimizer performance.Availability Fides is published under the permissive BSD-3-Clause license with source code publicly available at https://github.com/fides-dev/fides. Citeable releases are archived on Zenodo.Contact fabian_froehlich{at}hms.harvard.edu and peter_sorger{at}hms.harvard.eduSupplementary information Supplementary data are available at Bioinformatics online and at https://github.com/fides-dev/fides-benchmark.Competing Interest StatementPKS is a member of the SAB or BOD member of Applied Biomath, RareCyte Inc., and Glencoe Software, which distributes a commercial version of the OMERO database; PKS is also a member of the NanoString SAB. In the last five years the Sorger lab has received research funding from Novartis and Merck. Sorger declares that none of these relationships have related to the content of this manuscript.}, + URL = {https://www.biorxiv.org/content/early/2021/05/22/2021.05.20.445065}, + eprint = {https://www.biorxiv.org/content/early/2021/05/22/2021.05.20.445065.full.pdf}, + journal = {bioRxiv} +} + @Comment{jabref-meta: databaseType:bibtex;} @Comment{jabref-meta: grouping: diff --git a/documentation/references.md b/documentation/references.md index efe862292d..3f624bdac4 100644 --- a/documentation/references.md +++ b/documentation/references.md @@ -1,11 +1,17 @@ # References -List of publications using AMICI. Total number is 51. +List of publications using AMICI. Total number is 57. If you applied AMICI in your work and your publication is missing, please let us know via a new Github issue.

2021

+
+

Fröhlich, Fabian, and Peter K. Sorger. 2021. “Fides: Reliable Trust-Region Optimization for Parameter Estimation of Ordinary Differential Equation Models.” bioRxiv. https://doi.org/10.1101/2021.05.20.445065.

+
+
+

Gaspari, Erika. 2021. “Model-Driven Design of Mycoplasma as a Vaccine Chassis.” PhD thesis, Wageningen: Wageningen University. https://doi.org/10.18174/539593.

+

Raimúndez, Elba, Erika Dudkin, Jakob Vanhoefer, Emad Alamoudi, Simon Merkt, Lara Fuhrmann, Fan Bai, and Jan Hasenauer. 2021. “COVID-19 Outbreak in Wuhan Demonstrates the Limitations of Publicly Available Case Numbers for Epidemiological Modeling.” Epidemics 34: 100439. https://doi.org/https://doi.org/10.1016/j.epidem.2021.100439.

@@ -15,13 +21,25 @@ If you applied AMICI in your work and your publication is missing, please let us

Städter, Philipp, Yannik Schälte, Leonard Schmiester, Jan Hasenauer, and Paul L. Stapor. 2021. “Benchmarking of Numerical Integration Methods for Ode Models of Biological Systems.” Scientific Reports 11 (1): 2696. https://doi.org/10.1038/s41598-021-82196-2.

+
+

Sten, Sebastian, Henrik Podéus, Nicolas Sundqvist, Fredrik Elinder, Maria Engström, and Gunnar Cedersund. 2021. “A Multi-Data Based Quantitative Model for the Neurovascular Coupling in the Brain.” bioRxiv. https://doi.org/10.1101/2021.03.25.437053.

+
+
+

Vanhoefer, Jakob, Marta R. a. Matos, Dilan Pathirana, Yannik Schälte, and Jan Hasenauer. 2021. “Yaml2sbml: Human-Readable and -Writable Specification of Ode Models and Their Conversion to Sbml.” Journal of Open Source Software 6 (61): 3215. https://doi.org/10.21105/joss.03215.

+
+
+

van Rosmalen, R. P., R. W. Smith, V. A. P. Martins dos Santos, C. Fleck, and M. Suarez-Diez. 2021. “Model Reduction of Genome-Scale Metabolic Models as a Basis for Targeted Kinetic Models.” Metabolic Engineering 64: 74–84. https://doi.org/https://doi.org/10.1016/j.ymben.2021.01.008.

+
+
+

Villaverde, Alejandro F., Dilan Pathirana, Fabian Fröhlich, Jan Hasenauer, and Julio R. Banga. 2021. “A Protocol for Dynamic Model Calibration.” http://arxiv.org/abs/2105.12008.

+

2020

Alabert, Constance, Carolin Loos, Moritz Voelker-Albert, Simona Graziano, Ignasi Forné, Nazaret Reveron-Gomez, Lea Schuh, et al. 2020. “Domain Model Explains Propagation Dynamics and Stability of Histone H3k27 and H3k36 Methylation Landscapes.” Cell Reports 30 (4): 1223–1234.e8. https://doi.org/10.1016/j.celrep.2019.12.060.

-
+

Erdem, Cemal, Ethan M. Bensman, Arnab Mutsuddy, Michael M. Saint-Antoine, Mehdi Bouhaddou, Robert C. Blake, Will Dodd, et al. 2020. “A Simple and Efficient Pipeline for Construction, Merging, Expansion, and Simulation of Large-Scale, Single-Cell Mechanistic Models.” bioRxiv. https://doi.org/10.1101/2020.11.09.373407.

@@ -54,7 +72,7 @@ If you applied AMICI in your work and your publication is missing, please let us

2019

-
+

Adlung, Lorenz, Paul Stapor, Christian Tönsing, Leonard Schmiester, Luisa E. Schwarzmüller, Dantong Wang, Jens Timmer, Ursula Klingmüller, Jan Hasenauer, and Marcel Schilling. 2019. “Cell-to-Cell Variability in Jak2/Stat5 Pathway Components and Cytoplasmic Volumes Define Survival Threshold in Erythroid Progenitor Cells.” bioRxiv. https://doi.org/10.1101/866871.

@@ -88,7 +106,7 @@ If you applied AMICI in your work and your publication is missing, please let us

Terje Lines, Glenn, Łukasz Paszkowski, Leonard Schmiester, Daniel Weindl, Paul Stapor, and Jan Hasenauer. 2019. “Efficient Computation of Steady States in Large-Scale Ode Models of Biochemical Reaction Networks.” IFAC-PapersOnLine 52 (26): 32–37. https://doi.org/10.1016/j.ifacol.2019.12.232.

-

Villaverde, Alejandro F., Elba Raimúndez, Jan Hasenauer, and Julio R. Banga. 2019. “A Comparison of Methods for Quantifying Prediction Uncertainty in Systems Biology⁎⁎This Research Has Received Funding from the European Unions Horizon 2020 Research and Innovation Program Under Grant Agreement No 686282 (Canpathpro) and the German Ministry of Education and Research (Bmbf) Under the Grant Agreement No 01ZX1310B (Sys-Stomach) and No 01ZX1705A (Income).” IFAC-PapersOnLine 52 (26): 45–51. https://doi.org/10.1016/j.ifacol.2019.12.234.

+

Villaverde, Alejandro F., Elba Raimúndez, Jan Hasenauer, and Julio R. Banga. 2019. “A Comparison of Methods for Quantifying Prediction Uncertainty in Systems Biology.” IFAC-PapersOnLine 52 (26): 45–51. https://doi.org/10.1016/j.ifacol.2019.12.234.

Wang, Dantong, Paul Stapor, and Jan Hasenauer. 2019. “Dirac Mixture Distributions for the Approximation of Mixed Effects Models.” IFAC-PapersOnLine 52 (26): 200–206. https://doi.org/10.1016/j.ifacol.2019.12.258.

@@ -120,8 +138,8 @@ If you applied AMICI in your work and your publication is missing, please let us

Loos, Carolin, Katharina Moeller, Fabian Fröhlich, Tim Hucho, and Jan Hasenauer. 2018. “A Hierarchical, Data-Driven Approach to Modeling Single-Cell Populations Predicts Latent Causes of Cell-to-Cell Variability.” Cell Systems 6 (5): 593–603. https://doi.org/10.1016/j.cels.2018.04.008.

-
-

Pitt, Jake Alan, Lucian Gomoescu, Constantinos C. Pantelides, Benoît Chachuat, and Julio R. Banga. 2018. “Critical Assessment of Parameter Estimation Methods in Models of Biological Oscillators⁎⁎This Project Has Received Funding from the European Unions Horizon 2020 Research and Innovation Program Under Grant Agreement 675585 (Marie Sklodowska-Curie Itn Symbiosys). The Authors Jap and Lg Are Marie Sklodowska-Curie Early Stage Researchers at Iim-Csic (Spain) and Pse Ltd (Uk) Respectively.” IFAC-PapersOnLine 51 (19): 72–75. https://doi.org/https://doi.org/10.1016/j.ifacol.2018.09.040.

+
+

Pitt, Jake Alan, Lucian Gomoescu, Constantinos C. Pantelides, Benoît Chachuat, and Julio R. Banga. 2018. “Critical Assessment of Parameter Estimation Methods in Models of Biological Oscillators.” IFAC-PapersOnLine 51 (19): 72–75. https://doi.org/https://doi.org/10.1016/j.ifacol.2018.09.040.

Schälte, Y., P. Stapor, and J. Hasenauer. 2018. “Evaluation of Derivative-Free Optimizers for Parameter Estimation in Systems Biology.” FAC-PapersOnLine 51 (19): 98–101. https://doi.org/10.1016/j.ifacol.2018.09.025.

From 39aad8d8507ddee414899b0741be52bbfe7ceaae Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Fri, 28 May 2021 22:36:31 +0200 Subject: [PATCH 10/13] Nightly test for AMICI installation from PyPI (#1510) Nightly test installation of latest AMICI version from PyPI on Ubuntu/MacOS using different Python versions. Closes #1280 --- .github/workflows/test_pypi.yml | 46 +++++++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/test_pypi.yml diff --git a/.github/workflows/test_pypi.yml b/.github/workflows/test_pypi.yml new file mode 100644 index 0000000000..628aad2864 --- /dev/null +++ b/.github/workflows/test_pypi.yml @@ -0,0 +1,46 @@ +name: PyPI installation +on: + workflow_dispatch: + schedule: + - cron: '48 4 * * *' + +jobs: + pypi: + name: PyPI installation + + strategy: + fail-fast: false + matrix: + python-version: [3.7, 3.8, 3.9] + os: [ubuntu-20.04, macos-latest] + + runs-on: ${{ matrix.os }} + + steps: + - name: apt + run: | + if [[ ${{ matrix.os }} == ubuntu* ]] ; then \ + sudo apt-get update \ + && sudo apt-get install -y \ + g++ \ + libatlas-base-dev \ + libhdf5-serial-dev \ + swig + fi + + - name: homebrew + run: | + if [[ ${{ matrix.os }} == macos* ]] ; then \ + brew install hdf5 swig gcc libomp + fi + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - run: pip install --upgrade pip + - run: pip install -v amici + - run: python -c "from amici import _amici; print(_amici)" + # Requires 0.11.17 + # - run: python -m amici diff --git a/README.md b/README.md index ed0db4beae..1b05c7050d 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,8 @@ constrained optimization problems. PyPI version + + PyPI installation Build Status From 56c0fec3d3b08a5acd0246c2e5066cf81b6b5102 Mon Sep 17 00:00:00 2001 From: Dilan Pathirana <59329744+dilpath@users.noreply.github.com> Date: Sat, 29 May 2021 00:25:37 +0200 Subject: [PATCH 11/13] Fix substitution of expressions in drootdt_total (#1512) --- python/amici/ode_export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/amici/ode_export.py b/python/amici/ode_export.py index 931b8c38f4..b5ec800af4 100644 --- a/python/amici/ode_export.py +++ b/python/amici/ode_export.py @@ -1864,7 +1864,7 @@ def _compute_equation(self, name: str) -> None: # following lines are only evaluated if a model has events w_sorted = \ toposort_symbols(dict(zip(self._syms['w'], self._eqs['w']))) - tmp_xdot = self._eqs['xdot'].subs(w_sorted) + tmp_xdot = smart_subs_dict(self._eqs['xdot'], w_sorted) self._eqs[name] = ( smart_multiply(self.eq('drootdx'), tmp_xdot) + self.eq('drootdt') From d72249aa5220f78ff21488ec6bc69b9424586ba4 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Sun, 30 May 2021 15:34:46 +0200 Subject: [PATCH 12/13] Update nightly test for AMICI installation from PyPI --- .github/workflows/test_pypi.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test_pypi.yml b/.github/workflows/test_pypi.yml index 628aad2864..138a933952 100644 --- a/.github/workflows/test_pypi.yml +++ b/.github/workflows/test_pypi.yml @@ -42,5 +42,4 @@ jobs: - run: pip install --upgrade pip - run: pip install -v amici - run: python -c "from amici import _amici; print(_amici)" - # Requires 0.11.17 - # - run: python -m amici + - run: python -m amici From ace2add48d77a48ffb2d44990918864cc3db9be9 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Fri, 28 May 2021 22:37:10 +0200 Subject: [PATCH 13/13] Bump version number; update CHANGELOG --- CHANGELOG.md | 18 ++++++++++++++++++ version.txt | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a0980a33e..e39c780dbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,24 @@ ## v0.X Series +### v0.11.17 (2021-05-30) + +Fixes: +* Fix "maybe-uninitialized" compiler warning (#1495) +* Fix substitution of expressions in `drootdt_total (#1512) +* C++: Fix serialization and == operator (#1493) +* C++: Avoid `w` in `root` and `stau` headers (refactor) (#1503) + +Documentation: +* Updated OpenBLAS Windows installation instructions (#1496) +* Updated how-to-cite to Bioinformatics paper (#1499) +* Updated list of papers using AMICI (#1509) + +Other: +* Remove sllh computation from `petab_objective.simulate_petab` (#1498) +* Add __main__.py to Python package to provide info on AMICI installation + via `python -m amici` (#1500) + ### v0.11.16 (2021-04-13) Fixes: diff --git a/version.txt b/version.txt index db07b54af2..c12244635e 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.11.16 +0.11.17