Skip to content

Commit 29b7ee8

Browse files
authored
Merge pull request #2406 from AMICI-dev/release_0.24.0
Release 0.24.0
2 parents 4d40911 + ca9d467 commit 29b7ee8

29 files changed

+442
-88
lines changed

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,48 @@
22

33
## v0.X Series
44

5+
### v0.24.0 (2024-04-22)
6+
7+
This will be the last release supporting Python 3.9.
8+
Future releases will require Python 3.10.
9+
10+
**Fixes**
11+
12+
* Fix cmake error `cannot create directory: /cmake/Amici`
13+
during model import in cases where BLAS was not found via `FindBLAS`
14+
by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2389
15+
* Added status code `AMICI_CONSTR_FAIL`
16+
by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2379
17+
* Fixed certain initial state issues with PEtab
18+
by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2382
19+
* Fixed Solver `operator==` and copyctor
20+
(constraints were not copied correctly)
21+
by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2388
22+
* Avoid confusing warnings about non-finite timepoints
23+
by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2395
24+
* Fixed incorrect exception types / messages for `IDASolver`
25+
by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2398
26+
* cmake: set SUNDIALS path hint for python package to help CMake find
27+
the correct SUNDIALS installation
28+
by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2397
29+
30+
* **Features**
31+
32+
* Optionally include measurements in `plot_observable_trajectories`
33+
by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2381
34+
* Improved type annotations in swig-wrappers
35+
by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2401
36+
* Additional attributes are accessible directly via `ReturnDataView` and
37+
`ExpDataView`, e.g. `ReturnDataView.ny`, `ReturnDataView.nx`
38+
by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2405
39+
* Allow subselection of state variables for convergence check during
40+
steady-state simulations via `Model.set_steadystate_mask([1, 0, ..., 1])`
41+
(positive value: check; non-positive: don't check).
42+
by @dweindl in https://github.com/AMICI-dev/AMICI/pull/2387
43+
44+
**Full Changelog**: https://github.com/AMICI-dev/AMICI/compare/v0.23.1...v0.24.0
45+
46+
547
### v0.23.1 (2024-03-11)
648

749
* Fixes installation issues related to building SuiteSparse on some systems

CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,16 @@ elseif(AMICI_TRY_ENABLE_HDF5)
133133
endif()
134134

135135
set(VENDORED_SUNDIALS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ThirdParty/sundials)
136-
set(VENDORED_SUNDIALS_BUILD_DIR ${VENDORED_SUNDIALS_DIR}/build)
137-
set(VENDORED_SUNDIALS_INSTALL_DIR ${VENDORED_SUNDIALS_BUILD_DIR})
138136
set(SUNDIALS_PRIVATE_INCLUDE_DIRS "${VENDORED_SUNDIALS_DIR}/src")
137+
# Handle different sundials build/install dirs, depending on whether we are
138+
# building the Python extension only or the full C++ interface
139+
if(AMICI_PYTHON_BUILD_EXT_ONLY)
140+
set(VENDORED_SUNDIALS_BUILD_DIR ${CMAKE_CURRENT_SOURCE_DIR})
141+
set(VENDORED_SUNDIALS_INSTALL_DIR ${VENDORED_SUNDIALS_BUILD_DIR})
142+
else()
143+
set(VENDORED_SUNDIALS_BUILD_DIR ${VENDORED_SUNDIALS_DIR}/build)
144+
set(VENDORED_SUNDIALS_INSTALL_DIR ${VENDORED_SUNDIALS_BUILD_DIR})
145+
endif()
139146
find_package(
140147
SUNDIALS REQUIRED PATHS
141148
"${VENDORED_SUNDIALS_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/sundials/")

cmake/AmiciFindBLAS.cmake

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,14 @@ if(NOT TARGET BLAS::BLAS)
8383
INTERFACE_INCLUDE_DIRECTORIES "${BLAS_INCLUDE_DIRS}"
8484
INTERFACE_LINK_LIBRARIES "${BLAS_LIBRARIES}")
8585
add_library(BLAS::BLAS ALIAS BLAS)
86-
install(TARGETS BLAS EXPORT BLAS)
87-
export(EXPORT BLAS NAMESPACE BLAS::)
88-
install(
89-
EXPORT BLAS
90-
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Amici"
91-
NAMESPACE BLAS::)
92-
86+
if("${PROJECT_NAME}" STREQUAL "amici")
87+
install(TARGETS BLAS EXPORT BLAS)
88+
export(EXPORT BLAS NAMESPACE BLAS::)
89+
install(
90+
EXPORT BLAS
91+
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Amici"
92+
NAMESPACE BLAS::)
93+
endif()
9394

