Skip to content

Commit

Permalink
Release 0.11.25
Browse files Browse the repository at this point in the history
Merge pull request #1668 from AMICI-dev/release_0.11.25
  • Loading branch information
dweindl authored Feb 9, 2022
2 parents d142fb7 + e87bf7c commit 067826d
Show file tree
Hide file tree
Showing 55 changed files with 487 additions and 336 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test_python_cplusplus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- run: echo "BNGPATH=${GITHUB_WORKSPACE}/ThirdParty/BioNetGen-2.7.0" >> $GITHUB_ENV

# sonar cloud
- run: echo "SONAR_SCANNER_VERSION=4.6.1.2450" >> $GITHUB_ENV
- run: echo "SONAR_SCANNER_VERSION=4.6.2.2472" >> $GITHUB_ENV
- run: echo "SONAR_SCANNER_HOME=${HOME}/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux" >> $GITHUB_ENV
- run: echo "SONAR_SCANNER_OPTS=-server" >> $GITHUB_ENV
- run: echo "${SONAR_SCANNER_HOME}/bin" >> $GITHUB_PATH
Expand All @@ -38,7 +38,7 @@ jobs:
# TODO: add to ci image
- name: Install sonarcloud tools
run: |
sudo apt install nodejs curl unzip \
sudo apt-get install nodejs curl unzip \
&& curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip \
https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip \
&& unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ \
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@

## v0.X Series

### v0.11.25 (2022-02-09)

* Fixed a bug
where `Model::setStateIsNonNegative(Model::getStateIsNonNegative())` would
raise an exception in case conservation laws were enabled - by @dweindl
in https://github.com/AMICI-dev/AMICI/pull/1648
* Fixed a bug where `Model::setStateIsNonNegative` would be ignored in certain
model expressions - by @FFroehlich
in https://github.com/AMICI-dev/AMICI/pull/1650
* Fixed a bug where special function parsing inside `min()` and `max()` would
not be parsed correctly - by @dweindl
in https://github.com/AMICI-dev/AMICI/pull/1655
* Fixed a numpy dependency issues for Mac+ARM systems - by @dweindl
in https://github.com/AMICI-dev/AMICI/pull/1657
* Fixed convergence check in Newton method - by @plakrisenko
in https://github.com/AMICI-dev/AMICI/pull/1663
* Add `AMICI_CXX_OPTIONS` to pass libamici-specific compiler options during
CMake-based builds - by @dweindl
in https://github.com/AMICI-dev/AMICI/pull/1664
* Fixed various warnings and updated documentation - by @dweindl

**Full Changelog**:
https://github.com/AMICI-dev/AMICI/compare/v0.11.24...v0.11.25

### v0.11.24 (2022-02-01)

Features:
Expand Down
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
#
cmake_minimum_required(VERSION 3.3)

