Skip to main content

Runs cells from Blue Brain Project cell packages, such as sscx, synapse plasticity, etc.

Project description

banner

EModelRunner

Latest Release

Latest Release

Documentation

Documentation Status

License

License

Build Status

Build Status

Coverage

Coverage

Support

Join the chat at https://gitter.im/BlueBrain/EmodelRunner

Citation

Zenodo

Introduction

EModelRunner is a python library designed to run the cell models provided by the Blue Brain portals in a simple and straightforward way.

It consists of two main modules:

  • one module designed to show the synapse plasticity phenomenon. It has the following features:

  • one module designed to run the cells from the SomatoSensoryCortex portal, with the following features:

    • ability to use Steps and Ramps protocols

    • synapse stimulation

    • ability to produce hoc files to run the cells

    • a GUI

Note that EModelRunner is a convenience tool and does not aim to be a universal simulator.

Citation

When you use this EModelRunner software for your research, we ask you to cite the following publications (this includes poster presentations):

@article{emodelrunner,
    title={EModelRunner},
    DOI={10.5281/zenodo.8116075},
    url={https://doi.org/10.5281/zenodo.8116075}
    abstractNote={EModelRunner is a python library designed to run the cell models provided by the Blue Brain portals in a simple and straightforward way. It consists of two main modules. The first module is designed to show the synapse plasticity phenomenonand to run the cells and reproduce the results from the paper 'A calcium-based plasticity model for predicting long-term potentiation and depression in the neocortex'. The second module is designed to run the cells from the Blue Brain Project SomatoSensoryCortex portal. Note that EModelRunner is a convenience tool and does not aim to be a universal simulator.},
    publisher={Zenodo},
    author={Jaquier, Aurélien and Tuncel, Anil and Van Geit, Werner},
    year={2023},
    month={Jul}
}

Support

We are providing support using a chat channel on Gitter.

Installing EModelRunner

The usual way to install EModelRunner is using pip. In that case, you probably want to use a python virtual environment.

Install using pip:

pip install emodelrunner

Installing from source

If you want to make changes to emodelrunner, you might want to install it using the source repository. The same remarks of the section above apply, the only difference is that you clone the git repo:

git clone https://github.com/BlueBrain/EModelRunner.git

and run pip from inside the newly created emodelrunner subdirectory (don’t forget the dot at the end of the command):

pip install -e .

Supported systems

The code of emodelrunner can be installed on any POSIX system that supports pip-installable python code.

Dependencies

The main dependencies of EModelRunner are:

Python3.8+
Matplotlib
Numpy
Neurom
H5py
NEURON
BluePyOpt
Schema

Ideally, follow the installation instructions of these tools, or use pre-installed versions.

Python

Modern Linux systems will have Python installed. Make sure that your python version is 3.8 or higher.

Make sure you’re using a recent version of pip. It’s best to run

pip install pip --upgrade

before installing anything else using pip.

Examples

Synapse Plasticity example

You can find an example cell package in example/synplas_sample_dir. Go to this folder, or to a cell package that has been designed to work with the synapse plasticity functions.

Run the simulation

Running the simulation should be as easy as:

sh run.sh config_path

Where config_path is the path to a specific config file. You will find the available config files in the config folder. It will run the post-synaptic cell using pre-defined spike train of the pre-synaptic cell to stimulate the synapses.

You can also do a full pair simulation, where both the pre-synaptic and the post-synaptic cells are simulated. This should be as easy as:

sh run_pairsim.sh config_path

Where config_path is the path to a specific config file. You will find the available config files in the config folder.

Once the simulation is done, the output is stored as output_{protocol_details}.h5. If the precell has been simulated too, its output is stored as output_precell_{protocol_details}.h5.

Please, bear in mind that, since it is difficult to make the pre-synaptic cell spike at exactly the same time as in the pre-recorded spike-train file (especially when the pre-synaptic cell has to spike multiple times in a row), the results of the ‘full pair’ simulation might differ slightly from those of the ‘post-synaptic cell only’ simulation.

All the config files are working for both the ‘post-synaptic cell only’ and the ‘full pair’ simulations.

Analyse the output

Start by loading the class useful for the analysis with the following command:

from emodelrunner.synplas_analysis import Experiment

Then create an Experiment instance:

exp = Experiment(data="output_50Hz_10ms.h5", c01duration=, c02duration=, period=)

With data being the path to your output file, or a dictionary containing the output data, c01duration, respectively c02duration, are the duration of the EPSP monitoring before, respectively after, the induction protocol, period is the period at which the synapses are stimulated.

Note that the period argument can be replaced by c01period and c02period if the period used for the stimulation of the synapses is different after and before the induction protocol.

The change of EPSPs can then be computed by using the compute_epsp_ratio method, as follows:

EPSP_ratio = exp.compute_epsp_ratio(n=60, method="amplitude)

With n the number of sweeps to be considered for mean EPSP calculation, and method the method to use to compute EPSP ratio (can be “amplitude” or “slope”).

Sscx example

You can find an example cell package in example/sscx_sample_dir. Go to this folder, or to a cell package that has been designed to work with the sscx functions.

Run the simulation using python

Running the simulation should be as easy as:

sh run.sh config_path

Where config_path is the path to a specific config file. You will find the available config files in the config folder. Note that the protocol used will depend on the contents of the config file.

The output can be found under python_recordings.

Run the simulation using hoc

You can also run the simulation using hoc. In order to do that, you will have to first create the hoc files with the following line:

python -m emodelrunner.create_hoc --config_path config_path

Where config_path is the path to a specific config file. You will find the available config files in the config folder. Note that not all the protocols in the config files can be turned into hoc yet.

Then run the simulation with:

sh run_hoc.sh

The output can be found under python_recordings.

GUI

GUI_screenshot

There is also a GUI available for the sscx cells. To launch it, you have to go in a sscx-compatible cell package, and then type:

python -m emodelrunner.GUI --config_path config_path

The usage of the GUI is pretty much self-explanatory.

In the upper part of the left column, you have the display configuration. You may want to change the figure size depending on your screen size for optimal display. In the lower part of the left column is the step and holding stimuli configuration. You can put both to custom stimulus and set them to 0 if you don’t want to have any step stimulus.

In the right column you have the synapse stimuli configuration. Check the box of each synapse mtype you want to receive stimuli from. The activated synapses will display on the right figure with red dots for excitatory synapses and yellow dots for inhibitory synapses. You can then set on the right column at which time each synapse group should start firing, at which interval and how many times they should fire, and if they should have any noise.

In the center part of the GUI, you have two plots of the cell, the one on the left showing the voltage at each section, and the one on the right showing the synapses locations. You can change the rotation of both plots in 3D with your mouse. Below is a plot showing the voltage in the soma depending on time. On top, you have three buttons to (re)start the simulation, pause it or resume it.

Funding & Acknowledgements

The development of this project was supported by funding to the Blue Brain Project, a research center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss government’s ETH Board of the Swiss Federal Institutes of Technology.

Copyright (c) 2020-2024 Blue Brain Project/EPFL

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

emodelrunner-1.2.5.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

EModelRunner-1.2.5-py3-none-any.whl (1.2 MB view details)

Uploaded Python 3

File details

Details for the file emodelrunner-1.2.5.tar.gz.

File metadata

  • Download URL: emodelrunner-1.2.5.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for emodelrunner-1.2.5.tar.gz
Algorithm Hash digest
SHA256 41e7a5efdc57726f168c7eef39eee78bde661cc9e37e666f2483c4f255d0de3c
MD5 45aa4f36f3ef35e2407939840ee59c9c
BLAKE2b-256 b75c54773bec8d785d65be144fc366c7329b4904db2324881900d9d835cf918d

See more details on using hashes here.

File details

Details for the file EModelRunner-1.2.5-py3-none-any.whl.

File metadata

File hashes

Hashes for EModelRunner-1.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 018f7a41ca597eed28c29caecab99f6ae3a56c825554409d996526af7f6543bd
MD5 c5f8106fe36a09891dd989d262e5141b
BLAKE2b-256 77a03f441612a59d9cac203e47ab252857b791fce6fe3038b34351eae2328d84

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page