9495
# legacy python package environment variables:
9596
if(DEFINED ENV{BLAS_CFLAGS})

documentation/amici_refs.bib

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,6 +1275,37 @@ @Article{SluijsZho2024
12751275
publisher = {Springer Science and Business Media LLC},
12761276
}
12771277
1278+
@Article{KissVen2024,
1279+
author = {Kiss, Anna E and Venkatasubramani, Anuroop V and Pathirana, Dilan and Krause, Silke and Sparr, Aline Campos and Hasenauer, Jan and Imhof, Axel and Müller, Marisa and Becker, Peter B},
1280+
journal = {Nucleic Acids Research},
1281+
title = {{Processivity and specificity of histone acetylation by the male-specific lethal complex}},
1282+
year = {2024},
1283+
issn = {0305-1048},
1284+
month = {02},
1285+
pages = {gkae123},
1286+
abstract = {{Acetylation of lysine 16 of histone H4 (H4K16ac) stands out among the histone modifications, because it decompacts the chromatin fiber. The metazoan acetyltransferase MOF (KAT8) regulates transcription through H4K16 acetylation. Antibody-based studies had yielded inconclusive results about the selectivity of MOF to acetylate the H4 N-terminus. We used targeted mass spectrometry to examine the activity of MOF in the male-specific lethal core (4-MSL) complex on nucleosome array substrates. This complex is part of the Dosage Compensation Complex (DCC) that activates X-chromosomal genes in male Drosophila. During short reaction times, MOF acetylated H4K16 efficiently and with excellent selectivity. Upon longer incubation, the enzyme progressively acetylated lysines 12, 8 and 5, leading to a mixture of oligo-acetylated H4. Mathematical modeling suggests that MOF recognizes and acetylates H4K16 with high selectivity, but remains substrate-bound and continues to acetylate more N-terminal H4 lysines in a processive manner. The 4-MSL complex lacks non-coding roX RNA, a critical component of the DCC. Remarkably, addition of RNA to the reaction non-specifically suppressed H4 oligo-acetylation in favor of specific H4K16 acetylation. Because RNA destabilizes the MSL-nucleosome interaction in vitro we speculate that RNA accelerates enzyme-substrate turn-over in vivo, thus limiting the processivity of MOF, thereby increasing specific H4K16 acetylation.}},
1287+
creationdate = {2024-02-28T18:25:06},
1288+
doi = {10.1093/nar/gkae123},
1289+
eprint = {https://academic.oup.com/nar/advance-article-pdf/doi/10.1093/nar/gkae123/56756494/gkae123.pdf},
1290+
modificationdate = {2024-02-28T18:25:06},
1291+
url = {https://doi.org/10.1093/nar/gkae123},
1292+
}
1293+
1294+
@Article{DoresicGre2024,
1295+
author = {Domagoj Dore{\v s}i{\'c} and Stephan Grein and Jan Hasenauer},
1296+
journal = {bioRxiv},
1297+
title = {Efficient parameter estimation for ODE models of cellular processes using semi-quantitative data},
1298+
year = {2024},
1299+
abstract = {Quantitative dynamical models facilitate the understanding of biological processes and the prediction of their dynamics. The parameters of these models are commonly estimated from experimental data. Yet, experimental data generated from different techniques do not provide direct information about the state of the system but a non-linear (monotonic) transformation of it. For such semi-quantitative data, when this transformation is unknown, it is not apparent how the model simulations and the experimental data can be compared. Here, we propose a versatile spline-based approach for the integration of a broad spectrum of semi-quantitative data into parameter estimation. We derive analytical formulas for the gradients of the hierarchical objective function and show that this substantially increases the estimation efficiency. Subsequently, we demonstrate that the method allows for the reliable discovery of unknown measurement transformations. Furthermore, we show that this approach can significantly improve the parameter inference based on semi-quantitative data in comparison to available methods. Modelers can easily apply our method by using our implementation in the open-source Python Parameter EStimation TOolbox (pyPESTO).Competing Interest StatementThe authors have declared no competing interest.},
1300+
creationdate = {2024-04-20T13:05:06},
1301+
doi = {10.1101/2024.01.26.577371},
1302+
elocation-id = {2024.01.26.577371},
1303+
eprint = {https://www.biorxiv.org/content/early/2024/01/30/2024.01.26.577371.full.pdf},
1304+
modificationdate = {2024-04-20T13:05:06},
1305+
publisher = {Cold Spring Harbor Laboratory},
1306+
url = {https://www.biorxiv.org/content/early/2024/01/30/2024.01.26.577371},
1307+
}
1308+
12781309
@Comment{jabref-meta: databaseType:bibtex;}
12791310
12801311
@Comment{jabref-meta: grouping:

documentation/conf.py

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,33 @@
99
import subprocess
1010
import sys
1111
from enum import EnumType
12-
13-
# need to import before setting typing.TYPE_CHECKING=True, fails otherwise
14-
import amici
1512
import exhale.deploy
16-
import exhale_multiproject_monkeypatch
1713
from unittest import mock
18-
import pandas as pd
1914
import sphinx
20-
import sympy as sp
2115
from exhale import configs as exhale_configs
2216
from sphinx.transforms.post_transforms import ReferencesResolver
2317

24-
exhale_multiproject_monkeypatch, pd, sp # to avoid removal of unused import
18+
try:
19+
import exhale_multiproject_monkeypatch # noqa: F401
20+
except ModuleNotFoundError:
21+
# for unclear reasons, the import of exhale_multiproject_monkeypatch
22+
# fails on some systems, because the the location of the editable install
23+
# is not automatically added to sys.path ¯\_(ツ)_/¯
24+
from importlib.metadata import Distribution
25+
import json
26+
from urllib.parse import unquote_plus, urlparse
27+
28+
dist = Distribution.from_name("sphinx-contrib-exhale-multiproject")
29+
url = json.loads(dist.read_text("direct_url.json"))["url"]
30+
package_dir = unquote_plus(urlparse(url).path)
31+
sys.path.append(package_dir)
32+
import exhale_multiproject_monkeypatch # noqa: F401
33+
34+
# need to import before setting typing.TYPE_CHECKING=True, fails otherwise
35+
import amici
36+
import pandas as pd # noqa: F401
37+
import sympy as sp # noqa: F401
38+
2539

2640
# BEGIN Monkeypatch exhale
2741
from exhale.deploy import _generate_doxygen as exhale_generate_doxygen

documentation/references.md

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

3-
List of publications using AMICI. Total number is 83.
3+
List of publications using AMICI. Total number is 85.
44

55
If you applied AMICI in your work and your publication is missing, please let us know via a new GitHub issue.
66

@@ -14,6 +14,21 @@ If you applied AMICI in your work and your publication is missing, please let us
1414
<h1 class="unnumbered" id="section">2024</h1>
1515
<div id="refs" class="references csl-bib-body hanging-indent"
1616
role="list">
17+
<div id="ref-DoresicGre2024" class="csl-entry" role="listitem">
18+
Dorešić, Domagoj, Stephan Grein, and Jan Hasenauer. 2024.
19+
<span>“Efficient Parameter Estimation for ODE Models of Cellular
20+
Processes Using Semi-Quantitative Data.”</span> <em>bioRxiv</em>. <a
21+
href="https://doi.org/10.1101/2024.01.26.577371">https://doi.org/10.1101/2024.01.26.577371</a>.
22+
</div>
23+
<div id="ref-KissVen2024" class="csl-entry" role="listitem">
24+
Kiss, Anna E, Anuroop V Venkatasubramani, Dilan Pathirana, Silke Krause,
25+
Aline Campos Sparr, Jan Hasenauer, Axel Imhof, Marisa Müller, and Peter
26+
B Becker. 2024. <span>“<span class="nocase">Processivity and specificity
27+
of histone acetylation by the male-specific lethal
28+
complex</span>.”</span> <em>Nucleic Acids Research</em>, February,
29+
gkae123. <a
30+
href="https://doi.org/10.1093/nar/gkae123">https://doi.org/10.1093/nar/gkae123</a>.
31+
</div>
1732
<div id="ref-LangPen2024" class="csl-entry" role="listitem">
1833
Lang, Paul F., David R. Penas, Julio R. Banga, Daniel Weindl, and Bela
1934
Novak. 2024. <span>“Reusable Rule-Based Cell Cycle Model Explains

include/amici/defines.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ constexpr int AMICI_CONV_FAILURE= -4;
7171
constexpr int AMICI_LSETUP_FAIL= -6;
7272
constexpr int AMICI_RHSFUNC_FAIL= -8;
7373
constexpr int AMICI_FIRST_RHSFUNC_ERR= -9;
74+
constexpr int AMICI_CONSTR_FAIL= -15;
7475
constexpr int AMICI_ILL_INPUT= -22;
7576
constexpr int AMICI_ERROR= -99;
7677
constexpr int AMICI_NO_STEADY_STATE= -81;

include/amici/model.h

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,6 +1481,40 @@ class Model : public AbstractModel, public ModelDimensions {
14811481
*/
14821482
virtual std::vector<double> get_trigger_timepoints() const;
14831483

1484+
/**
1485+
* @brief Get steady-state mask as std::vector.
1486+
*
1487+
* See `set_steadystate_mask` for details.
1488+
*
1489+
* @return Steady-state mask
1490+
*/
1491+
std::vector<double> get_steadystate_mask() const {
1492+
return steadystate_mask_.getVector();
1493+
};
1494+
1495+
/**
1496+
* @brief Get steady-state mask as AmiVector.
1497+
*
1498+
* See `set_steadystate_mask` for details.
1499+
* @return Steady-state mask
1500+
*/
1501+
AmiVector const& get_steadystate_mask_av() const {
1502+
return steadystate_mask_;
1503+
};
1504+
1505+
/**
1506+
* @brief Set steady-state mask.
1507+
*
1508+
* The mask is used to exclude certain state variables from the steady-state
1509+
* convergence check. Positive values indicate that the corresponding state
1510+
* variable should be included in the convergence check, while non-positive
1511+
* values indicate that the corresponding state variable should be excluded.
1512+
* An empty mask is interpreted as including all state variables.
1513+
*
1514+
* @param mask Mask of length `nx_solver`.
1515+
*/
1516+
void set_steadystate_mask(std::vector<double> const& mask);
1517+
14841518
/**
14851519
* Flag indicating whether for
14861520
* `amici::Solver::sensi_` == `amici::SensitivityOrder::second`
@@ -2087,6 +2121,15 @@ class Model : public AbstractModel, public ModelDimensions {
20872121

20882122
/** Simulation parameters, initial state, etc. */
20892123
SimulationParameters simulation_parameters_;
2124+
2125+
/**
2126+
* Mask for state variables that should be checked for steady state
2127+
* during pre-/post-equilibration. Positive values indicate that the
2128+
* corresponding state variable should be checked for steady state.
2129+
* Negative values indicate that the corresponding state variable should
2130+
* be ignored.
2131+
*/
2132+
AmiVector steadystate_mask_;
20902133
};
20912134

20922135
bool operator==(Model const& a, Model const& b);

include/amici/serialization.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ void serialize(Archive& ar, amici::Model& m, unsigned int const /*version*/) {
150150
ar & m.steadystate_computation_mode_;
151151
ar & m.steadystate_sensitivity_mode_;
152152
ar & m.state_independent_events_;
153+
ar & m.steadystate_mask_;
153154
}
154155

155156
/**

include/amici/steadystateproblem.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,14 +246,16 @@ class SteadystateProblem {
246246
* w_i = 1 / ( rtol * x_i + atol )
247247
* @param x current state (sx[ip] for sensitivities)
248248
* @param xdot current rhs (sxdot[ip] for sensitivities)
249+
* @param mask mask for state variables to include in WRMS norm.
250+
* Positive value: include; non-positive value: exclude; empty: include all.
249251
* @param atol absolute tolerance
250252
* @param rtol relative tolerance
251253
* @param ewt error weight vector
252254
* @return root-mean-square norm
253255
*/
254256
realtype getWrmsNorm(
255-
AmiVector const& x, AmiVector const& xdot, realtype atol, realtype rtol,
256-
AmiVector& ewt
257+
AmiVector const& x, AmiVector const& xdot, AmiVector const& mask,
258+
realtype atol, realtype rtol, AmiVector& ewt
257259
) const;
258260

259261
/**

0 commit comments

Comments
 (0)