Coder Social home page Coder Social logo

modeldbrepository / 267259 Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 1.0 29 KB

Spreading Depolarization in Brain Slices (Kelley et al. 2022)

Home Page: https://modeldb.science/267259

Python 100.00%
spreading-depolarization-spreading-depression-reac neuron-simulator

267259's Introduction

SDinSlice

Overview

A tissue-scale model of spreading depolarization (SD) in brain slices. We used the NEURON simulator's reaction-diffusion framework to implement embed thousands of neurons (based on the the model from Wei et al. 2014) in the extracellular space of a brain slice, which is itself embedded in an bath solution. We initiate SD in the slice by elevating extracellular K+ in a spherical region at the center of the slice. Effects of hypoxia and propionate on the slice were modeled by appropriate changes to the volume fraction and tortuosity of the extracellular space and oxygen/chloride concentrations. Users need to install NEURON, and we recommend using MPI to parallelize simulations.

Code

SpatialModel.py -- Simulation of SD with user specification of slice and cell properties via a json configuration file.

genCfgs.py -- Generates json configuration files that specifies slice dimensions, cell density, neuronal volume fraction, neuronal surface area to volume ratio, slice oxygenation, etc.

analyzeNeuromorpho.py -- Computes average neuronal surface to volume ratios for various neuronal cell types from different brain regions in rats, mice, and humans using data from NeuroMorpho.

SpatialModelDynAlpha.py -- Simulation of SD with dynamic changes in volume fraction of the extracellular space in perfused slice.

analysis.py -- Functions for analyzing output from SD simulations.

figures.py -- Functions for plotting output from SD simulations.

Basic Usage

SD in small, perfused slice for 2s

The following runs a simulation of SD in a small (500 um x 500 um x 200 um), perfused slice for 2 seconds using a pre-made configuration file. MPI is used for parallelizing and is highly recommended, especially for larger simulations.

mpiexec -n 6 nrniv -python -mpi SpatialModel.py cfgs/small_sim.json

This simulation can take over 30 minutes to run. If MPI is not installed, it may be run with:

nrniv -python SpatialModel.py cfgs/small_sim.json

but this will take much longer.

To plot the output from that simulation:

python3 basicPlots.py Data/small_sim/

SD in small, hypoxic slice for 2s

The following runs a simulation of SD in a small, hypoxic slice for 2 seconds using another pre-made configuration file.

mpiexec -n 6 nrniv -python -mpi SpatialModel.py cfgs/small_hypoxic_sim.json

Similarly, to plot the out for that simulation:

python3 basicPlots.py Data/small_hypoxic_sim/

Comparing results from those two simulations

We have included a script for comparing the output of the previous two simulations shown above. After both simulations, the following will create a figure (small_sim_comparison.png) comparing the radial trajectories of the K+ waves and reduced raster plots (plotting only the first spike rather than all for visualization purposes).

python3 compareSims.py

SD in larger, hypoxic slice for 10 s (recommend running on HPC)

The following uses genCfgs.py to create a configuration file for simulating SD in a larger (1 mm x 1 mm x 400 um), hypoxic slice for 10 s, then runs the simulation with MPI. Because of the size and duration of the simulation, we recommend only running this on an HPC. The number of threads (nthreads) and number of processes passed to MPI (-n) can be changed depending on the available resources.

python3 genCfgs.py --tstop=10000 --ox=anoxic --k0=70 --r0=100 --pas=-70.0 --uniformRec=True \
--nthreads=40 --nrec=40 --dir=Data/hypox_1mmmx1mmx400um_10s/ --sa2v=3.0 --O2consume=True \
cfgs/hypox_1mmx1mmx400um_10s.json
mpiexec -n 40 nrniv -python -mpi SpatialModel.py cfgs/hypox_1mmx1mmx400um_10s.json

References

Wei, Yina, Ghanim Ullah, and Steven J. Schiff. "Unification of neuronal spikes, seizures, and spreading depression." Journal of Neuroscience 34, no. 35 (2014): 11733-11743. https://doi.org/10.1523/JNEUROSCI.0516-14.2014

267259's People

Contributors

alexsavulescu avatar

Watchers

Tom Morse avatar Robert A McDougal avatar  avatar  avatar

Forkers

opensourcebrain

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.