Skip to content

DeepWater3104/comp-glia-book

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

The repo contains code used for simulations and figures in the book "Computational Glioscience," De Pitta' M. and Berry, H. eds., (Springer 2019). The repo contains different folders according to the chapters in the book. Content of each folder is detailed as following.


Ch3.Timofeeva

This folder contains codes to reproduce simulations and figures in Chapter 3. The following software must be preliminarly installed in order to run the code:

  • Matlab R2012 (or higher)
  • XPPAUT (http://www.math.pitt.edu/~bard/xpp/xpp.html)

The folder DYK includes the ODE files for XPPAUT to study bifurcations of the De Young and Keizer model for IP3 receptors.

The folder FDF1D contains Matlab routines to simulate the FDF model for calcium waves.

The videos folder provides a sample movie of a simulation of a stochastic spiral calcium wave by the FDF model.


Ch5.DePitta

This folder contains Python 2.7 and C++11 codes to reproduce simulations and figures of Chapter 4. The following software must be preliminarly installed in order to run the code:

  • gcc 7.x and gfortran;
  • GSL libraries;
  • Jupyter notebook;
  • Python 2.7 modules: weave, dill, numpy, scipy, matplotlib;
  • PyGMO >=2.6 (https://esa.github.io/pagmo2/install.html);
  • PyDSTool (by pip install PyDSTool).

The data folder contains experimental data used in the simulations to fit the astrocyte model. These data are inspected and manipulated by the data_loader.ipynb Jupyter notebook.

The code folder contains the following routines:

  • astrocyte_models.py : implements the Python class to simulate the astrocyte model in its various flavors. This class links to homonymous .H and .CPP files which will are compiled by gcc -std=c++11 by weave.
  • fit_data.py : implements model fitting with experimental data by PyGMO. The results of these fits are already provided in the data folder. The routine is provided for completeness.
  • egchi_bif.py : implements the PyCont class (by PyDSTool) to perform bifurcation analysis of the extended astrocyte model (i.e. ex-GChI).
  • figures.mplstyle : matplotlib style file
  • figures.py : build all the figures of Chapter 4.

The pycustommodules folder contains several custom Python modules invoked by the different ruotines in the code directory to manipulate, plot and analyze data.

To build the figures, download the folder of this chapter to the home directory, then cd /Ch4.DePitta/code and python figures.py.


Ch7.Lallouette

The folder contains Python 3 and C++ code to generate figures and simulations of Chapter 6.

The doc directory contains the the supplementary text with details for the derivation of the Shell model description. The WxMaxima file ODEsystem.wxmx is also provided for the analytical solution of the ODE system at the core of the shell model derivation. WxMaxima can be downloaded and installed from free from http://andrejv.github.io/wxmaxima

The src folder contains the C++ kernel files to run the network models. These files must be preliminarily compiled by invoking make in the parent directory.

RunSimulations.py allows to reproduce all the simulations in the chapter. This might take up to hours to days depending on the user's hardware. Please refer to README.md for further details on how to run the code.


Ch10.DePitta

This folder contains Python 2.7 and C++11 codes to reproduce simulations and figures of Chapter 10. The following software must be preliminarly installed in order to run the code:

  • gcc 7.x;
  • GSL libraries;
  • Jupyter notebook;
  • Python 2.7 modules: weave, dill, numpy, scipy, matplotlib;

The estimation folder contains experimental data used for estimation of rise and decay times of gliotransmitter effect on synaptic release. These estimations are provided by the gliotransmission_kinetics.ipynb Jupyter notebook.

The code folder contains the following routines:

  • gliotransmission_models.py : implements the Python class to simulate all models of neuro/gliotransmitter release. This class links to homonymous .H and .CPP files which will are compiled by gcc -std=c++11 by weave.
  • figures.mplstyle : matplotlib style file
  • figures.py : build all the figures of Chapter 10.

Data generated by the simulations in figures.py are saved to the data folder, whereas figures are sent to the Figures folder (both folders are empty upon installation).

The pycustommodules folder contains several custom Python modules invoked by the different ruotines in the code directory to manipulate, plot and analyze data. The subfolder solvers contains C/C++ code that define classes needed for numerical integration of the different models in gliotransmission_models.cpp.

To build the figures, download the folder of this chapter to the home directory, then cd /Ch10.DePitta/code and python figures.py.


Ch18.Stimberg

The folder contains Brian 2.x code to reproduce simulations and figures of Chapter 18.

The code directory contains one file for each example that can be run independently and by default creates and saves images to the text/figures/results directory. It also contains a script named extract_code.py that takes the code files in the code directory (which are the only ones that should ever be edited) and creates "clean examples" from them, as well as the code snippets that will be included in the text. See below for notes on how this script works.

The LaTeX file needs that extract_code.py has been run and that all the figures have been generated. The easiest way to make sure that everything is up-to-date is to run make in the main directory, it will re-run everything that is missing, build the PDF, call bibtex, etc.

The code contained in this folder builds the whole chapter from the mere TEX file, running all simulations and producing clean Brian2 examples. Once downloaded, on the command line in the local repo folder, type cd Ch18.Stimberg; make.

Code annotations

In the code, there are a few strange looking comments. These are used so that we can use them as a source for the code snippets included in the paper without having to worry that the two codes get out-of-sync, i.e. that the code used to generate the figures does not correspond to the code we are presenting in the paper. There are a few comments that are interpreted specially:

  • DELETE: This will completely delete this line when creating the "clean examples". This is used for things that are paper-specific, e.g. where to save the figure files too and maybe some very specific customisations of the plot.
  • INCLUDE BEGIN and INCLUDE END: This will start/end a block that will be used as a code snippet in the paper. Blocks will be numbered starting at 1, so the first such block of example_1_COBA.py can be included with \lstinputlisting{code/example_1_COBA_1.py} in the LaTeX document
  • ELLIPSIS BEGIN and ELLIPSIS END: This will replace the respective block (that has to be within an include block) by "# ..." in the generated code snippet. This is useful when we show some code (e.g. astrocyte equations) that has been shown before but has some new additions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 52.1%
  • Python 17.0%
  • Jupyter Notebook 15.8%
  • TeX 7.0%
  • C 4.3%
  • Makefile 3.7%
  • Other 0.1%