if(POLICY CMP0065)
cmake_policy(SET CMP0065 NEW)
endif(POLICY CMP0065)
if(POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
endif(POLICY CMP0077)
Expand All @@ -26,7 +23,6 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
endif()
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(ENABLE_SWIG ON)

# Compiler flags
include(CheckCXXCompilerFlag)
Expand Down Expand Up @@ -180,6 +176,8 @@ if(ENABLE_HDF5)
endif()

add_library(${PROJECT_NAME} ${AMICI_SRC_LIST})
set(AMICI_CXX_OPTIONS "" CACHE STRING "C++ options for libamici (semicolon-separated)")
target_compile_options(${PROJECT_NAME} PRIVATE "${AMICI_CXX_OPTIONS}")
add_dependencies(${PROJECT_NAME} version)
file(GLOB PUBLIC_HEADERS include/amici/*.h)
set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}")
Expand Down
2 changes: 1 addition & 1 deletion cmake/version.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
find_package(Git)
if(Git_FOUND)
execute_process(COMMAND sh -c "${GIT_EXECUTABLE} describe --abbrev=4 --dirty=-dirty --always --tags | cut -c 2- | tr -d '\n' | sed --regexp-extended s/-/./"
execute_process(COMMAND sh -c "${GIT_EXECUTABLE} describe --abbrev=4 --dirty=-dirty --always --tags | cut -c 2- | tr -d '\n' | sed s/-/./"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE PROJECT_VERSION_GIT
)
Expand Down
16 changes: 8 additions & 8 deletions documentation/amici_refs.bib
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ @Article{GerosaChi2020
issn = {2405-4712},
abstract = {Summary
Targeted inhibition of oncogenic pathways can be highly effective in halting the rapid growth of tumors but often leads to the emergence of slowly dividing persister cells, which constitute a reservoir for the selection of drug-resistant clones. In BRAFV600E melanomas, RAF and MEK inhibitors efficiently block oncogenic signaling, but persister cells emerge. Here, we show that persister cells escape drug-induced cell-cycle arrest via brief, sporadic ERK pulses generated by transmembrane receptors and growth factors operating in an autocrine/paracrine manner. Quantitative proteomics and computational modeling show that ERK pulsing is enabled by rewiring of mitogen-activated protein kinase (MAPK) signaling: from an oncogenic BRAFV600E monomer-driven configuration that is drug sensitive to a receptor-driven configuration that involves Ras-GTP and RAF dimers and is highly resistant to RAF and MEK inhibitors. Altogether, this work shows that pulsatile MAPK activation by factors in the microenvironment generates a persistent population of melanoma cells that rewires MAPK signaling to sustain non-genetic drug resistance.},
doi = {https://doi.org/10.1016/j.cels.2020.10.002},
doi = {10.1016/j.cels.2020.10.002},
keywords = {systems pharmacology, targeted therapy, non-genetic drug resistance, signaling plasticity, cancer persistence, BRAF melanoma, MAPK pathway, kinetic modeling, kinase inhibitors},
timestamp = {2020-11-09},
url = {http://www.sciencedirect.com/science/article/pii/S2405471220303707},
Expand All @@ -602,7 +602,7 @@ @Article{StenEli2020
pages = {116827},
volume = {215},
abstract = {The neurovascular coupling (NVC) connects neuronal activity to hemodynamic responses in the brain. This connection is the basis for the interpretation of functional magnetic resonance imaging data. Despite the central role of this coupling, we lack detailed knowledge about cell-specific contributions and our knowledge about NVC is mainly based on animal experiments performed during anesthesia. Anesthetics are known to affect neuronal excitability, but how this affects the vessel diameters is not known. Due to the high complexity of NVC data, mathematical modeling is needed for a meaningful analysis. However, neither the relevant neuronal subtypes nor the effects of anesthetics are covered by current models. Here, we present a mathematical model including GABAergic interneurons and pyramidal neurons, as well as the effect of an anesthetic agent. The model is consistent with data from optogenetic experiments from both awake and anesthetized animals, and it correctly predicts data from experiments with different pharmacological modulators. The analysis suggests that no downstream anesthetic effects are necessary if one of the GABAergic interneuron signaling pathways include a Michaelis-Menten expression. This is the first example of a quantitative model that includes both the cell-specific contributions and the effect of an anesthetic agent on the NVC.},
doi = {https://doi.org/10.1016/j.neuroimage.2020.116827},
doi = {10.1016/j.neuroimage.2020.116827},
keywords = {Functional hyperemia, Mathematical modeling, Cerebral hemodynamics, Systems biology, Functional magnetic resonance imaging (fMRI), Blood oxygen level dependent (BOLD) response},
timestamp = {2020-11-09},
url = {http://www.sciencedirect.com/science/article/pii/S1053811920303141},
Expand Down Expand Up @@ -665,7 +665,7 @@ @Article{PittGom2018
pages = {72 - 75},
volume = {51},
abstract = {Many biological systems exhibit oscillations in relation to key physiological or cellular functions, such as circadian rhythms, mitosis and DNA synthesis. Mathematical modelling provides a powerful approach to analysing these biosystems. Applying parameter estimation methods to calibrate these models can prove a very challenging task in practice, due to the presence of local solutions, lack of identifiability, and risk of overfitting. This paper presents a comparison of three state-of-the-art methods: frequentist, Bayesian and set-membership estimation. We use the Fitzhugh-Nagumo model with synthetic data as a case study. The computational performance and robustness of these methods is discussed, with a particular focus on their predictive capability using cross-validation.},
doi = {https://doi.org/10.1016/j.ifacol.2018.09.040},
doi = {10.1016/j.ifacol.2018.09.040},
keywords = {biological oscillators, model calibration, regularisation, overfitting, identifiability, frequentist estimation, Bayesian estimation, set-membership estimation},
timestamp = {2020-11-09},
url = {http://www.sciencedirect.com/science/article/pii/S2405896318316999},
Expand Down Expand Up @@ -734,7 +734,7 @@ @Article{RaimundezDud2021
pages = {100439},
volume = {34},
abstract = {Epidemiological models are widely used to analyze the spread of diseases such as the global COVID-19 pandemic caused by SARS-CoV-2. However, all models are based on simplifying assumptions and often on sparse data. This limits the reliability of parameter estimates and predictions. In this manuscript, we demonstrate the relevance of these limitations and the pitfalls associated with the use of overly simplistic models. We considered the data for the early phase of the COVID-19 outbreak in Wuhan, China, as an example, and perform parameter estimation, uncertainty analysis and model selection for a range of established epidemiological models. Amongst others, we employ Markov chain Monte Carlo sampling, parameter and prediction profile calculation algorithms. Our results show that parameter estimates and predictions obtained for several established models on the basis of reported case numbers can be subject to substantial uncertainty. More importantly, estimates were often unrealistic and the confidence/credibility intervals did not cover plausible values of critical parameters obtained using different approaches. These findings suggest, amongst others, that standard compartmental models can be overly simplistic and that the reported case numbers provide often insufficient information for obtaining reliable and realistic parameter values, and for forecasting the evolution of epidemics.},
doi = {https://doi.org/10.1016/j.epidem.2021.100439},
doi = {10.1016/j.epidem.2021.100439},
keywords = {Compartment model, SEIRD, Parameter estimation, Model selection, Uncertainty analysis},
timestamp = {2021-02-19},
url = {https://www.sciencedirect.com/science/article/pii/S1755436521000037},
Expand All @@ -749,7 +749,7 @@ @Article{vanRosmalenSmi2021
pages = {74-84},
volume = {64},
abstract = {Constraint-based, genome-scale metabolic models are an essential tool to guide metabolic engineering. However, they lack the detail and time dimension that kinetic models with enzyme dynamics offer. Model reduction can be used to bridge the gap between the two methods and allow for the integration of kinetic models into the Design-Built-Test-Learn cycle. Here we show that these reduced size models can be representative of the dynamics of the original model and demonstrate the automated generation and parameterisation of such models. Using these minimal models of metabolism could allow for further exploration of dynamic responses in metabolic networks.},
doi = {https://doi.org/10.1016/j.ymben.2021.01.008},
doi = {10.1016/j.ymben.2021.01.008},
keywords = {Metabolic engineering, DBTL cycle, Model reduction, Model optimisation, Model-driven design, Synthetic biology},
url = {https://www.sciencedirect.com/science/article/pii/S1096717621000161},
}
Expand Down Expand Up @@ -830,7 +830,7 @@ @Article{BastBuc2021
volume = {24},
abstract = {Summary
Classically, hematopoietic stem cell (HSC) differentiation is assumed to occur via progenitor compartments of decreasing plasticity and increasing maturity in a specific, hierarchical manner. The classical hierarchy has been challenged in the past by alternative differentiation pathways. We abstracted experimental evidence into 10 differentiation hierarchies, each comprising 7 cell type compartments. By fitting ordinary differential equation models with realistic waiting time distributions to time-resolved data of differentiating HSCs from 10 healthy human donors, we identified plausible lineage hierarchies and rejected others. We found that, for most donors, the classical model of hematopoiesis is preferred. Surprisingly, multipotent lymphoid progenitor differentiation into granulocyte-monocyte progenitors is plausible in 90% of samples. An in silico analysis confirmed that, even for strong noise, the classical model can be identified robustly. Our computational approach infers differentiation hierarchies in a personalized fashion and can be used to gain insights into kinetic alterations of diseased hematopoiesis.},
doi = {https://doi.org/10.1016/j.isci.2021.102120},
doi = {10.1016/j.isci.2021.102120},
keywords = {stem cells research, in silico biology, systems biology},
url = {https://www.sciencedirect.com/science/article/pii/S2589004221000882},
}
Expand Down Expand Up @@ -902,7 +902,7 @@ @Article{GudinaAli2021
SARS-CoV-2 spread in Ethiopia has been highly dynamic among hospital worker and urban communities. We can speculate that the greatest wave of SARS-CoV-2 infections is currently evolving in rural Ethiopia, and thus requires focused attention regarding health-care burden and disease prevention.
Funding
Bavarian State Ministry of Sciences, Research, and the Arts; Germany Ministry of Education and Research; EU Horizon 2020 programme; Deutsche Forschungsgemeinschaft; and Volkswagenstiftung.},
doi = {https://doi.org/10.1016/S2214-109X(21)00386-7},
doi = {10.1016/S2214-109X(21)00386-7},
url = {https://www.sciencedirect.com/science/article/pii/S2214109X21003867},
}
Expand Down Expand Up @@ -994,7 +994,7 @@ @Article{AdlungSta2021
volume = {36},
abstract = {Summary
Survival or apoptosis is a binary decision in individual cells. However, at the cell-population level, a graded increase in survival of colony-forming unit-erythroid (CFU-E) cells is observed upon stimulation with erythropoietin (Epo). To identify components of Janus kinase 2/signal transducer and activator of transcription 5 (JAK2/STAT5) signal transduction that contribute to the graded population response, we extended a cell-population-level model calibrated with experimental data to study the behavior in single cells. The single-cell model shows that the high cell-to-cell variability in nuclear phosphorylated STAT5 is caused by variability in the amount of Epo receptor (EpoR):JAK2 complexes and of SHP1, as well as the extent of nuclear import because of the large variance in the cytoplasmic volume of CFU-E cells. 24–118 pSTAT5 molecules in the nucleus for 120 min are sufficient to ensure cell survival. Thus, variability in membrane-associated processes is sufficient to convert a switch-like behavior at the single-cell level to a graded population-level response.},
doi = {https://doi.org/10.1016/j.celrep.2021.109507},
doi = {10.1016/j.celrep.2021.109507},
keywords = {single-cell modeling, JAK/STAT, signal transduction, Epo, heterogeneity, cell fate decision, apoptosis, CFU-E cells, transcription factor, mathematical modeling},
url = {https://www.sciencedirect.com/science/article/pii/S2211124721009372},
}
Expand Down
17 changes: 0 additions & 17 deletions documentation/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,23 +514,6 @@ def process_docstring(app, what, name, obj, options, lines):
)
return

if name == 'amici.amici.StringDoubleMap':
lines.append(
'Swig-Generated class templating :class:`Dict` '
'[:class:`str`, :class:`float`] to facilitate'
' interfacing with C++ bindings.'
)
return

if name == 'amici.amici.ParameterScalingVector':
lines.append(
'Swig-Generated class, which, in contrast to other Vector '
'classes, does not allow for simple interoperability with common '
'python types, but must be created using '
':func:`amici.amici.parameterScalingFromIntVector`'
)
return

if len(name.split('.')) == 3 and name.split('.')[2] in \
['ExpDataPtr', 'ReturnDataPtr', 'ModelPtr', 'SolverPtr']:
cname = name.split('.')[2]
Expand Down
65 changes: 65 additions & 0 deletions documentation/debugging.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
Debugging AMICI
===============

This document contains some information on how to debug any issues in AMICI,
in particular for C++ Python extensions.

Caveman debugging / printf-debugging
------------------------------------

The simplest approach may often be adding some print-statements to the code,
as this does not require any special tools.

Note that after each change of the C++ files, the AMICI extension *as well as
the model extension* (if any model functions are called), need to be
recompiled.
The simplest and safest approach would be re-installation of the amici package
and re-import of the model. As this can be very time-consuming, the following
shortcut is possible, assuming you are using a development installation
(``pip install -e ...``):

.. code-block:: shell
# rebuild the amici base extension, from within the amici root directory
# (note that this only recompiles the amici source files, NOT third-party
# dependencies such as sundials):
cd python/sdist/
python setup.py build_ext --build-lib .
# rebuild the model, from within the model package directory:
python setup.py build_ext --force --build-lib .
Note: Be careful when working interactively, Python may not pick up any changes
in already imported modules. The safest is to start a new Python process after
any changes.


Using a proper debugger
-----------------------

Debugging with with [gdb](https://www.sourceware.org/gdb/) is most convenient
with a minimal reproducible example that is directly invoked from gdb.
For example:

.. code-block:: shell
# start gdb
gdb --args python -m pytest ../tests/test_sbml_import.py::test_nosensi
# inside gdb, set a meaningful breakpoint and launch:
break amici::runAmiciSimulation
run
# ... (see one of the many gdb tutorials)
Alternative, gdb can attach to a running process by passing the ``--pid``
argument.

For many users, it may be more convenient to use gdb via some graphical user
interface as provided by various C++ IDEs.

.. note::

For better debugging experience, but at the cost of runtime performance,
consider building the amici and model extension with environment variable
``ENABLE_AMICI_DEBUGGING=TRUE``. This will include debugging symbols and
disable compiler optimizations.
1 change: 1 addition & 0 deletions documentation/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,4 @@ Further topics
Organization of the documentation <README>
code_review_guide
CI
debugging
Loading

0 comments on commit 067826d

Please sign in to comment.