The c302 framework is in the process of moving here from https://github.com/openworm/CElegansNeuroML/tree/master/CElegans/pythonScripts/c302
c302 is a 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.
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:
python c302/c302_Full.py # To regenerate the NeuroML & LEMS files
pynml examples/LEMS_c302_A_Full.xml # Run a simulation with jNeuroML via pyNeuroML
To test all of the working features of the framework run test.sh:
./test.sh
This package can be used to generate customised networks of varying size, with different cells stimulated, of varying duration from the command line:
./c302/__init__.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/__init__.py -h
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
See here for more details on this.