Code Monkey home page Code Monkey logo

extracellular-models's Introduction

extracellular-models

This package contains a set of reaction-diffusion models to simulate the dynamics of fluorescent dyes and neuropeptides in the brain extracellular space. The models are encoded in Python using the reaction-diffusion module of the NEURON simulator and its recently developed extracellular reaction-diffusion simulator (McDougal et al. 2013, Newton et al. 2018).


Table of Contents

  1. Install
    1. Dependencies
    2. pip install
  2. The Models
  3. Usage details
    1. Importing
    2. Simulating
    3. Chaning extracellular parameters
    4. Examples
  4. License
  5. Change Log
  6. Citing

Install

extracellular-models installs as the extmodels Python package. It is tested with Python 3.9.

Dependencies

Note that extmodels has the following core dependencies:

pip install

You can install extmodels with pip sourced from the GitHub repo:

pip install -e git+https://github.com/NTBEL/extracellular-models#egg=extmodels

The Models

extracellular-models currently contains 4 models:

  • extmodels.calcein - Model of calcein diffusion in the brain extracellular space after photorelease from gold-coated nanovesicles.
  • extmodels.somatostatin - Model of somatostatin diffusion and loss (degradation, clearance, etc.) in the brain extracellular space after photorelease from gold-coated nanovesicles.
  • extmodels.dynophin - Model of dynorphin A diffusion and binding to the kLight receptor-based fluorescent sensor in the brain extracellular space after photorelease from gold-coated nanovesicles.
  • extmodels.core_satellite - Model of somatostatin (SST) release, diffusion, and loss with core-satellite based sensing clusters. The sensing clusters are simplified models of the core-satellite CNiFERs clusters setup used in Xiong et al. 2021 bioRxiv.
  • extmodels.calcein_pointsource - Model of calcein diffusion in the brain extracellular space that approximates release from an instantaneous point source.
  • extmodels.dynorphin_pointsource - Model of dynorphin A diffusion and binding to the kLight receptor-based fluorescent sensor in the brain extracellular space after photorelease from a point-source.
  • extmodels.calcein_pointsource_asymm - Model of asymmetric calcein diffusion in the brain extracellular space after release from an approximate instantaneous point source. The two-sides of the simulation domain along the x-axis have different tortuosities so calcein diffuses asymmetrically.

Usage details

To facilitate reusability and allow models to be importable they have been encapsulated as Python class objects and defined within separate modules.

Importing

Models can be imported from their respective modules. For example,

from extmodels.calcein import model

will import the initialized instance of the calcein model.

Simulating

To simulate the model you can call the simulate function. For example,

time_step = 10 # time step in milliseconds
n_steps = 100 # run for 100 time steps.
out_frequency = 10 # compute model observables every 10 time steps.
model.simulate(time_step, n_steps, out_frequency)

will run the model simulation for total simulated time of 1 second (time_step*n_step) and store model observables at intervals of every 10 time steps. The observables and corresponding simulated times are accessible through the properteries observables and times; for example:

model_observables = model.observables
times = model.times

Changing Extracellular parameters

The NEURON rxd.Extracellular object that is used to define the extracellular space and its parameters (e.g., volume fraction and tortuosity) currently doesn't support modifying the parameters (such as volume fraction or tortuosity) after it has been initialized in the model. If you want to use a particular model but want, for example, a different tortuosity, you can import the Model class and then create a custom instance:

from extmodels.calcein import Model

# Initialize the calcein model but with a tortuosity of 2 instead of the default
# 1.7 used for extmodels.calcein.model.
model = Model(tortuosity=2.0)

Examples

The examples folder contains some example application scripts using the models and saving outputs. Note that most of these require the tifffile library to save 2d z-projections as .tiff image trajectory files.


Contact

Please open a GitHub Issue to report any problems/bugs or make any comments, suggestions, or feature requests.


License

This project is licensed under the MIT License - see the LICENSE file for detail


Change Log

See: CHANGELOG


Citing

If any of these models are useful in your research, please cite this GitHub repo: https://github.com/NTBEL/extracellular-models

extracellular-models's People

Contributors

blakeaw avatar

Watchers

 avatar

Forkers

blakeaw

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.