Skip to content

Commit f742e48

Browse files
authored
Merge pull request #2649 from dweindl/release_0.31.0
Release 0.31.0
2 parents 64bbd80 + bc350cf commit f742e48

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1685
-607
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.6.0
5+
rev: v5.0.0
66
hooks:
77
- id: check-added-large-files
88
- id: check-merge-conflict
@@ -12,7 +12,7 @@ repos:
1212
- id: trailing-whitespace
1313
- repo: https://github.com/astral-sh/ruff-pre-commit
1414
# Ruff version.
15-
rev: v0.6.7
15+
rev: v0.8.6
1616
hooks:
1717
# Run the linter.
1818
- id: ruff
@@ -28,7 +28,7 @@ repos:
2828
- python/sdist/pyproject.toml
2929

3030
- repo: https://github.com/asottile/pyupgrade
31-
rev: v3.17.0
31+
rev: v3.19.1
3232
hooks:
3333
- id: pyupgrade
3434
args: ["--py310-plus"]

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,27 @@ See also our [versioning policy](https://amici.readthedocs.io/en/latest/versioni
44

55
## v0.X Series
66

7+
### v0.31.0 (2025-02-18)
8+
9+
* Added `RDataReporting::observables_likelihood` for computing observables,
10+
likelihood and the respective sensitivities
11+
by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2627,
12+
https://github.com/AMICI-dev/AMICI/pull/2633
13+
* JAX:
14+
* Updated diffrax & jaxlib
15+
by @FFroehlich in https://github.com/AMICI-dev/AMICI/pull/2632
16+
* Avoid silent preequilibration failure in JAX
17+
by @FFroehlich in https://github.com/AMICI-dev/AMICI/pull/2631
18+
* jax vectorisation
19+
by @FFroehlich in https://github.com/AMICI-dev/AMICI/pull/2636
20+
* No flattening of timepoint specific overrides in jax
21+
by @FFroehlich in https://github.com/AMICI-dev/AMICI/pull/2641
22+
* Faster PEtab parameter mapping
23+
by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2638,
24+
https://github.com/AMICI-dev/AMICI/pull/2640
25+
26+
**Full Changelog**: https://github.com/AMICI-dev/AMICI/compare/v0.30.1...v0.31.0
27+
728
### v0.30.1 (2025-02-18)
829

930
Bugfix-only release.

documentation/amici_refs.bib

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,17 +1312,6 @@ @Article{MerktAli2024
13121312
publisher = {Springer Science and Business Media LLC},
13131313
}
13141314
1315-
@Misc{LakrisenkoPat2024,
1316-
author = {Polina Lakrisenko and Dilan Pathirana and Daniel Weindl and Jan Hasenauer},
1317-
title = {Exploration of methods for computing sensitivities in ODE models at dynamic and steady states},
1318-
year = {2024},
1319-
archiveprefix = {arXiv},
1320-
creationdate = {2024-05-30T09:48:00},
1321-
eprint = {2405.16524},
1322-
modificationdate = {2024-05-30T09:48:00},
1323-
primaryclass = {q-bio.QM},
1324-
}
1325-
13261315
@PhdThesis{Mutsuddy2024,
13271316
author = {Mutsuddy, Arnab},
13281317
school = {Clemson University},
@@ -1435,6 +1424,38 @@ @Article{ArmisteadHoe2024
14351424
publisher = {Springer Science and Business Media LLC},
14361425
}
14371426
1427+
@Article{LakrisenkoPat2024,
1428+
author = {Lakrisenko, Polina and Pathirana, Dilan and Weindl, Daniel and Hasenauer, Jan},
1429+
journal = {PLOS ONE},
1430+
title = {Benchmarking methods for computing local sensitivities in ordinary differential equation models at dynamic and steady states},
1431+
year = {2024},
1432+
month = {10},
1433+
number = {10},
1434+
pages = {1-19},
1435+
volume = {19},
1436+
abstract = {Estimating parameters of dynamic models from experimental data is a challenging, and often computationally-demanding task. It requires a large number of model simulations and objective function gradient computations, if gradient-based optimization is used. In many cases, steady-state computation is a part of model simulation, either due to steady-state data or an assumption that the system is at steady state at the initial time point. Various methods are available for steady-state and gradient computation. Yet, the most efficient pair of methods (one for steady states, one for gradients) for a particular model is often not clear. In order to facilitate the selection of methods, we explore six method pairs for computing the steady state and sensitivities at steady state using six real-world problems. The method pairs involve numerical integration or Newton’s method to compute the steady-state, and—for both forward and adjoint sensitivity analysis—numerical integration or a tailored method to compute the sensitivities at steady-state. Our evaluation shows that all method pairs provide accurate steady-state and gradient values, and that the two method pairs that combine numerical integration for the steady-state with a tailored method for the sensitivities at steady-state were the most robust, and amongst the most computationally-efficient. We also observed that while Newton’s method for steady-state computation yields a substantial speedup compared to numerical integration, it may lead to a large number of simulation failures. Overall, our study provides a concise overview across current methods for computing sensitivities at steady state. While our study shows that there is no universally-best method pair, it also provides guidance to modelers in choosing the right methods for a problem at hand.},
1437+
creationdate = {2025-01-06T14:49:28},
1438+
doi = {10.1371/journal.pone.0312148},
1439+
modificationdate = {2025-01-06T14:49:48},
1440+
publisher = {Public Library of Science},
1441+
url = {https://doi.org/10.1371/journal.pone.0312148},
1442+
}
1443+
1444+
@Article{SmithMal2025,
1445+
author = {Smith, Lucian and Malik-Sheriff, Rahuman S. and Nguyen, Tung V. N. and Hermjakob, Henning and Karr, Jonathan and Shaikh, Bilal and Drescher, Logan and Moraru, Ion I. and Schaff, James C. and Agmon, Eran and Patrie, Alexander A. and Blinov, Michael L. and Hellerstein, Joseph L. and May, Elebeoba E. and Nickerson, David P. and Gennari, John H. and Sauro, Herbert M.},
1446+
journal = {bioRxiv},
1447+
title = {Using {SED-ML} for reproducible curation: Verifying {BioModels} across multiple simulation engines},
1448+
year = {2025},
1449+
abstract = {The BioModels Repository contains over 1000 manually curated mechanistic models drawn from published literature, most of which are encoded in the Systems Biology Markup Language (SBML). This community-based standard formally specifies each model, but does not describe the computational experimental conditions to run a simulation. Therefore, it can be challenging to reproduce any given figure or result from a publication with an SBML model alone. The Simulation Experiment Description Markup Language (SED-ML) provides a solution: a standard way to specify exactly how to run a specific experiment that corresponds to a specific figure or result. BioModels was established years before SED-ML, and both systems evolved over time, both in content and acceptance. Hence, only about half of the entries in BioModels contained SED-ML files, and these files reflected the version of SED-ML that was available at the time. Additionally, almost all of these SED-ML files had at least one minor mistake that made them invalid. To make these models and their results more reproducible, we report here on our work updating, correcting and providing new SED-ML files for 1055 curated mechanistic models in BioModels. In addition, because SED-ML is implementation-independent, it can be used for verification, demonstrating that results hold across multiple simulation engines. Here, we use a wrapper architecture for interpreting SED-ML, and report verification results across five different ODE-based biosimulation engines. Our work with SED-ML and the BioModels collection aims to improve the utility of these models by making them more reproducible and credible.Author summary Reproducing computationally-derived scientific results seems like it should be straightforward, but is often elusive. Code is lost, file formats change, and knowledge of what was done is only partially recorded and/or forgotten. Model repositories such as BioModels address this failing in the Systems Biology domain by encoding models in a standard format that can reproduce a figure from the paper from which it was drawn. Here, we delved into the BioModels repository to ensure that every curated model additionally contained instructions on what to do with that model, and then tested those instructions on a variety of simulation platforms. Not only did this improve the BioModels repository itself, but also improved the infrastructure necessary to run these validation comparisons in the future.Author contributions LS: Writing, Conceptualization, Data Curation, Investigation, Methodology, Project Administration, Software, Validation. RMS: Reading, Writing, Data Curation, Methodology TN: Reading, Data Curation, Methodology HH: Reading JK: Conceptualization, Data Curation, Investigation, Methodology, Software. BS: Software LD: Software IIM: Reading, Conceptualization, Funding JCS: Software, Methodology EA: Reading, Writing AAP: Software MLB: Reading, Writing JH: Writing, Methodology EM: Reading, Writing DPN: Reading, Writing, Methodology JG: Reading, Writing, Methodology HMS: Reading, Writing, FundingCompeting Interest StatementThe authors have declared no competing interest.},
1450+
creationdate = {2025-01-27T09:08:10},
1451+
doi = {10.1101/2025.01.16.633337},
1452+
elocation-id = {2025.01.16.633337},
1453+
eprint = {https://www.biorxiv.org/content/early/2025/01/20/2025.01.16.633337.full.pdf},
1454+
modificationdate = {2025-01-27T09:08:41},
1455+
publisher = {Cold Spring Harbor Laboratory},
1456+
url = {https://www.biorxiv.org/content/early/2025/01/20/2025.01.16.633337},
1457+
}
1458+
14381459
@Comment{jabref-meta: databaseType:bibtex;}
14391460
14401461
@Comment{jabref-meta: grouping:

documentation/references.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# References
22

3-
List of publications using AMICI. Total number is 94.
3+
List of publications using AMICI. Total number is 95.
44

55
If you applied AMICI in your work and your publication is missing, please let us know via a new
66
[GitHub issue](https://github.com/AMICI-dev/AMICI/issues/new?labels=documentation&title=Add+publication&body=AMICI+was+used+in+this+manuscript:+DOI).
@@ -12,6 +12,18 @@ If you applied AMICI in your work and your publication is missing, please let us
1212
}
1313
</style>
1414

15+
<h1 class="unnumbered" id="section">2025</h1>
16+
<div id="refs" class="references csl-bib-body hanging-indent"
17+
role="list">
18+
<div id="ref-SmithMal2025" class="csl-entry" role="listitem">
19+
Smith, Lucian, Rahuman S. Malik-Sheriff, Tung V. N. Nguyen, Henning
20+
Hermjakob, Jonathan Karr, Bilal Shaikh, Logan Drescher, et al. 2025.
21+
<span>“Using <span>SED-ML</span> for Reproducible Curation: Verifying
22+
<span>BioModels</span> Across Multiple Simulation Engines.”</span>
23+
<em>bioRxiv</em>. <a
24+
href="https://doi.org/10.1101/2025.01.16.633337">https://doi.org/10.1101/2025.01.16.633337</a>.
25+
</div>
26+
</div>
1527
<h1 class="unnumbered" id="section">2024</h1>
1628
<div id="refs" class="references csl-bib-body hanging-indent"
1729
role="list">
@@ -72,9 +84,10 @@ href="https://doi.org/10.1093/nar/gkae123">https://doi.org/10.1093/nar/gkae123</
7284
</div>
7385
<div id="ref-LakrisenkoPat2024" class="csl-entry" role="listitem">
7486
Lakrisenko, Polina, Dilan Pathirana, Daniel Weindl, and Jan Hasenauer.
75-
2024. <span>“Exploration of Methods for Computing Sensitivities in ODE
76-
Models at Dynamic and Steady States.”</span> <a
77-
href="https://arxiv.org/abs/2405.16524">https://arxiv.org/abs/2405.16524</a>.
87+
2024. <span>“Benchmarking Methods for Computing Local Sensitivities in
88+
Ordinary Differential Equation Models at Dynamic and Steady
89+
States.”</span> <em>PLOS ONE</em> 19 (10): 1–19. <a
90+
href="https://doi.org/10.1371/journal.pone.0312148">https://doi.org/10.1371/journal.pone.0312148</a>.
7891
</div>
7992
<div id="ref-LangPen2024" class="csl-entry" role="listitem">
8093
Lang, Paul F., David R. Penas, Julio R. Banga, Daniel Weindl, and Bela

documentation/rtd_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ setuptools>=67.7.2
55
pysb>=1.11.0
66
jax>=0.4.26
77
diffrax>=0.5.0
8+
interpax>=0.3.4
89
matplotlib==3.7.1
910
nbsphinx==0.9.1
1011
nbformat==5.8.0

include/amici/defines.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ enum class RDataReporting {
244244
full,
245245
residuals,
246246
likelihood,
247+
observables_likelihood,
247248
};
248249

249250
/** boundary conditions for splines */

include/amici/rdata.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,13 @@ class ReturnData : public ModelDimensions {
476476
*/
477477
void initializeLikelihoodReporting(bool quadratic_llh);
478478

479+
/**
480+
* @brief initializes storage for observables + likelihood reporting mode
481+
* @param quadratic_llh whether model defines a quadratic nllh and computing
482+
* res, sres and FIM makes sense.
483+
*/
484+
void initializeObservablesLikelihoodReporting(bool quadratic_llh);
485+
479486
/**
480487
* @brief initializes storage for residual reporting mode
481488
* @param enable_res whether residuals are to be computed

pytest.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,8 @@ filterwarnings =
2424
ignore:.*PyDevIPCompleter6.*:DeprecationWarning
2525
# ignore numpy log(0) warnings (np.log(0) = -inf)
2626
ignore:divide by zero encountered in log:RuntimeWarning
27+
# ignore jax deprecation warnings
28+
ignore:jax.* is deprecated:DeprecationWarning
29+
2730

2831
norecursedirs = .git amici_models build doc documentation matlab models ThirdParty amici sdist examples

python/examples/example_constant_species/ExampleEquilibrationLogic.ipynb

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,7 @@
124124
"for reaction in sbml_model.getListOfReactions():\n",
125125
" reactants = \" + \".join(\n",
126126
" [\n",
127-
" \"%s %s\"\n",
128-
" % (\n",
127+
" \"{} {}\".format(\n",
129128
" int(r.getStoichiometry()) if r.getStoichiometry() > 1 else \"\",\n",
130129
" r.getSpecies(),\n",
131130
" )\n",
@@ -134,8 +133,7 @@
134133
" )\n",
135134
" products = \" + \".join(\n",
136135
" [\n",
137-
" \"%s %s\"\n",
138-
" % (\n",
136+
" \"{} {}\".format(\n",
139137
" int(r.getStoichiometry()) if r.getStoichiometry() > 1 else \"\",\n",
140138
" r.getSpecies(),\n",
141139
" )\n",
@@ -144,7 +142,7 @@
144142
" )\n",
145143
" reversible = \"<\" if reaction.getReversible() else \"\"\n",
146144
" print(\n",
147-
" \"%3s: %10s %1s->%10s\\t\\t[%s]\"\n",
145+
" \"%3s: %10s %1s->%10s\\t\\t[%s]\" # noqa: UP031\n",
148146
" % (\n",
149147
" reaction.getId(),\n",
150148
" reactants,\n",
@@ -370,7 +368,7 @@
370368
"\n",
371369
"# np.set_printoptions(threshold=8, edgeitems=2)\n",
372370
"for key, value in rdata.items():\n",
373-
" print(\"%12s: \" % key, value)"
371+
" print(f\"{key:12s}: \", value)"
374372
]
375373
},
376374
{
@@ -664,15 +662,15 @@
664662
"Since the Eigenvalues of the Jacobian are negative and since the Jacobian at steady state is a fixed matrix, this system has a simple algebraic solution:\n",
665663
"\n",
666664
" $$p(t) = e^{t J(x^*, \\theta)^T} p_{\\text{end}}.$$\n",
667-
" \n",
665+
"\n",
668666
"As a consequence, the quadratures in adjoint computation also reduce to a matrix-vector product:\n",
669667
"\n",
670668
" $$Q(x, \\theta) = Q(x^*, \\theta) = p_{\\text{integral}} * \\frac{\\partial f}{\\partial \\theta}$$\n",
671669
"\n",
672670
"with\n",
673671
"\n",
674-
" $$p_{\\text{integral}} = \\int_0^\\infty p(s) ds = (J(x^*, \\theta)^T)^{-1} p_{\\text{end}}.$$ \n",
675-
" \n",
672+
" $$p_{\\text{integral}} = \\int_0^\\infty p(s) ds = (J(x^*, \\theta)^T)^{-1} p_{\\text{end}}.$$\n",
673+
"\n",
676674
"However, this solution is given in terms of a linear system of equations defined by the transposed Jacobian of the right hand side. Hence, if the (transposed) Jacobian is singular, it is not applicable.\n",
677675
"In this case, standard integration must be carried out."
678676
]
@@ -922,7 +920,7 @@
922920
"\n",
923921
"for key, value in rdata.items():\n",
924922
" if key[0:6] == \"preeq_\":\n",
925-
" print(\"%20s: \" % key, value)"
923+
" print(f\"{key:20s}:\", value)"
926924
]
927925
},
928926
{
@@ -960,7 +958,7 @@
960958
"\n",
961959
"for key, value in rdata.items():\n",
962960
" if key[0:6] == \"preeq_\":\n",
963-
" print(\"%20s: \" % key, value)"
961+
" print(f\"{key:20s}:\", value)"
964962
]
965963
},
966964
{
@@ -993,7 +991,7 @@
993991
"\n",
994992
"for key, value in rdata_reduced.items():\n",
995993
" if key[0:6] == \"preeq_\":\n",
996-
" print(\"%20s: \" % key, value)"
994+
" print(f\"{key:20s}:\", value)"
997995
]
998996
},
999997
{
@@ -1044,7 +1042,7 @@
10441042
"\n",
10451043
"for key, value in rdata_reduced.items():\n",
10461044
" if key[0:6] == \"preeq_\":\n",
1047-
" print(\"%20s: \" % key, value)\n",
1045+
" print(f\"{key:20s}:\", value)\n",
10481046
"print(\"Gradient:\", rdata_reduced[\"sllh\"])"
10491047
]
10501048
},
@@ -1079,7 +1077,7 @@
10791077
"\n",
10801078
"for key, value in rdata_reduced.items():\n",
10811079
" if key[0:6] == \"preeq_\":\n",
1082-
" print(\"%20s: \" % key, value)\n",
1080+
" print(f\"{key:20s}:\", value)\n",
10831081
"print(\"Gradient:\", rdata_reduced[\"sllh\"])"
10841082
]
10851083
},
@@ -1117,7 +1115,7 @@
11171115
"\n",
11181116
"for key, value in rdata_reduced.items():\n",
11191117
" if key[0:6] == \"preeq_\":\n",
1120-
" print(\"%20s: \" % key, value)\n",
1118+
" print(f\"{key:20s}:\", value)\n",
11211119
"print(\"Gradient:\", rdata_reduced[\"sllh\"])"
11221120
]
11231121
},
@@ -1160,7 +1158,7 @@
11601158
"\n",
11611159
"for key, value in rdata.items():\n",
11621160
" if key[0:6] == \"preeq_\":\n",
1163-
" print(\"%20s: \" % key, value)\n",
1161+
" print(f\"{key:20s}:\", value)\n",
11641162
"print(\"Gradient:\", rdata[\"sllh\"])"
11651163
]
11661164
},

python/examples/example_errors.ipynb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@
7676
"outputs": [],
7777
"source": [
7878
"petab_problem = benchmark_models_petab.get_problem(\"Fujita_SciSignal2010\")\n",
79-
"amici_model = import_petab_problem(\n",
80-
" petab_problem, verbose=False, compile_=None\n",
81-
")\n",
79+
"amici_model = import_petab_problem(petab_problem, verbose=False, compile_=None)\n",
8280
"\n",
8381
"np.random.seed(2991)\n",
8482
"problem_parameters = dict(\n",
@@ -422,9 +420,7 @@
422420
"outputs": [],
423421
"source": [
424422
"petab_problem = benchmark_models_petab.get_problem(\"Weber_BMC2015\")\n",
425-
"amici_model = import_petab_problem(\n",
426-
" petab_problem, verbose=False, compile_=None\n",
427-
")\n",
423+
"amici_model = import_petab_problem(petab_problem, verbose=False, compile_=None)\n",
428424
"\n",
429425
"np.random.seed(4)\n",
430426
"problem_parameters = dict(\n",

0 commit comments

Comments
 (0)