Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
examples
images
neuron_interaction Changed to C1_Full Jun 5, 2016
notebooks
tune
unittests
.gitignore
CompareMain.py
LEMS_c302_TEMPLATE.xml
NeuroMLUtilities.py
OpenWormReader.py
README.md
SpreadsheetDataReader.py
TODOs
UpdatedSpreadsheetDataReader.py
__init__.py
analyse.py
bioparameters.py
c302.py
c302_AWC.py
c302_A_Weights.py
c302_FW.py
c302_Full.py
c302_IClamp.py
c302_IClampMuscle.py
c302_Kato.py
c302_MultiSyns.py
c302_MuscleTest.py
c302_Muscles.py
c302_Oscillator.py
c302_OscillatorM.py
c302_Pharyngeal.py
c302_Social.py
c302_Syns.py
c302_TapWithdrawal.py
c302_TargetMuscle.py
c302_utils.py
cell_B.xml
cell_C.xml
custom_muscle_components.xml
custom_synapses.xml
gen_graph.py
parameters_A.py
parameters_B.py
parameters_BC1.py
parameters_C.py
parameters_C0.py
parameters_C1.py
parameters_C2.py
parameters_D.py
parameters_D1.py
runAndPlot.py
test.bat
test.sh
test3.sh

README.md

Note: c302 has recently been moved to its own repository!!










Old README:

c302 structure

c302 is an experimental framework for generating network models in NeuroML 2 based on C elegans connectivity data.

It uses information on the synaptic connectivity of the network (from here) and uses libNeuroML to generate a network in valid NeuroML, which can be run in jNeuroML or pyNeuroML.

Multiple versions of the network

There will be multiple version of this network (see figure above), based on increasingly complex cell models, e.g.

Parameters_A Integrate & fire cells (not very physiological) connected by chemical (event triggered, conductance based) synapses

Parameters_B Updated I&F cells, with gap junction connections plus an "activity" measure (varies 0->1 depending on depolarisation of cell), which should be a better approximation for the relative activity of cells

Parameters_C Single compartment, conductance based neurons (will be initially based on muscle cell model). A modified version of this (Parameters_C1) has analogue (graded) synapses.

Parameters_D (TODO) Multicompartmental, conductance based cells

Parameters A, B and C/C1 are the only parameter sets tested so far, but the aim is to make all of the associated tools below for running, visualising, analysing, etc. independent of the parameter set used, so they can be ready for more detailed networks from c302 in the future.

To install & test

The full set of dependencies for c302 can be installed with the following (see also the Travis-CI script):

python setup.py install

To regenerate a set of NeuroML & LEMS files for one instance of the model and execute it:

cd ./CElegans/pythonScripts/c302            # Enter c302 script directory
python c302_Full.py                         # To regenerate the NeuroML & LEMS files
pynml examples/LEMS_c302_A_Full.xml         # Run a simulation with jNeuroML via pyNeuroML

This will produce the following (6 cells visualised with the jNeuroML GUI):

Simulation in jNeuroML

This saves traces from all neurons in a file c302_A.dat. To plot the membrane potential of all 302 neurons:

python analyse.py c302_A_Full.dat

Analysis

Traces are slightly offset from one another for clarity.

To test all of the working features of the framework run test.sh:

./test.sh

Command line interface

This package can be used to generate customised networks of varying size, with different cells stimulated, of varying duration from the command line:

./c302.py MyNetwork parameters_A -cells ["ADAL","AIBL","RIVR","RMEV"] -cellstostimulate ["ADAL","RIVR"] -duration 500

This will create a NeuroML 2 file and a LEMS file to execute it, containing 4 cells, stimulating 2 of them, and with a duration of 500 ms

More options can be found with

./c302.py -h

Mapping to NEURON

Due to the fact that the cells are in pure NeuroML2, they can be mapped to other formats using the export feature of jNeuroML. Install NEURON and map the network to this format using:

cd examples

for jNeuroML:

jnml LEMS_c302_A_Pharyngeal.xml -neuron

or instead for pyNeuroML:

pynml LEMS_c302_A_Pharyngeal.xml -neuron

then

nrnivmodl
nrngui -python LEMS_c302_A_Pharyngeal_nrn.py

This will run the example network containing just the 20 cells from the pharynx.

Run in NEURON

Image above shows the network run in NEURON (top) and a comparison of the activity of the 20 cells when run on jNeuroML (bottom left) and NEURON (bottom right). Bottom graphs generated with analyse.py and each of the traces are offset by a few mV for clarity.

Comparing activity across scales/parameter sets

activity

See here for more details on this.

Understanding how c302_Full.py works

Planned work

Future plans include:

  • Implement & correctly tune Parameters_C (started), Parameters_D

  • Modify to use PyOpenWorm as source of connection data

  • Move all of this to its own repository

  • Add to Geppetto for simulation of networks in browser (done, see live.geppetto.org)

  • Add muscle cells & connect output to muscle cell activity in Sibernetic

  • Link to bionet to tune weights of network to physiological behaviour