emodelrunner

Runs cells from stand-alone packages.

https://github.com/bluebrain/emodelrunner

Science Score: 85.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 6 DOI reference(s) in README
  • Academic publication links
    Links to: nature.com, zenodo.org
  • Committers with academic emails
    6 of 9 committers (66.7%) from academic institutions
  • Institutional organization owner
    Organization bluebrain has institutional domain (portal.bluebrain.epfl.ch)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.7%) to scientific vocabulary

Keywords from Contributors

biology brain cell circuit connection emodel neuron neuroscience
Last synced: 6 months ago · JSON representation ·

Repository

Runs cells from stand-alone packages.

Basic Info
  • Host: GitHub
  • Owner: BlueBrain
  • License: other
  • Language: Python
  • Default Branch: main
  • Size: 79.5 MB
Statistics
  • Stars: 16
  • Watchers: 9
  • Forks: 8
  • Open Issues: 8
  • Releases: 15
Created over 4 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog Contributing License Citation Authors Zenodo

README.rst

|banner|

############
EModelRunner
############

+----------------+------------+
| Latest Release | |pypi|     |
+----------------+------------+
| Documentation  | |docs|     |
+----------------+------------+
| License        | |license|  |
+----------------+------------+
| Build Status 	 | |build|    |
+----------------+------------+
| Coverage       | |coverage| |
+----------------+------------+
| Support        | |gitter|   |
+----------------+------------+
| 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:

  - ability to run post-synaptic cell with pre-recorded output of pre-synaptic cell
  - ability to run 'full' pair simulations, where both the pre-synaptic and the post-synaptic cells are run at the same time
  - analysis tool to compute the change of EPSPs
  - this module is designed 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' `_.

- 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):

.. code-block::

    @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


.. |build| image:: https://github.com/BlueBrain/EModelRunner/actions/workflows/test.yml/badge.svg
                :target: https://github.com/BlueBrain/EModelRunner/actions/workflows/test.yml
                :alt: Build Status

.. |license| image:: https://img.shields.io/badge/License-Apache_2.0-blue.svg
                :target: https://github.com/BlueBrain/EModelRunner/blob/main/LICENSE.txt
                :alt: License

.. |docs| image:: https://readthedocs.org/projects/emodelrunner/badge/?version=latest
                :target: https://emodelrunner.readthedocs.io/en/latest/?badge=latest
                :alt: Documentation Status

.. |coverage| image:: https://codecov.io/gh/BlueBrain/EModelRunner/coverage.svg?branch=main
                :target: https://codecov.io/gh/BlueBrain/EModelRunner?branch=main
                :alt: Coverage

.. |pypi| image:: https://img.shields.io/pypi/v/emodelrunner.svg
                :target: https://pypi.org/project/EModelRunner/
                :alt: Latest Release

.. |GUI_screenshot| image:: https://raw.githubusercontent.com/BlueBrain/EModelRunner/main/doc/source/images/GUI_screenshot.png

.. |banner| image:: https://raw.githubusercontent.com/BlueBrain/EModelRunner/main/doc/source/logo/BBP-eModelRunner.jpg

.. |gitter| image:: https://badges.gitter.im/BlueBrain/EmodelRunner.svg
   :alt: Join the chat at https://gitter.im/BlueBrain/EmodelRunner
   :target: https://gitter.im/BlueBrain/EmodelRunner?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

.. |zenodo| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.8116075.svg
                :target: https://doi.org/10.5281/zenodo.8116075
                :alt: Zenodo

Owner

  • Name: The Blue Brain Project
  • Login: BlueBrain
  • Kind: organization
  • Email: bbp.opensource@epfl.ch
  • Location: Geneva, Switzerland

Open Source Software produced and used by the Blue Brain Project

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
title: "EModelRunner"
doi: 10.5281/zenodo.8116075
url: https://doi.org/10.5281/zenodo.8116075
abstract: "EModelRunner is a Python package designed to run single cell models from public Blue Brain Project resources. This includes both portals like the Somatosensory Cortex portal or the Thalamus microstudio, and research findings such as those from 'A calcium-based plasticity model for predicting long-term potentiation and depression in the neocortex'. It offers an accessible way to explore these diverse models and findings, all in one convenient package. This tool, while focused on ease of use, is not a universal simulator but rather a convenient way to access and use specific cell models from Blue Brain's resources."
authors:
  - family-names: "Jaquier"
    given-names: "Aurélien"
  - family-names: "Tuncel"
    given-names: "Anil"
  - family-names: "Van Geit"
    given-names: "Werner"
date-released: 2023-07-01
publisher: "Zenodo"

GitHub Events

Total
  • Watch event: 3
  • Fork event: 2
Last Year
  • Watch event: 3
  • Fork event: 2

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 217
  • Total Committers: 9
  • Avg Commits per committer: 24.111
  • Development Distribution Score (DDS): 0.618
Past Year
  • Commits: 18
  • Committers: 1
  • Avg Commits per committer: 18.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Jaquier Aurélien Tristan a****r@e****h 83
Anil Tuncel a****l@e****h 66
Aurélien Jaquier 7****r 47
Jaquier Aurélien Tristan a****r@b****h 10
Kiliç Ilkan Fabrice i****c@b****h 4
Werner Van Geit w****t@e****h 3
Alexander Dietz a****z@e****h 2
The Gitter Badger b****r@g****m 1
Guillaume Dequenne g****e@s****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 13
  • Total pull requests: 96
  • Average time to close issues: 4 months
  • Average time to close pull requests: 1 day
  • Total issue authors: 3
  • Total pull request authors: 7
  • Average comments per issue: 3.0
  • Average comments per pull request: 1.53
  • Merged pull requests: 94
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 5
  • Average time to close issues: N/A
  • Average time to close pull requests: about 5 hours
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 5
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • anilbey (10)
  • AurelienJaquier (3)
  • Sangyoon-Bae (1)
Pull Request Authors
  • AurelienJaquier (69)
  • anilbey (23)
  • ilkilic (2)
  • alex4200 (2)
  • gitter-badger (1)
  • guillaume-dequenne-sonarsource (1)
  • wvangeit (1)
Top Labels
Issue Labels
improvement (1) good first issue (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 2,667 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 1
  • Total versions: 32
  • Total maintainers: 3
pypi.org: emodelrunner

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

  • Homepage: https://github.com/BlueBrain/EModelRunner
  • Documentation: https://emodelrunner.readthedocs.io/en/latest
  • License: EModelRunner is licensed under the Apache License, unless noted otherwise, e.g., for external dependencies. See file COPYING for the full license. The examples are under the CC-BY-NC-SA license, as specified by the LICENSE.txt file in each example repository. Copyright 2020-2022 Blue Brain Project / EPFL Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
  • Latest release: 1.2.5
    published over 1 year ago
  • Versions: 32
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 2,667 Last month
Rankings
Dependent packages count: 4.7%
Downloads: 8.8%
Average: 12.5%
Forks count: 12.6%
Stargazers count: 14.5%
Dependent repos count: 21.8%
Last synced: 6 months ago

Dependencies

requirements_docs.txt pypi
  • sphinx >=2.0.0
  • sphinx-bluebrain-theme *
.github/workflows/build.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/keep-alive.yml actions
  • actions/checkout v2 composite
.github/workflows/test.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • codecov/codecov-action v2 composite
pyproject.toml pypi
  • Pebble >=4.3.10
  • bluepyopt >=1.14.15
  • efel >=4.2,<6
  • h5py *
  • matplotlib *
  • neurom >=3.1.0
  • numpy *
  • schema *
  • tqdm >=4.65.0