From 5bd921f41b902f4ced64c511890e8c8a896c93af Mon Sep 17 00:00:00 2001 From: Dilan Pathirana <59329744+dilpath@users.noreply.github.com> Date: Fri, 16 Feb 2024 19:45:09 +0100 Subject: [PATCH 01/13] User option to fail if model needs to be compiled (#2289) * support "do not compile" for petab problems * rewrite * do not pass new kwarg to sbml2amici --- documentation/ExampleJax.ipynb | 2 +- python/examples/example_errors.ipynb | 8 +++--- python/examples/example_jax/ExampleJax.ipynb | 2 +- python/sdist/amici/petab/petab_import.py | 29 +++++++++++++++----- tests/petab_test_suite/test_petab_suite.py | 2 +- 5 files changed, 29 insertions(+), 14 deletions(-) diff --git a/documentation/ExampleJax.ipynb b/documentation/ExampleJax.ipynb index c9fbb589e5..53e03788da 100644 --- a/documentation/ExampleJax.ipynb +++ b/documentation/ExampleJax.ipynb @@ -572,7 +572,7 @@ "source": [ "from amici.petab.petab_import import import_petab_problem\n", "\n", - "amici_model = import_petab_problem(petab_problem, force_compile=True)" + "amici_model = import_petab_problem(petab_problem, compile_=True)" ] }, { diff --git a/python/examples/example_errors.ipynb b/python/examples/example_errors.ipynb index 2b35964d8b..3bf81aff61 100644 --- a/python/examples/example_errors.ipynb +++ b/python/examples/example_errors.ipynb @@ -77,7 +77,7 @@ "source": [ "petab_problem = benchmark_models_petab.get_problem(\"Fujita_SciSignal2010\")\n", "amici_model = import_petab_problem(\n", - " petab_problem, verbose=False, force_compile=False\n", + " petab_problem, verbose=False, compile_=None\n", ")\n", "\n", "np.random.seed(2991)\n", @@ -423,7 +423,7 @@ "source": [ "petab_problem = benchmark_models_petab.get_problem(\"Weber_BMC2015\")\n", "amici_model = import_petab_problem(\n", - " petab_problem, verbose=False, force_compile=False\n", + " petab_problem, verbose=False, compile_=None\n", ")\n", "\n", "np.random.seed(4)\n", @@ -699,7 +699,7 @@ "amici_model = import_petab_problem(\n", " petab_problem,\n", " verbose=False,\n", - " force_compile=True,\n", + " compile_=True,\n", " model_name=\"Blasi_CellSystems2016_1\",\n", ")\n", "\n", @@ -819,7 +819,7 @@ " # we need a different model name if we import the model again\n", " # we cannot load a model with the same name as an already loaded model\n", " model_name=\"Blasi_CellSystems2016_2\",\n", - " force_compile=True,\n", + " compile_=True,\n", ")\n", "del os.environ[\"AMICI_EXPERIMENTAL_SBML_NONCONST_CLS\"]\n", "\n", diff --git a/python/examples/example_jax/ExampleJax.ipynb b/python/examples/example_jax/ExampleJax.ipynb index 225bd13667..62391ce9be 100644 --- a/python/examples/example_jax/ExampleJax.ipynb +++ b/python/examples/example_jax/ExampleJax.ipynb @@ -265,7 +265,7 @@ "from amici.petab.petab_import import import_petab_problem\n", "\n", "amici_model = import_petab_problem(\n", - " petab_problem, force_compile=True, verbose=False\n", + " petab_problem, compile_=True, verbose=False\n", ")" ] }, diff --git a/python/sdist/amici/petab/petab_import.py b/python/sdist/amici/petab/petab_import.py index 558f51ca15..902bf837ef 100644 --- a/python/sdist/amici/petab/petab_import.py +++ b/python/sdist/amici/petab/petab_import.py @@ -35,7 +35,7 @@ def import_petab_problem( petab_problem: petab.Problem, model_output_dir: Union[str, Path, None] = None, model_name: str = None, - force_compile: bool = False, + compile_: bool = None, non_estimated_parameters_as_constants=True, **kwargs, ) -> "amici.Model": @@ -53,9 +53,10 @@ def import_petab_problem( Name of the generated model module. Defaults to the ID of the model or the model file name without the extension. - :param force_compile: - Whether to compile the model even if the target folder is not empty, - or the model exists already. + :param compile_: + If ``True``, the model will be compiled. If ``False``, the model will + not be compiled. If ``None``, the model will be compiled if it cannot + be imported. :param non_estimated_parameters_as_constants: Whether parameters marked as non-estimated in PEtab should be @@ -71,6 +72,17 @@ def import_petab_problem( :return: The imported model. """ + if "force_compile" in kwargs: + if kwargs["force_compile"]: + compile_ = True + del kwargs["force_compile"] + warn( + "The `force_compile` option is deprecated, please use the " + "new `compile_` option, which also supports 'do not compile'.", + DeprecationWarning, + stacklevel=2, + ) + if petab_problem.model.type_id not in (MODEL_TYPE_SBML, MODEL_TYPE_PYSB): raise NotImplementedError( "Unsupported model type " + petab_problem.model.type_id @@ -107,12 +119,15 @@ def import_petab_problem( os.makedirs(model_output_dir) # check if compilation necessary - if force_compile or not _can_import_model(model_name, model_output_dir): + if compile_ or ( + compile_ is None + and not _can_import_model(model_name, model_output_dir) + ): # check if folder exists - if os.listdir(model_output_dir) and not force_compile: + if os.listdir(model_output_dir) and not compile_: raise ValueError( f"Cannot compile to {model_output_dir}: not empty. " - "Please assign a different target or set `force_compile`." + "Please assign a different target or set `compile_` to `True`." ) # remove folder if exists diff --git a/tests/petab_test_suite/test_petab_suite.py b/tests/petab_test_suite/test_petab_suite.py index 0924c09576..6d08cfb693 100755 --- a/tests/petab_test_suite/test_petab_suite.py +++ b/tests/petab_test_suite/test_petab_suite.py @@ -62,7 +62,7 @@ def _test_case(case, model_type, version): petab_problem=problem, model_output_dir=model_output_dir, model_name=model_name, - force_compile=True, + compile_=True, ) solver = model.getSolver() solver.setSteadyStateToleranceFactor(1.0) From ebd374a3c5249dff6746281bf9f1bfe46efebea9 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 20 Feb 2024 11:18:22 +0100 Subject: [PATCH 02/13] GHA: Skip codecov action on pushes to forks (#2293) Submitting coverage results to codecov from push-triggered actions from forks will result in missing-token errors. Therefore, skip codecov submission in those cases. Reverts some removals from https://github.com/AMICI-dev/AMICI/pull/2284. --- .github/workflows/test_petab_test_suite.yml | 1 + .github/workflows/test_python_cplusplus.yml | 4 ++++ .github/workflows/test_sbml_semantic_test_suite.yml | 1 + 3 files changed, 6 insertions(+) diff --git a/.github/workflows/test_petab_test_suite.yml b/.github/workflows/test_petab_test_suite.yml index 1af341009f..6301269e03 100644 --- a/.github/workflows/test_petab_test_suite.yml +++ b/.github/workflows/test_petab_test_suite.yml @@ -85,6 +85,7 @@ jobs: tests/petab_test_suite/ - name: Codecov + if: github.event_name == 'pull_request' || github.repository_owner == 'AMICI-dev' uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/test_python_cplusplus.yml b/.github/workflows/test_python_cplusplus.yml index 507283b156..fb90476eb8 100644 --- a/.github/workflows/test_python_cplusplus.yml +++ b/.github/workflows/test_python_cplusplus.yml @@ -66,6 +66,7 @@ jobs: ${AMICI_DIR}/python/tests/test_splines.py - name: Codecov Python + if: github.event_name == 'pull_request' || github.repository_owner == 'AMICI-dev' uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} @@ -85,6 +86,7 @@ jobs: && lcov -a coverage_cpp.info -a coverage_py.info -o coverage.info - name: Codecov CPP + if: github.event_name == 'pull_request' || github.repository_owner == 'AMICI-dev' uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} @@ -139,6 +141,7 @@ jobs: ${AMICI_DIR}/python/tests/test_splines_short.py - name: Codecov Python + if: github.event_name == 'pull_request' || github.repository_owner == 'AMICI-dev' uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} @@ -158,6 +161,7 @@ jobs: && lcov -a coverage_cpp.info -a coverage_py.info -o coverage.info - name: Codecov CPP + if: github.event_name == 'pull_request' || github.repository_owner == 'AMICI-dev' uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/test_sbml_semantic_test_suite.yml b/.github/workflows/test_sbml_semantic_test_suite.yml index cf03a5d458..ddc78e1b89 100644 --- a/.github/workflows/test_sbml_semantic_test_suite.yml +++ b/.github/workflows/test_sbml_semantic_test_suite.yml @@ -54,6 +54,7 @@ jobs: path: tests/amici-semantic-results - name: Codecov SBMLSuite + if: github.event_name == 'pull_request' || github.repository_owner == 'AMICI-dev' uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} From 043480232bf42de9780be9fb6894f43323a02caf Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 20 Feb 2024 11:19:01 +0100 Subject: [PATCH 03/13] More informative error message for ReturnDataView.by_id (#2295) --- python/sdist/amici/numpy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/sdist/amici/numpy.py b/python/sdist/amici/numpy.py index fdf802147c..6e2966ba4b 100644 --- a/python/sdist/amici/numpy.py +++ b/python/sdist/amici/numpy.py @@ -359,7 +359,8 @@ def by_id( ) or self._swigptr.parameter_ids else: raise NotImplementedError( - f"Subsetting {field} by ID is not implemented or not possible." + f"Subsetting `{field}` by ID (`{entity_id}`) " + "is not implemented or not possible." ) col_index = ids.index(entity_id) return getattr(self, field)[:, ..., col_index] From 24685a39c38f32786ad7ac5a9a9a0b720a4cd288 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 20 Feb 2024 11:20:07 +0100 Subject: [PATCH 04/13] GHA: update deploy_protected.yml (#2294) Closes #2288 Fixes: 1. > Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: docker/setup-qemu-action@v2, docker/setup-buildx-action@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/. 2. Prevent errors on fork actions: > Run elgohr/Publish-Docker-Github-Action@v4 Run $GITHUB_ACTION_PATH/entrypoint.sh Unable to find the username. Did you set with.username? Either check for organization=amici-dev, or whether the username is set. --- .github/workflows/deploy_protected.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy_protected.yml b/.github/workflows/deploy_protected.yml index c520896a70..eaf625ea22 100644 --- a/.github/workflows/deploy_protected.yml +++ b/.github/workflows/deploy_protected.yml @@ -14,9 +14,8 @@ on: jobs: dockerhub: - # https://github.com/marketplace/actions/publish-docker name: Deploy Dockerhub - + if: github.repository_owner == 'AMICI-dev' runs-on: ubuntu-22.04 strategy: @@ -31,9 +30,9 @@ jobs: - uses: actions/checkout@v4 - run: git archive -o container/amici.tar.gz --format=tar.gz HEAD - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@v4 with: From f9bfefc8229093a58964bf400e2b54524443984f Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 20 Feb 2024 12:19:11 +0100 Subject: [PATCH 05/13] Refactor DEModel.splines -> DEModel._splines (#2292) To be consistent with all other model components. --- python/sdist/amici/de_export.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/python/sdist/amici/de_export.py b/python/sdist/amici/de_export.py index 4e7e0999f2..12cde4630f 100644 --- a/python/sdist/amici/de_export.py +++ b/python/sdist/amici/de_export.py @@ -768,7 +768,7 @@ def __init__( self._expressions: list[Expression] = [] self._conservation_laws: list[ConservationLaw] = [] self._events: list[Event] = [] - self.splines = [] + self._splines = [] self._symboldim_funs: dict[str, Callable[[], int]] = { "sx": self.num_states_solver, "v": self.num_states_solver, @@ -968,7 +968,7 @@ def import_from_sbml_importer( value=spline_expr, ) ) - self.splines = si.splines + self._splines = si.splines # get symbolic expression from SBML importers symbols = copy.copy(si.symbols) @@ -1690,7 +1690,7 @@ def _generate_symbol(self, name: str) -> None: # placeholders for the numeric spline values. # Need to create symbols self._syms[name] = sp.Matrix( - [[f"spl_{isp}" for isp in range(len(self.splines))]] + [[f"spl_{isp}" for isp in range(len(self._splines))]] ) return elif name == "sspl": @@ -1698,7 +1698,7 @@ def _generate_symbol(self, name: str) -> None: self._syms[name] = sp.Matrix( [ [f"sspl_{isp}_{ip}" for ip in range(len(self._syms["p"]))] - for isp in range(len(self.splines)) + for isp in range(len(self._splines)) ] ) return @@ -2050,7 +2050,7 @@ def _compute_equation(self, name: str) -> None: elif name == "spline_values": # force symbols self._eqs[name] = sp.Matrix( - [y for spline in self.splines for y in spline.values_at_nodes] + [y for spline in self._splines for y in spline.values_at_nodes] ) elif name == "spline_slopes": @@ -2058,7 +2058,7 @@ def _compute_equation(self, name: str) -> None: self._eqs[name] = sp.Matrix( [ d - for spline in self.splines + for spline in self._splines for d in ( sp.zeros(len(spline.derivatives_at_nodes), 1) if spline.derivatives_by_fd @@ -2892,7 +2892,7 @@ def __init__( self.model: DEModel = de_model self.model._code_printer.known_functions.update( splines.spline_user_functions( - self.model.splines, self._get_index("p") + self.model._splines, self._get_index("p") ) ) @@ -3553,14 +3553,14 @@ def _get_function_body( return [line for line in lines if line] def _get_create_splines_body(self): - if not self.model.splines: + if not self.model._splines: return [" return {};"] ind4 = " " * 4 ind8 = " " * 8 body = ["return {"] - for ispl, spline in enumerate(self.model.splines): + for ispl, spline in enumerate(self.model._splines): if isinstance(spline.nodes, splines.UniformGrid): nodes = ( f"{ind8}{{{spline.nodes.start}, {spline.nodes.stop}}}, " @@ -3674,7 +3674,7 @@ def _write_model_header_cpp(self) -> None: "NEVENT": self.model.num_events(), "NEVENT_SOLVER": self.model.num_events_solver(), "NOBJECTIVE": "1", - "NSPL": len(self.model.splines), + "NSPL": len(self.model._splines), "NW": len(self.model.sym("w")), "NDWDP": len( self.model.sparsesym( From 35731318e19e88a8b3e68b23007066958b112444 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Tue, 20 Feb 2024 14:14:31 +0100 Subject: [PATCH 06/13] Fix `ENABLE_AMICI_DEBUGGING=TRUE` not working with MSVC (#2296) Fixes ``` cl : Command line warning D9002 : ignoring unknown option '-O0' cl : Command line warning D9002 : ignoring unknown option '-g' ``` see also https://learn.microsoft.com/en-us/cpp/build/reference/debug-generate-debug-info?view=msvc-170 Fixes #2228 --- CMakeLists.txt | 7 ++++++- src/CMakeLists.template.cmake | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b6c9140e9..032a9fb084 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,7 +84,12 @@ endif() # Debug build? if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") - add_compile_options(-UNDEBUG -O0 -g) + add_compile_options(-UNDEBUG) + if(MSVC) + add_compile_options(-DEBUG) + else() + add_compile_options(-O0 -g) + endif() set(CMAKE_BUILD_TYPE "Debug") endif() diff --git a/src/CMakeLists.template.cmake b/src/CMakeLists.template.cmake index 572efede80..ee50a551e8 100644 --- a/src/CMakeLists.template.cmake +++ b/src/CMakeLists.template.cmake @@ -41,7 +41,12 @@ message(STATUS "Found AMICI ${Amici_DIR}") # Debug build? if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") - add_compile_options(-UNDEBUG -O0 -g) + add_compile_options(-UNDEBUG) + if(MSVC) + add_compile_options(-DEBUG) + else() + add_compile_options(-O0 -g) + endif() set(CMAKE_BUILD_TYPE "Debug") endif() From 3673940ba5b5ce95935d8002ac84233e4b0654ef Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Wed, 21 Feb 2024 22:58:54 +0100 Subject: [PATCH 07/13] Fix MANIFEST.in warning (#2297) * Fix MANIFEST.in Fixes `warning: manifest_maker: MANIFEST.in, line 13: path '**/build/' cannot end with '/'` e.g. https://github.com/AMICI-dev/AMICI/actions/runs/7970974169/job/21759690743?pr=2296#step:14:163 * .. * .. --- .github/workflows/deploy_protected.yml | 2 +- python/sdist/MANIFEST.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy_protected.yml b/.github/workflows/deploy_protected.yml index eaf625ea22..5b32786c37 100644 --- a/.github/workflows/deploy_protected.yml +++ b/.github/workflows/deploy_protected.yml @@ -15,7 +15,7 @@ on: jobs: dockerhub: name: Deploy Dockerhub - if: github.repository_owner == 'AMICI-dev' + if: github.event.pull_request.head.repo.fork == false runs-on: ubuntu-22.04 strategy: diff --git a/python/sdist/MANIFEST.in b/python/sdist/MANIFEST.in index 762987665f..5be0b1ebc6 100644 --- a/python/sdist/MANIFEST.in +++ b/python/sdist/MANIFEST.in @@ -10,7 +10,7 @@ include version.txt include LICENSE.md exclude amici/*.so exclude amici/*.dll -prune **/build/ +prune **/build prune amici/share prune amici/lib prune amici/ThirdParty/SuiteSparse/lib From 74d4e1f816e822a8c5b0d66460e588848a94be6b Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Wed, 21 Feb 2024 23:03:39 +0100 Subject: [PATCH 08/13] Skip unnecessary toposorting in `DEModel._collect_heaviside_roots` (#2299) Sorting is only required if roots have been found. Most often this will not be the case. Only sort when necessary. --- python/sdist/amici/de_export.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/sdist/amici/de_export.py b/python/sdist/amici/de_export.py index 12cde4630f..0770894884 100644 --- a/python/sdist/amici/de_export.py +++ b/python/sdist/amici/de_export.py @@ -2724,6 +2724,9 @@ def _collect_heaviside_roots( elif arg.has(sp.Heaviside): root_funs.extend(self._collect_heaviside_roots(arg.args)) + if not root_funs: + return [] + # substitute 'w' expressions into root expressions now, to avoid # rewriting 'root.cpp' and 'stau.cpp' headers # to include 'w.h' From f0c7c59e0236af42e8ca9c917a66f040091a594c Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Wed, 21 Feb 2024 23:35:40 +0100 Subject: [PATCH 09/13] Fix missing toposort after rateOf-substitutions in `w` (#2291) Fixes potentially incorrect simulation results when using rateOf in `w` where the rates depend on `w`. Fixes #2290 --- python/sdist/amici/de_export.py | 82 ++++++++++++++++--- .../test_sbml_import_special_functions.py | 54 +++++++++++- 2 files changed, 124 insertions(+), 12 deletions(-) diff --git a/python/sdist/amici/de_export.py b/python/sdist/amici/de_export.py index 0770894884..3bc65d5a7f 100644 --- a/python/sdist/amici/de_export.py +++ b/python/sdist/amici/de_export.py @@ -30,7 +30,6 @@ Union, ) from collections.abc import Sequence - import numpy as np import sympy as sp from sympy.matrices.dense import MutableDenseMatrix @@ -1117,11 +1116,10 @@ def transform_dxdt_to_concentration(species_id, dxdt): for llh in si.symbols[SymbolId.LLHY].values() ) - self._process_sbml_rate_of( - symbols - ) # substitute SBML-rateOf constructs + # substitute SBML-rateOf constructs + self._process_sbml_rate_of() - def _process_sbml_rate_of(self, symbols) -> None: + def _process_sbml_rate_of(self) -> None: """Substitute any SBML-rateOf constructs in the model equations""" rate_of_func = sp.core.function.UndefinedFunction("rateOf") species_sym_to_xdot = dict(zip(self.sym("x"), self.sym("xdot"))) @@ -1129,8 +1127,6 @@ def _process_sbml_rate_of(self, symbols) -> None: def get_rate(symbol: sp.Symbol): """Get rate of change of the given symbol""" - nonlocal symbols - if symbol.find(rate_of_func): raise SBMLException("Nesting rateOf() is not allowed.") @@ -1142,6 +1138,7 @@ def get_rate(symbol: sp.Symbol): return 0 # replace rateOf-instances in xdot by xdot symbols + made_substitutions = False for i_state in range(len(self.eq("xdot"))): if rate_ofs := self._eqs["xdot"][i_state].find(rate_of_func): self._eqs["xdot"][i_state] = self._eqs["xdot"][i_state].subs( @@ -1151,9 +1148,14 @@ def get_rate(symbol: sp.Symbol): for rate_of in rate_ofs } ) - # substitute in topological order - subs = toposort_symbols(dict(zip(self.sym("xdot"), self.eq("xdot")))) - self._eqs["xdot"] = smart_subs_dict(self.eq("xdot"), subs) + made_substitutions = True + + if made_substitutions: + # substitute in topological order + subs = toposort_symbols( + dict(zip(self.sym("xdot"), self.eq("xdot"))) + ) + self._eqs["xdot"] = smart_subs_dict(self.eq("xdot"), subs) # replace rateOf-instances in x0 by xdot equation for i_state in range(len(self.eq("x0"))): @@ -1165,9 +1167,55 @@ def get_rate(symbol: sp.Symbol): } ) + # replace rateOf-instances in w by xdot equation + # here we may need toposort, as xdot may depend on w + made_substitutions = False + for i_expr in range(len(self.eq("w"))): + if rate_ofs := self._eqs["w"][i_expr].find(rate_of_func): + self._eqs["w"][i_expr] = self._eqs["w"][i_expr].subs( + { + rate_of: get_rate(rate_of.args[0]) + for rate_of in rate_ofs + } + ) + made_substitutions = True + + if made_substitutions: + # Sort expressions in self._expressions, w symbols, and w equations + # in topological order. Ideally, this would already happen before + # adding the expressions to the model, but at that point, we don't + # have access to xdot yet. + # NOTE: elsewhere, conservations law expressions are expected to + # occur before any other w expressions, so we must maintain their + # position + # toposort everything but conservation law expressions, + # then prepend conservation laws + w_sorted = toposort_symbols( + dict( + zip( + self.sym("w")[self.num_cons_law() :, :], + self.eq("w")[self.num_cons_law() :, :], + ) + ) + ) + w_sorted = ( + dict( + zip( + self.sym("w")[: self.num_cons_law(), :], + self.eq("w")[: self.num_cons_law(), :], + ) + ) + | w_sorted + ) + old_syms = tuple(self._syms["w"]) + topo_expr_syms = tuple(w_sorted.keys()) + new_order = [old_syms.index(s) for s in topo_expr_syms] + self._expressions = [self._expressions[i] for i in new_order] + self._syms["w"] = sp.Matrix(topo_expr_syms) + self._eqs["w"] = sp.Matrix(list(w_sorted.values())) + for component in chain( self.observables(), - self.expressions(), self.events(), self._algebraic_equations, ): @@ -2210,6 +2258,18 @@ def _compute_equation(self, name: str) -> None: self._eqs[name] = self.sym(name) elif name == "dwdx": + if ( + expected := list( + map( + ConservationLaw.get_x_rdata, + reversed(self.conservation_laws()), + ) + ) + ) != (actual := self.eq("w")[: self.num_cons_law()]): + raise AssertionError( + "Conservation laws are not at the beginning of 'w'. " + f"Got {actual}, expected {expected}." + ) x = self.sym("x") self._eqs[name] = sp.Matrix( [ diff --git a/python/tests/test_sbml_import_special_functions.py b/python/tests/test_sbml_import_special_functions.py index 9d8f447511..3f8383ce94 100644 --- a/python/tests/test_sbml_import_special_functions.py +++ b/python/tests/test_sbml_import_special_functions.py @@ -12,7 +12,11 @@ from amici.antimony_import import antimony2amici from amici.gradient_check import check_derivatives from amici.testing import TemporaryDirectoryWinSafe, skip_on_valgrind -from numpy.testing import assert_approx_equal, assert_array_almost_equal_nulp +from numpy.testing import ( + assert_approx_equal, + assert_array_almost_equal_nulp, + assert_allclose, +) from scipy.special import loggamma @@ -222,3 +226,51 @@ def test_rateof(): assert_array_almost_equal_nulp( rdata.by_id("p2"), 1 + rdata.by_id("S1") ) + + +@skip_on_valgrind +def test_rateof_with_expression_dependent_rate(): + """Test rateOf, where the rateOf argument depends on `w` and requires + toposorting.""" + ant_model = """ + model test_rateof_with_expression_dependent_rate + S1 = 0; + S2 = 0; + S1' = rate; + S2' = 2 * rateOf(S1); + # the id of the following expression must be alphabetically before + # `rate`, so that toposort is required to evaluate the expressions + # in the correct order + e1 := 2 * rateOf(S1); + rate := time + end + """ + module_name = "test_rateof_with_expression_dependent_rate" + with TemporaryDirectoryWinSafe(prefix=module_name) as outdir: + antimony2amici( + ant_model, + model_name=module_name, + output_dir=outdir, + ) + model_module = amici.import_model_module( + module_name=module_name, module_path=outdir + ) + amici_model = model_module.getModel() + t = np.linspace(0, 10, 11) + amici_model.setTimepoints(t) + amici_solver = amici_model.getSolver() + rdata = amici.runAmiciSimulation(amici_model, amici_solver) + + state_ids_solver = amici_model.getStateIdsSolver() + + assert_array_almost_equal_nulp(rdata.by_id("e1"), 2 * t, 1) + + i_S1 = state_ids_solver.index("S1") + i_S2 = state_ids_solver.index("S2") + assert_approx_equal(rdata["xdot"][i_S1], t[-1]) + assert_approx_equal(rdata["xdot"][i_S2], 2 * t[-1]) + + assert_allclose(np.diff(rdata.by_id("S1")), t[:-1] + 0.5, atol=1e-9) + assert_array_almost_equal_nulp( + rdata.by_id("S2"), 2 * rdata.by_id("S1"), 10 + ) From 67d478cbc3ee2e08a12ac11129e82a4bcc51c82b Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Thu, 22 Feb 2024 10:14:59 +0100 Subject: [PATCH 10/13] Fix redundant calls to Model::fdwdx from Model_ODE::fJ (#2298) Remove an extraneous call to Model::fdwdx, the result of which will be overridden without use by Model_ODE::fJSparse. --- src/model_ode.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/model_ode.cpp b/src/model_ode.cpp index b3d517b36e..52275008e3 100644 --- a/src/model_ode.cpp +++ b/src/model_ode.cpp @@ -14,8 +14,6 @@ void Model_ODE::fJ( void Model_ODE::fJ( realtype t, const_N_Vector x, const_N_Vector /*xdot*/, SUNMatrix J ) { - auto x_pos = computeX_pos(x); - fdwdx(t, N_VGetArrayPointerConst(x_pos)); fJSparse(t, x, derived_state_.J_.get()); derived_state_.J_.refresh(); auto JDense = SUNMatrixWrapper(J); From 4334557c8827a9be4744f51f2df465dc7a7c88a0 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Thu, 22 Feb 2024 16:59:01 +0100 Subject: [PATCH 11/13] Add .gitignore to model directories (#2301) Add a `.gitignore` file to the amici-generated model directory to exclude the auto-generated files from version control. Closes #2300. --- python/sdist/amici/de_export.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/python/sdist/amici/de_export.py b/python/sdist/amici/de_export.py index 3bc65d5a7f..f2badbea76 100644 --- a/python/sdist/amici/de_export.py +++ b/python/sdist/amici/de_export.py @@ -3035,6 +3035,7 @@ def _generate_c_code(self) -> None: self._write_c_make_file() self._write_swig_files() self._write_module_setup() + _write_gitignore(Path(self.model_path)) shutil.copy( CXX_MAIN_TEMPLATE_FILE, os.path.join(self.model_path, "main.cpp") @@ -4385,3 +4386,17 @@ def _parallel_applyfunc(obj: sp.Matrix, func: Callable) -> sp.Matrix: "to a module-level function or disable parallelization by " "setting `AMICI_IMPORT_NPROCS=1`." ) from e + + +def _write_gitignore(dest_dir: Path) -> None: + """Write .gitignore file. + + Generate a `.gitignore` file to ignore a model directory. + + :param dest_dir: + Path to the directory to write the `.gitignore` file to. + """ + dest_dir.mkdir(exist_ok=True, parents=True) + + with open(dest_dir / ".gitignore", "w") as f: + f.write("**") From 8b324bca5b796a93094195d22a023e5f8e945ef1 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Fri, 23 Feb 2024 18:13:58 +0100 Subject: [PATCH 12/13] Update reference list (#2279) --- documentation/amici_refs.bib | 68 ++++++---- documentation/references.md | 233 +++++++++++++++++------------------ 2 files changed, 161 insertions(+), 140 deletions(-) diff --git a/documentation/amici_refs.bib b/documentation/amici_refs.bib index 4c31869d87..ef283eaf52 100644 --- a/documentation/amici_refs.bib +++ b/documentation/amici_refs.bib @@ -1100,19 +1100,20 @@ @Article{FroehlichGer2023 } @Article{FroehlichSor2022, - author = {Fröhlich, Fabian AND Sorger, Peter K.}, - journal = {PLOS Computational Biology}, - title = {Fides: Reliable trust-region optimization for parameter estimation of ordinary differential equation models}, - year = {2022}, - month = {07}, - number = {7}, - pages = {1-28}, - volume = {18}, - abstract = {Ordinary differential equation (ODE) models are widely used to study biochemical reactions in cellular networks since they effectively describe the temporal evolution of these networks using mass action kinetics. The parameters of these models are rarely known a priori and must instead be estimated by calibration using experimental data. Optimization-based calibration of ODE models on is often challenging, even for low-dimensional problems. Multiple hypotheses have been advanced to explain why biochemical model calibration is challenging, including non-identifiability of model parameters, but there are few comprehensive studies that test these hypotheses, likely because tools for performing such studies are also lacking. Nonetheless, reliable model calibration is essential for uncertainty analysis, model comparison, and biological interpretation. We implemented an established trust-region method as a modular Python framework (fides) to enable systematic comparison of different approaches to ODE model calibration involving a variety of Hessian approximation schemes. We evaluated fides on a recently developed corpus of biologically realistic benchmark problems for which real experimental data are available. Unexpectedly, we observed high variability in optimizer performance among different implementations of the same mathematical instructions (algorithms). Analysis of possible sources of poor optimizer performance identified limitations in the widely used Gauss-Newton, BFGS and SR1 Hessian approximation schemes. We addressed these drawbacks with a novel hybrid Hessian approximation scheme that enhances optimizer performance and outperforms existing hybrid approaches. When applied to the corpus of test models, we found that fides was on average more reliable and efficient than existing methods using a variety of criteria. We expect fides to be broadly useful for ODE constrained optimization problems in biochemical models and to be a foundation for future methods development.}, - creationdate = {2023-04-15T08:12:41}, - doi = {10.1371/journal.pcbi.1010322}, - publisher = {Public Library of Science}, - url = {https://doi.org/10.1371/journal.pcbi.1010322}, + author = {Fröhlich, Fabian and Sorger, Peter K.}, + journal = {PLOS Computational Biology}, + title = {Fides: Reliable trust-region optimization for parameter estimation of ordinary differential equation models}, + year = {2022}, + month = {07}, + number = {7}, + pages = {1-28}, + volume = {18}, + abstract = {Ordinary differential equation (ODE) models are widely used to study biochemical reactions in cellular networks since they effectively describe the temporal evolution of these networks using mass action kinetics. The parameters of these models are rarely known a priori and must instead be estimated by calibration using experimental data. Optimization-based calibration of ODE models on is often challenging, even for low-dimensional problems. Multiple hypotheses have been advanced to explain why biochemical model calibration is challenging, including non-identifiability of model parameters, but there are few comprehensive studies that test these hypotheses, likely because tools for performing such studies are also lacking. Nonetheless, reliable model calibration is essential for uncertainty analysis, model comparison, and biological interpretation. We implemented an established trust-region method as a modular Python framework (fides) to enable systematic comparison of different approaches to ODE model calibration involving a variety of Hessian approximation schemes. We evaluated fides on a recently developed corpus of biologically realistic benchmark problems for which real experimental data are available. Unexpectedly, we observed high variability in optimizer performance among different implementations of the same mathematical instructions (algorithms). Analysis of possible sources of poor optimizer performance identified limitations in the widely used Gauss-Newton, BFGS and SR1 Hessian approximation schemes. We addressed these drawbacks with a novel hybrid Hessian approximation scheme that enhances optimizer performance and outperforms existing hybrid approaches. When applied to the corpus of test models, we found that fides was on average more reliable and efficient than existing methods using a variety of criteria. We expect fides to be broadly useful for ODE constrained optimization problems in biochemical models and to be a foundation for future methods development.}, + creationdate = {2023-04-15T08:12:41}, + doi = {10.1371/journal.pcbi.1010322}, + modificationdate = {2024-02-23T18:10:55}, + publisher = {Public Library of Science}, + url = {https://doi.org/10.1371/journal.pcbi.1010322}, } @Article{ErdemMut2022, @@ -1163,15 +1164,6 @@ @InBook{Froehlich2023 url = {https://doi.org/10.1007/978-1-0716-3008-2_3}, } -@Misc{SluijsZho2023, - author = {Bob van Sluijs and Tao Zhou and Britta Helwig and Mathieu Baltussen and Frank Nelissen and Hans Heus and Wilhelm Huck}, - title = {Inverse Design of Enzymatic Reaction Network States}, - year = {2023}, - creationdate = {2023-07-06T10:39:46}, - doi = {10.21203/rs.3.rs-2646906/v1}, - modificationdate = {2023-07-06T10:40:37}, -} - @Article{BuckBas2023, author = {Michèle C. Buck and Lisa Bast and Judith S. Hecker and Jennifer Rivière and Maja Rothenberg-Thurley and Luisa Vogel and Dantong Wang and Immanuel Andrä and Fabian J. Theis and Florian Bassermann and Klaus H. Metzeler and Robert A.J. Oostendorp and Carsten Marr and Katharina S. Götze}, journal = {iScience}, @@ -1251,6 +1243,38 @@ @Misc{HuckBal2023 publisher = {Research Square Platform LLC}, } +@Article{LangPen2024, + author = {Lang, Paul F. and Penas, David R. and Banga, Julio R. and Weindl, Daniel and Novak, Bela}, + journal = {PLOS Computational Biology}, + title = {Reusable rule-based cell cycle model explains compartment-resolved dynamics of 16 observables in RPE-1 cells}, + year = {2024}, + month = {01}, + number = {1}, + pages = {1-24}, + volume = {20}, + abstract = {The mammalian cell cycle is regulated by a well-studied but complex biochemical reaction system. Computational models provide a particularly systematic and systemic description of the mechanisms governing mammalian cell cycle control. By combining both state-of-the-art multiplexed experimental methods and powerful computational tools, this work aims at improving on these models along four dimensions: model structure, validation data, validation methodology and model reusability. We developed a comprehensive model structure of the full cell cycle that qualitatively explains the behaviour of human retinal pigment epithelial-1 cells. To estimate the model parameters, time courses of eight cell cycle regulators in two compartments were reconstructed from single cell snapshot measurements. After optimisation with a parallel global optimisation metaheuristic we obtained excellent agreements between simulations and measurements. The PEtab specification of the optimisation problem facilitates reuse of model, data and/or optimisation results. Future perturbation experiments will improve parameter identifiability and allow for testing model predictive power. Such a predictive model may aid in drug discovery for cell cycle-related disorders.}, + creationdate = {2024-01-24T20:02:16}, + doi = {10.1371/journal.pcbi.1011151}, + modificationdate = {2024-02-23T18:10:08}, + publisher = {Public Library of Science}, + url = {https://doi.org/10.1371/journal.pcbi.1011151}, +} + +@Article{SluijsZho2024, + author = {van Sluijs, Bob and Zhou, Tao and Helwig, Britta and Baltussen, Mathieu G. and Nelissen, Frank H. T. and Heus, Hans A. and Huck, Wilhelm T. S.}, + journal = {Nature Communications}, + title = {Iterative design of training data to control intricate enzymatic reaction networks}, + year = {2024}, + issn = {2041-1723}, + month = feb, + number = {1}, + volume = {15}, + creationdate = {2024-02-23T17:09:35}, + doi = {10.1038/s41467-024-45886-9}, + modificationdate = {2024-02-23T17:09:35}, + publisher = {Springer Science and Business Media LLC}, +} + @Comment{jabref-meta: databaseType:bibtex;} @Comment{jabref-meta: grouping: diff --git a/documentation/references.md b/documentation/references.md index 00c3f40cc8..2164037aaf 100644 --- a/documentation/references.md +++ b/documentation/references.md @@ -1,6 +1,6 @@ # References -List of publications using AMICI. Total number is 82. +List of publications using AMICI. Total number is 83. If you applied AMICI in your work and your publication is missing, please let us know via a new GitHub issue. @@ -11,17 +11,35 @@ If you applied AMICI in your work and your publication is missing, please let us } +

2024

+
+
+Lang, Paul F., David R. Penas, Julio R. Banga, Daniel Weindl, and Bela +Novak. 2024. “Reusable Rule-Based Cell Cycle Model Explains +Compartment-Resolved Dynamics of 16 Observables in RPE-1 Cells.” +PLOS Computational Biology 20 (1): 1–24. https://doi.org/10.1371/journal.pcbi.1011151. +
+
+Sluijs, Bob van, Tao Zhou, Britta Helwig, Mathieu G. Baltussen, Frank H. +T. Nelissen, Hans A. Heus, and Wilhelm T. S. Huck. 2024. +“Iterative Design of Training Data to Control Intricate Enzymatic +Reaction Networks.” Nature Communications 15 (1). https://doi.org/10.1038/s41467-024-45886-9. +
+

2023

-
+role="list"> +
Buck, Michèle C., Lisa Bast, Judith S. Hecker, Jennifer Rivière, Maja Rothenberg-Thurley, Luisa Vogel, Dantong Wang, et al. 2023. “Progressive Disruption of Hematopoietic Architecture from Clonal Hematopoiesis to MDS.” iScience, 107328. https://doi.org/10.1016/j.isci.2023.107328.
-
+
Contento, Lorenzo, Noemi Castelletti, Elba Raimúndez, Ronan Le Gleut, Yannik Schälte, Paul Stapor, Ludwig Christian Hinske, et al. 2023. “Integrative Modelling of Reported Case Numbers and Seroprevalence @@ -29,14 +47,14 @@ Reveals Time-Dependent Test Efficiency and Infectious Contacts.” Epidemics 43: 100681. https://doi.org/10.1016/j.epidem.2023.100681.
-
+
Contento, Lorenzo, Paul Stapor, Daniel Weindl, and Jan Hasenauer. 2023. “A More Expressive Spline Representation for SBML Models Improves Code Generation Performance in AMICI.” bioRxiv. https://doi.org/10.1101/2023.06.29.547120.
-
+
Fröhlich, Fabian. 2023. “A Practical Guide for the Efficient Formulation and Calibration of Large, Energy- and Rule-Based Models of Cellular Signal Transduction.” In Computational Modeling of @@ -44,29 +62,28 @@ Signaling Networks, edited by Lan K. Nguyen, 59–86. New York, NY: Springer US. https://doi.org/10.1007/978-1-0716-3008-2_3.
-
+
Fröhlich, Fabian, Luca Gerosa, Jeremy Muhlich, and Peter K Sorger. 2023. “Mechanistic Model of MAPK Signaling Reveals How Allostery and Rewiring Contribute to Drug Resistance.” Molecular Systems Biology 19 (2): e10988. https://doi.org/10.15252/msb.202210988.
-
+
Hasenauer, Jan, Simon Merkt, Solomon Ali, Esayas Gudina, Wondimagegn Adissu, Maximilian Münchhoff, Alexander Graf, et al. 2023. “Long-Term Monitoring of SARS-CoV-2 Seroprevalence and Variants in Ethiopia Provides Prediction for Immunity and Cross-Immunity.” https://doi.org/10.21203/rs.3.rs-3307821/v1.
-
+
Huck, Wilhelm, Mathieu Baltussen, Thijs de Jong, Quentin Duez, and William Robinson. 2023. “Chemical Reservoir Computation in a Self-Organizing Reaction Network.” Research Square Platform LLC. https://doi.org/10.21203/rs.3.rs-3487081/v1.
-
+
Lakrisenko, Polina, Paul Stapor, Stephan Grein, Łukasz Paszkowski, Dilan Pathirana, Fabian Fröhlich, Glenn Terje Lines, Daniel Weindl, and Jan Hasenauer. 2023. “Efficient Computation of Adjoint Sensitivities @@ -74,37 +91,31 @@ at Steady-State in ODE Models of Biochemical Reaction Networks.” PLOS Computational Biology 19 (1): 1–19. https://doi.org/10.1371/journal.pcbi.1010783.
-
+
Mendes, Pedro. 2023. “Reproducibility and FAIR Principles: The Case of a Segment Polarity Network Model.” Frontiers in Cell and Developmental Biology 11. https://doi.org/10.3389/fcell.2023.1201673.
-
+
Mishra, Shekhar, Ziyu Wang, Michael J. Volk, and Huimin Zhao. 2023. “Design and Application of a Kinetic Model of Lipid Metabolism in Saccharomyces Cerevisiae.” Metabolic Engineering 75: 12–18. https://doi.org/10.1016/j.ymben.2022.11.003.
-
+
Raimúndez, Elba, Michael Fedders, and Jan Hasenauer. 2023. “Posterior Marginalization Accelerates Bayesian Inference for Dynamical Models of Biological Processes.” iScience, September, 108083. https://doi.org/10.1016/j.isci.2023.108083.
-
-Sluijs, Bob van, Tao Zhou, Britta Helwig, Mathieu Baltussen, Frank -Nelissen, Hans Heus, and Wilhelm Huck. 2023. “Inverse Design of -Enzymatic Reaction Network States.” https://doi.org/10.21203/rs.3.rs-2646906/v1. -
-
+
Tunedal, Kajsa, Federica Viola, Belén Casas Garcia, Ann Bolger, Fredrik H. Nyström, Carl Johan Östgren, Jan Engvall, et al. 2023. “Haemodynamic Effects of Hypertension and Type 2 Diabetes: -Insights from a 4d Flow 4D Flow MRI-based Personalized Cardiovascular Mathematical Model.” The Journal of Physiology n/a (n/a). https://doi.org/10.1113/JP284652. @@ -112,8 +123,8 @@ href="https://doi.org/10.1113/JP284652">https://doi.org/10.1113/JP284652.

2022

-
+role="list"> +
Albadry, Mohamed, Sebastian Höpfl, Nadia Ehteshamzad, Matthias König, Michael Böttcher, Jasna Neumann, Amelie Lupp, et al. 2022. “Periportal Steatosis in Mice Affects Distinct Parameters of @@ -121,7 +132,7 @@ Pericentral Drug Metabolism.” Scientific Reports 12 (1): 21825. https://doi.org/10.1038/s41598-022-26483-6.
-
+
Erdem, Cemal, Arnab Mutsuddy, Ethan M. Bensman, William B. Dodd, Michael M. Saint-Antoine, Mehdi Bouhaddou, Robert C. Blake, et al. 2022. “A Scalable, Open-Source Implementation of a Large-Scale @@ -129,21 +140,21 @@ Mechanistic Model for Single Cell Proliferation and Death Signaling.” Nature Communications 13 (1): 3555. https://doi.org/10.1038/s41467-022-31138-1.
-
-Fröhlich, Peter K., Fabian AND Sorger. 2022. “Fides: Reliable +
+Fröhlich, Fabian, and Peter K. Sorger. 2022. “Fides: Reliable Trust-Region Optimization for Parameter Estimation of Ordinary Differential Equation Models.” PLOS Computational Biology 18 (7): 1–28. https://doi.org/10.1371/journal.pcbi.1010322.
-
+
Massonis, Gemma, Alejandro F Villaverde, and Julio R Banga. 2022. Improving dynamic predictions with ensembles of observable models.” Bioinformatics, November. https://doi.org/10.1093/bioinformatics/btac755.
-
+
Meyer, Kristian, Mikkel Søes Ibsen, Lisa Vetter-Joss, Ernst Broberg Hansen, and Jens Abildskov. 2022. “Industrial Ion-Exchange Chromatography Development Using Discontinuous Galerkin Methods Coupled @@ -151,21 +162,21 @@ with Forward Sensitivity Analysis.” Journal of Chromatography A, 463741. https://doi.org/10.1016/j.chroma.2022.463741.
-
+
Schmucker, Robin, Gabriele Farina, James Faeder, Fabian Fröhlich, Ali Sinan Saglam, and Tuomas Sandholm. 2022. “Combination Treatment Optimization Using a Pan-Cancer Pathway Model.” PLOS Computational Biology 17 (12): 1–22. https://doi.org/10.1371/journal.pcbi.1009689.
-
+
Sluijs, Bob van, Roel J. M. Maas, Ardjan J. van der Linden, Tom F. A. de Greef, and Wilhelm T. S. Huck. 2022. “A Microfluidic Optimal Experimental Design Platform for Forward Design of Cell-Free Genetic Networks.” Nature Communications 13 (1): 3626. https://doi.org/10.1038/s41467-022-31306-3.
-
+
Stapor, Paul, Leonard Schmiester, Christoph Wierling, Simon Merkt, Dilan Pathirana, Bodo M. H. Lange, Daniel Weindl, and Jan Hasenauer. 2022. Mini-batch optimization enables training of @@ -173,7 +184,7 @@ ODE models on large-scale datasets.” Nature Communications 13 (1): 34. https://doi.org/10.1038/s41467-021-27374-6.
-
+
Sundqvist, Nicolas, Sebastian Sten, Peter Thompson, Benjamin Jan Andersson, Maria Engström, and Gunnar Cedersund. 2022. “Mechanistic Model for Human Brain Metabolism and Its Connection @@ -181,8 +192,7 @@ to the Neurovascular Coupling.” PLOS Computational Biology 18 (12): 1–24. https://doi.org/10.1371/journal.pcbi.1010798.
-
+
Villaverde, Alejandro F., Elba Raimúndez, Jan Hasenauer, and Julio R. Banga. 2022. “Assessment of Prediction Uncertainty Quantification Methods in Systems Biology.” IEEE/ACM Transactions on @@ -192,16 +202,16 @@ href="https://doi.org/10.1109/TCBB.2022.3213914">https://doi.org/10.1109/TCBB.20

2021

-
+role="list"> +
Adlung, Lorenz, Paul Stapor, Christian Tönsing, Leonard Schmiester, Luisa E. Schwarzmüller, Lena Postawa, Dantong Wang, et al. 2021. -“Cell-to-Cell Variability in Jak2/Stat5 Pathway Components and +“Cell-to-Cell Variability in JAK2/STAT5 Pathway Components and Cytoplasmic Volumes Defines Survival Threshold in Erythroid Progenitor Cells.” Cell Reports 36 (6): 109507. https://doi.org/10.1016/j.celrep.2021.109507.
-
+
Bast, Lisa, Michèle C. Buck, Judith S. Hecker, Robert A. J. Oostendorp, Katharina S. Götze, and Carsten Marr. 2021. “Computational Modeling of Stem and Progenitor Cell Kinetics Identifies Plausible @@ -209,13 +219,13 @@ Hematopoietic Lineage Hierarchies.” iScience 24 (2): 102120. https://doi.org/10.1016/j.isci.2021.102120.
-
+
Gaspari, Erika. 2021. “Model-Driven Design of Mycoplasma as a Vaccine Chassis.” PhD thesis, Wageningen: Wageningen University. https://doi.org/10.18174/539593.
-
+
Gudina, Esayas Kebede, Solomon Ali, Eyob Girma, Addisu Gize, Birhanemeskel Tegene, Gadissa Bedada Hundie, Wondewosen Tsegaye Sime, et al. 2021. Seroepidemiology and model-based @@ -224,13 +234,13 @@ front-line hospital workers and communities.” The Lancet Global Health 9 (11): e1517–27. https://doi.org/10.1016/S2214-109X(21)00386-7.
-
+
Maier, Corinna. 2021. “Bayesian Data Assimilation and Reinforcement Learning for Model-Informed Precision Dosing in Oncology.” Doctoralthesis, Universität Potsdam. https://doi.org/10.25932/publishup-51587.
-
+
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 @@ -239,42 +249,41 @@ Case Numbers for Epidemiological Modeling.” Epidemics href="https://doi.org/10.1016/j.epidem.2021.100439">https://doi.org/10.1016/j.epidem.2021.100439.
+role="listitem"> Schmiester, Leonard, Daniel Weindl, and Jan Hasenauer. 2021. “Efficient Gradient-Based Parameter Estimation for Dynamic Models Using Qualitative Data.” bioRxiv. https://doi.org/10.1101/2021.02.06.430039.
-
+
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.
-
+
Tomasoni, Danilo, Alessio Paris, Stefano Giampiccolo, Federico Reali, Giulia Simoni, Luca Marchetti, Chanchala Kaddi, et al. 2021. QSPcc Reduces Bottlenecks in Computational Model Simulations.” Communications Biology 4 (1): 1022. https://doi.org/10.1038/s42003-021-02553-9.
-
+
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/10.1016/j.ymben.2021.01.008.
-
+
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 @@ -282,8 +291,7 @@ Specification of ODE Models and Their Conversion to (61): 3215. https://doi.org/10.21105/joss.03215.
-
+
Villaverde, Alejandro F, Dilan Pathirana, Fabian Fröhlich, Jan Hasenauer, and Julio R Banga. 2021. A protocol for dynamic model calibration.” Briefings in @@ -293,16 +301,16 @@ href="https://doi.org/10.1093/bib/bbab387">https://doi.org/10.1093/bib/bbab387

2020

-
+role="list"> +
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 +Histone H3K27 and H3K36 Methylation Landscapes.” Cell Reports 30 (January): 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, @@ -310,7 +318,7 @@ Expansion, and Simulation of Large-Scale, Single-Cell Mechanistic Models.” bioRxiv. https://doi.org/10.1101/2020.11.09.373407.
-
+
Gerosa, Luca, Christopher Chidley, Fabian Fröhlich, Gabriela Sanchez, Sang Kyun Lim, Jeremy Muhlich, Jia-Yun Chen, et al. 2020. “Receptor-Driven ERK Pulses Reconfigure MAPK Signaling and Enable @@ -318,21 +326,20 @@ Persistence of Drug-Adapted BRAF-Mutant Melanoma Cells.” Cell Systems. https://doi.org/10.1016/j.cels.2020.10.002.
-
+
Kuritz, Karsten, Alain R Bonny, João Pedro Fonseca, and Frank Allgöwer. 2020. “PDE-Constrained Optimization for Estimating Population Dynamics over Cell Cycle from Static Single Cell Measurements.” bioRxiv. https://doi.org/10.1101/2020.03.30.015909.
-
+
Maier, Corinna, Niklas Hartung, Charlotte Kloft, Wilhelm Huisinga, and Jana de Wiljes. 2020. “Reinforcement Learning and Bayesian Data Assimilation for Model-Informed Precision Dosing in Oncology.” https://arxiv.org/abs/2006.01061.
-
+
Schälte, Yannik, and Jan Hasenauer. 2020. Efficient exact inference for dynamical systems with noisy measurements using sequential approximate Bayesian @@ -340,23 +347,22 @@ computation.” Bioinformatics 36 (Supplement_1): i551–59. https://doi.org/10.1093/bioinformatics/btaa397.
-
+
Schmiester, Leonard, Daniel Weindl, and Jan Hasenauer. 2020. “Parameterization of Mechanistic Models from Qualitative Data Using an Efficient Optimal Scaling Approach.” Journal of Mathematical Biology, July. https://doi.org/10.1007/s00285-020-01522-w.
-
+
Schuh, Lea, Carolin Loos, Daniil Pokrovsky, Axel Imhof, Ralph A. W. -Rupp, and Carsten Marr. 2020. “H4k20 Methylation Is Differently +Rupp, and Carsten Marr. 2020. “H4K20 Methylation Is Differently Regulated by Dilution and Demethylation in Proliferating and Cell-Cycle-Arrested Xenopus Embryos.” Cell Systems 11 (6): 653–662.e8. https://doi.org/10.1016/j.cels.2020.11.003.
-
+
Sten, Sebastian. 2020. “Mathematical Modeling of Neurovascular Coupling.” Linköping University Medical Dissertations. PhD thesis, Linköping UniversityLinköping UniversityLinköping University, @@ -365,14 +371,14 @@ Health Sciences, Center for Medical Image Science; Visualization (CMIV); Linköping University, Division of Diagnostics; Specialist Medicine. https://doi.org/10.3384/diss.diva-167806.
-
+
Sten, Sebastian, Fredrik Elinder, Gunnar Cedersund, and Maria Engström. 2020. “A Quantitative Analysis of Cell-Specific Contributions and the Role of Anesthetics to the Neurovascular Coupling.” NeuroImage 215: 116827. https://doi.org/10.1016/j.neuroimage.2020.116827.
-
+
Tsipa, Argyro, Jake Alan Pitt, Julio R. Banga, and Athanasios Mantalaris. 2020. “A Dual-Parameter Identification Approach for Data-Based Predictive Modeling of Hybrid Gene Regulatory Network-Growth @@ -383,16 +389,15 @@ href="https://doi.org/10.1007/s00449-020-02360-2">https://doi.org/10.1007/s00449

2019

-
+role="list"> +
Dharmarajan, Lekshmi, Hans-Michael Kaltenbach, Fabian Rudolf, and Joerg Stelling. 2019. “A Simple and Flexible Computational Framework for Inferring Sources of Heterogeneity from Single-Cell Dynamics.” Cell Systems 8 (1): 15–26.e11. https://doi.org/10.1016/j.cels.2018.12.007.
-
+
Fischer, David S., Anna K. Fiedler, Eric Kernfeld, Ryan M. J. Genga, Aimée Bastidas-Ponce, Mostafa Bakhti, Heiko Lickert, Jan Hasenauer, Rene Maehr, and Fabian J. Theis. 2019. “Inferring Population Dynamics @@ -400,22 +405,21 @@ from Single-Cell RNA-Sequencing Time Series Data.” Nature Biotechnology 37: 461–68. https://doi.org/10.1038/s41587-019-0088-0.
-
+
Gregg, Robert W, Saumendra N Sarkar, and Jason E Shoemaker. 2019. “Mathematical Modeling of the cGAS Pathway Reveals Robustness of -DNA Sensing to Trex1 Feedback.” Journal of Theoretical +DNA Sensing to TREX1 Feedback.” Journal of Theoretical Biology 462 (February): 148–57. https://doi.org/10.1016/j.jtbi.2018.11.001.
-
+
Kapfer, Eva-Maria, Paul Stapor, and Jan Hasenauer. 2019. “Challenges in the Calibration of Large-Scale Ordinary Differential Equation Models.” IFAC-PapersOnLine 52 (26): 58–64. https://doi.org/10.1016/j.ifacol.2019.12.236.
-
+
Nousiainen, Kari, Jukka Intosalmi, and Harri Lähdesmäki. 2019. “A Mathematical Model for Enhancer Activation Kinetics During Cell Differentiation.” In Algorithms for Computational @@ -423,50 +427,47 @@ Biology, edited by Ian Holmes, Carlos Martı́n-Vide, and Miguel A. Vega-Rodrı́guez, 191–202. Cham: Springer International Publishing. https://doi.org/10.1007/978-3-030-18174-1_14.
-
+
Pedretscher, B., B. Kaltenbacher, and O. Pfeiler. 2019. “Parameter Identification and Uncertainty Quantification in Stochastic State Space Models and Its Application to Texture Analysis.” Applied Numerical Mathematics 146: 38–54. https://doi.org/10.1016/j.apnum.2019.06.020.
-
+
Pitt, Jake Alan, and Julio R Banga. 2019. “Parameter Estimation in Models of Biological Oscillators: An Automated Regularised Estimation Approach.” BMC Bioinformatics 20 (February): 82. https://doi.org/10.1186/s12859-019-2630-y.
-
+
Schmiester, Leonard, Yannik Schälte, Fabian Fröhlich, Jan Hasenauer, and Daniel Weindl. 2019. Efficient parameterization of large-scale dynamic models based on relative measurements.” Bioinformatics, July. https://doi.org/10.1093/bioinformatics/btz581.
-
+
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.” 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.
-
+
Watanabe, Simon Berglund. 2019. “Identifiability of Parameters in PBPK Models.” Master’s thesis, Chalmers University of Technology / Department of Mathematical Sciences. https://hdl.handle.net/20.500.

2018

-
+role="list"> +
Ballnus, Benjamin, Steffen Schaper, Fabian J Theis, and Jan Hasenauer. 2018. “Bayesian Parameter Estimation for Biochemical Reaction Networks Using Region-Based Adaptive Parallel Tempering.” Bioinformatics 34 (13): i494–501. https://doi.org/10.1093/bioinformatics/bty229.
-
+
Bast, Lisa, Filippo Calzolari, Michael Strasser, Jan Hasenauer, Fabian J. Theis, Jovica Ninkovic, and Carsten Marr. 2018. “Subtle Changes in Clonal Dynamics Underlie the Age-Related Decline in Neurogenesis.” Cell Reports. https://doi.org/10.1016/j.celrep.2018.11.088.
-
+
Fröhlich, Fabian, Thomas Kessler, Daniel Weindl, Alexey Shadrin, Leonard Schmiester, Hendrik Hache, Artur Muradyan, et al. 2018. “Efficient Parameter Estimation Enables the Prediction of Drug Response Using a @@ -498,7 +499,7 @@ Mechanistic Pan-Cancer Pathway Model.” Cell Systems 7 (6): 567–579.e6. https://doi.org/10.1016/j.cels.2018.10.013.
-
+
Fröhlich, Fabian, Anita Reiser, Laura Fink, Daniel Woschée, Thomas Ligon, Fabian Joachim Theis, Joachim Oskar Rädler, and Jan Hasenauer. 2018. “Multi-Experiment Nonlinear Mixed Effect Modeling of @@ -506,50 +507,48 @@ Single-Cell Translation Kinetics After Transfection.” Npj Systems Biology and Applications 5 (1): 1. https://doi.org/10.1038/s41540-018-0079-7.
-
+
Kaltenbacher, Barbara, and Barbara Pedretscher. 2018. “Parameter Estimation in SDEs via the Fokker–Planck Equation: Likelihood Function and Adjoint Based Gradient Computation.” Journal of Mathematical Analysis and Applications 465 (2): 872–84. https://doi.org/10.1016/j.jmaa.2018.05.048.
-
+
Loos, Carolin, Sabrina Krause, and Jan Hasenauer. 2018. “Hierarchical Optimization for the Efficient Parametrization of ODE Models.” Bioinformatics 34 (24): 4266–73. https://doi.org/10.1093/bioinformatics/bty514.
-
+
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.” IFAC-PapersOnLine 51 (19): 72–75. 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.
-
+
Stapor, Paul, Fabian Fröhlich, and Jan Hasenauer. 2018. “Optimization and Profile Calculation of ODE Models Using Second Order Adjoint Sensitivity Analysis.” Bioinformatics 34 (13): i151–59. https://doi.org/10.1093/bioinformatics/bty230.
-
+
Villaverde, Alejandro F, Fabian Fröhlich, Daniel Weindl, Jan Hasenauer, and Julio R Banga. 2018. Benchmarking optimization methods for parameter estimation in large kinetic @@ -559,36 +558,35 @@ href="https://doi.org/10.1093/bioinformatics/bty736">https://doi.org/10.1093/bio

2017

-
+role="list"> +
Ballnus, B., S. Hug, K. Hatz, L. Görlitz, J. Hasenauer, and F. J. Theis. 2017. “Comprehensive Benchmarking of Markov Chain Monte Carlo Methods for Dynamical Systems.” BMC Syst. Biol. 11 (63). https://doi.org/10.1186/s12918-017-0433-1.
-
+
Fröhlich, F., B. Kaltenbacher, F. J. Theis, and J. Hasenauer. 2017. “Scalable Parameter Estimation for Genome-Scale Biochemical Reaction Networks.” PLoS Comput. Biol. 13 (1): e1005331. https://doi.org/10.1371/journal.pcbi.1005331.
-
+
Fröhlich, F., F. J. Theis, J. O. Rädler, and J. Hasenauer. 2017. “Parameter Estimation for Dynamical Systems with Discrete Events and Logical Operations.” Bioinformatics 33 (7): 1049–56. https://doi.org/10.1093/bioinformatics/btw764.
-
+
Kazeroonian, A., F. J. Theis, and J. Hasenauer. 2017. “A Scalable Moment-Closure Approximation for Large-Scale Biochemical Reaction Networks.” Bioinformatics 33 (14): i293–300. https://doi.org/10.1093/bioinformatics/btx249.
-
+
Maier, C., C. Loos, and J. Hasenauer. 2017. “Robust Parameter Estimation for Dynamical Systems from Outlier-Corrupted Data.” Bioinformatics 33 (5): 718–25. https://doi.org/10.1093/bio

2016

-
+role="list"> +
Boiger, R., J. Hasenauer, S. Hross, and B. Kaltenbacher. 2016. “Integration Based Profile Likelihood Calculation for PDE Constrained Parameter Estimation Problems.” Inverse Prob. 32 (12): 125009. https://doi.org/10.1088/0266-5611/32/12/125009.
-
+
Fiedler, A., S. Raeth, F. J. Theis, A. Hausser, and J. Hasenauer. 2016. “Tailored Parameter Optimization Methods for Ordinary Differential Equation Models with Steady-State Constraints.” BMC Syst. Biol. 10 (80). https://doi.org/10.1186/s12918-016-0319-7.
-
+
Fröhlich, F., P. Thomas, A. Kazeroonian, F. J. Theis, R. Grima, and J. Hasenauer. 2016. “Inference for Stochastic Chemical Kinetics Using Moment Equations and System Size Expansion.” PLoS Comput. Biol. 12 (7): e1005030. https://doi.org/10.1371/journal.pcbi.1005030.
-
+
Hross, S., A. Fiedler, F. J. Theis, and J. Hasenauer. 2016. “Quantitative Comparison of Competing PDE Models for Pom1p Dynamics in Fission Yeast.” In Proc. 6th @@ -628,8 +626,7 @@ Findeisen, E. Bullinger, E. Balsa-Canto, and K. Bernaerts, 49:264–69. 26. IFAC-PapersOnLine. https://doi.org/10.1016/j.ifacol.2016.12.136.
-
+
Kazeroonian, A., F. Fröhlich, A. Raue, F. J. Theis, and J. Hasenauer. 2016. CERENA: Chemical REaction Network Analyzer – A Toolbox for the @@ -637,7 +634,7 @@ Simulation and Analysis of Stochastic Chemical Kinetics.” PLoS ONE 11 (1): e0146732. https://doi.org/10.1371/journal.pone.0146732.
-
+
Loos, C., A. Fiedler, and J. Hasenauer. 2016. “Parameter Estimation for Reaction Rate Equation Constrained Mixture Models.” In Proc. 13th Int. Conf. Comp. Meth. Syst. @@ -648,8 +645,8 @@ href="https://doi.org/10.1007/978-3-319-45177-0">https://doi.org/10.1007/978-3-3

2015

-
+role="list"> +
Loos, C., C. Marr, F. J. Theis, and J. Hasenauer. 2015. “Computational Methods in Systems Biology.” In, edited by O. Roux and J. Bourdon, 9308:52–63. Lecture Notes in Computer Science. From 04407553de6dfbe342519ed06e3fae9427a60a2a Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Fri, 23 Feb 2024 18:27:05 +0100 Subject: [PATCH 13/13] Bump version number; update changelog --- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ version.txt | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45edeb8adf..8c1fd68c5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,36 @@ ## v0.X Series +### v0.22.0 (2024-02-23) + +**Features** + +* PEtab import: User option to fail if model needs to be compiled + by @dilpath in https://github.com/AMICI-dev/AMICI/pull/2289 + + The `force_compile` argument is now **deprecated**. Use `compile_` instead. + +* Model import now adds a `.gitignore` file to the model output directory + by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2301 + +**Fixes** + +* **Fixed a bug that may have caused wrong simulation results for certain** + **SBML models that contain `rateOf`-expressions** + by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2291 +* More informative error message for `ReturnDataView.by_id` + by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2295 +* Fixed `ENABLE_AMICI_DEBUGGING=TRUE` not working with MSVC + by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2296 +* Fixed MANIFEST.in warning by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2297 +* (performance) Skip unnecessary toposorting in `DEModel._collect_heaviside_roots` + by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2299 +* (performance) Fix redundant calls to `Model::fdwdx` from `Model_ODE::fJ` + (only relevant for dense and banded solvers) + by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2298 + +**Full Changelog**: https://github.com/AMICI-dev/AMICI/compare/v0.21.2...v0.22.0 + ### v0.21.2 (2024-02-06) * Fixed `Solver` copyctor issues with swig4.2 that resulted in installation diff --git a/version.txt b/version.txt index 59dad104b0..2157409059 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.21.2 +0.22.0