Giter Club home page Giter Club logo

c302's Introduction

The c302 modelling framework for C. elegans

Continuous builds Non OMV tests

c302 is a framework for generating network models in NeuroML 2 based on C. elegans connectivity data. It is primarily intended as a way to generate neuronal networks at multiple levels of detail for the OpenWorm project. To see how c302 relates to other OpenWorm subprojects click on the image below:

c302_in_overview

c302 structure

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 c302 paper has recently been published!

c302: a multiscale framework for modelling the nervous system of Caenorhabditis elegans Padraig Gleeson, David Lung, Radu Grosu, Ramin Hasani, Stephen D. Larson, Phil. Trans. R. Soc. B 2018 373 20170379; DOI: 10.1098/rstb.2017.0379.

To install & test

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

git clone https://github.com/openworm/c302.git
cd c302
pip install .
owm bundle remote --user add ow 'https://raw.githubusercontent.com/openworm/owmeta-bundles/master/index.json'

This will install c302 as well as pyNeuroML and owmeta.

To run the test.sh script, the Neuron simulator is also required, and should be installed as described here.

For Linux users, additional dependencies (OpenJDK 19 and Graphviz) are required to run the Usage Examples:

sudo apt-get install openjdk-19-jdk graphviz

Please note that Python3 is also required to run both the test.sh script and the Usage Examples. For convenience on Linux, it is recommended to install python-is-python3 prior to running the test.sh script.

sudo apt-get install python-is-python3

Quick test

To ensure everything is set up correctly try:

  1. Regenerate the NeuroML & LEMS files for one instance of the model:

    python c302/c302_Pharyngeal.py B  # generate pharyngeal network (see fig. above) using parameter set B
    
  2. Run a simulation with pyNeuroML:

    pynml examples/LEMS_c302_B_Pharyngeal.xml      
    

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

 ./test.sh

Docker image

c302 is included in the Docker image which contains the complete OpenWorm simulation stack. Click on the image below for more details.

Worm Crawling

Usage Examples

1a) Run standard examples with pyNeuroML

There are a number of example models included with the standard distribution. These consist of: A) generated NeuroML 2 network description file (example), containing the definitions of the cells to use (e.g. iafCell for an integrate and fire cell), any inputs (e.g. pulseGenerator) as well as the populations, projections and inputLists contained within the network (for a full description of the NeuroML elements see here); and B) a LEMS simulation file (example) describing how long to simulate, the timestep and what to plot/record.

   # generate 2 neurons & 1 muscle with current inputs using parameter set A
   pynml examples/LEMS_c302_A_IClamp.xml      

   # generate full scale network using parameter set C
   pynml examples/LEMS_c302_C_Full.xml    

   # generate pharyngeal network using parameter set B
   pynml examples/LEMS_c302_B_Pharyngeal.xml

Screenshots of a simulation with pyNeuroML of c302_B_Pharyngeal are shown below (left: membrane potential of 20 cells, right: "activity" of 20 cells - a value from 0-1 showing time smoothed activity of each cell):

c302_B_Pharyngeal

1b) Run standard examples with Neuron

The models can also be run using the Neuron simulator. This should be installed as outlined here.

   cd examples
   pynml LEMS_c302_A_IClamp.xml -neuron   # Generate the Neuron files (Python/hoc/mod)
   nrnivmodl                              # Compile the mod files (used for cell/ion channel definitions)
   nrngui LEMS_c302_A_IClamp_nrn.py       # Run the main Python file for the simulation using Neuron

Note: models with the D parameter set can only be run using Neuron (not pyNeuroML), simnce they consist of multicompartmental Neurons, e.g.

   pynml LEMS_c302_D_Pharyngeal.xml -neuron  
   nrnivmodl                         
   nrngui LEMS_c302_D_Pharyngeal_nrn.py

This produces the following (graph on top is [Ca2+], bottom is membrane potential; 3D view on right can be produced by selecting in the Neuron main menu: Graph -> Shape plot)

Neuron

2) Use command line interface to create new network

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

c302 MyNetwork parameters_C -cells ["AVBR","VD3"] -cellstostimulate ["AVBR"] -paramoverride {"unphysiological_offset_current":"2.9pA"} -duration 300

This will create a NeuroML 2 file and a LEMS file to execute it, containing 2 cells, stimulating 1 of them, and with a duration of 300 ms. It can be run with:

pynml LEMS_MyNetwork.xml

This produces two plots: One is neuron activity, measured as calcium ion concentration. You will likely need to click "Frame" in the "View" menu to scale the plot.

activity

The other shows membrane potential for each neuron in the network.

membrane potential

To see the structure of the network, use pyNeuroML (please note that Graphviz is required):

pynml MyNetwork.net.nml -graph 4c  # Try other options like 1, 2f, 5c for varying levels of detail

MyNetwork

More options for using the c302 command can be found with

c302 -h

3) Change parameters in a file

To investigate how the behaviour of a model changes when parameters are varied, it is possible to change the parameters in the parameters_X.py files and regenerate.

For example in parameters_C.py there are lists of parameters like:

self.add_bioparameter("muscle_leak_cond_density", "5e-7 S_per_cm2", "BlindGuess", "0.1")
self.add_bioparameter("neuron_leak_cond_density", "0.005 mS_per_cm2", "BlindGuess", "0.1")
self.add_bioparameter("leak_erev", "-50 mV", "BlindGuess", "0.1")

To change the model behaviour alter one of these values, e.g.

self.add_bioparameter("neuron_leak_cond_density", "0.02 mS_per_cm2", "BlindGuess", "0.1")

and look at the behaviour afterwards (note the package needs to be reinstalled)

sudo python setup.py install           # reinstall package after change
python c302/c302_IClamp.py C           # regenerate c302_C_IClamp
pynml examples/LEMS_c302_C_IClamp.xml  # run simulation

The plots below show the neuron's membrane potential on application of 6 increasing pulses of current before (left) and after (right) the change, indicating how increasing the leak conductance removes the spiking:

4) Adding a new input type to NeuroML model

The structure of the model generated can be altered by modifying the NeuroML model returned in the c302_XXX.py script. As an example, say we want to add a sine wave current to the Muscles network (specified by c302_Muscles.py), as opposed to the steady current clamp input. This can be achieved by setting the "unphysiological_offset_current" to zero:

params.set_bioparameter("unphysiological_offset_current", "0pA", "Disabling offset current", "0")

and (after calling c302.generate()) adding the new NeuroML element for the current and adding the input to a cell:

# Import from libNeuroML      
from neuroml import SineGenerator, InputList, Input
import neuroml.writers as writers

# Create the sine wave current generator & add to NeuroML document
sw_input = SineGenerator(id='NewSineWaveInput',
                      delay='100ms',
                      phase='0',
                      duration='800ms',
                      amplitude='4.5pA',
                      period='200ms')

nml_doc.sine_generators.append(sw_input)

# Which cell to stimulate
cell = 'AVBL'

# create an InputList and add one Input to that cell
input_list = InputList(id="Input_%s_%s" % (cell, sw_input.id), component=sw_input.id, populations='%s' % cell)
input_list.input.append(Input(id=0, target="../%s/0/GenericNeuronCell"%cell, destination="synapses"))
nml_doc.networks[0].input_lists.append(input_list)

# Write over network file created already...
nml_file = target_directory+'/'+reference+'.net.nml'
writers.NeuroMLWriter.write(nml_doc, nml_file)

These changes are made in c302_MusclesSine.py) and can be run with:

python c302/c302_MusclesSine.py C
pynml examples/LEMS_c302_C_MusclesSine.xml

Membrane potential of neurons (left; stimulated AVBL cell in green) and muscles (right) shown below:

sine

Other types of NeuroML input elements are defined here and examples are shown here.

5) View and execute the models on Open Source Brain

The Github repository for c302 is linked to a project on Open Source Brain: http://www.opensourcebrain.org/projects/c302. This allows exploration of the generated NeuroML 2 networks through the Geppetto enabled OSB 3D Explorer.

To see a list of the networks which can be visuaised, click on the More button on the top right of the page. As an example, the Pharyngeal network with parameter set D can be selected (c302_D_Pharyngeal.net.nml in the Network list, direct link here).

The initial view of the network is shown on the left below.

To get the view on the right:

  • change the background to white by clicking the paintbrush icon (bottom icon on left)
  • open the connectivity matrix (Connectivity button, top left) showing the connections present between cells in an adjacency matrix
  • press Connectivity button again and select Force-directed layout
  • Run a simulation of the network
    • Persist project so simulations can be run (star on top middle). You will need to have signed up for OSB & logged in!
    • Press Run button; set duration to 0.4 seconds; press Submit
    • When dialog appears asking what to record, select all membrane potentials at somas. Simulation will be set running.
  • After circle on Experiments tab has turned green, plot some of the recorded traces:
    • press the Control Panel icon (four horizontal lines, forth icon from botton on left)
    • show the list of state variables: x2 button on top of this dialog. Ensure target button is selected (first of four buttons on right) to only show recorded variables
    • all recorded variables are shown, e.g. c302_D_Pharyngeal.I1L[0].Seg0_soma_0_0.v: membrane potential of soma in cell I1L. select which to plot with icons on right
  • Replay the simulation:
    • use the time varying voltage of cells to color the corresponding 3D objects: Results -> Apply voltage colouring to morphologies
    • open the dialog for the simulation time: Results -> Show simulation time
    • replay the simulation: Results -> Play step by step (10x)

It is also possible to view and analyse other configurations, e.g. c302_D_Full:

c302_D_Full

Comparing activity across scales/parameter sets

This page shows a set of generated simulations at each of the subnetwork/parameter set configurations, and provides a quick overview of the activity of the different instances of c302:

activity

Note that c302 is still in active development and not all of the configurations are producing physiologically realistic results.

Background info: Understanding how c302_Full.py works

Overview of the files and packages used in the framework:

c302's People

Contributors

austinklein avatar gsarma avatar lungd avatar mwatts15 avatar necr0n avatar pgleeson avatar quffaro avatar rejunity avatar yasinthanvickneswaran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

c302's Issues

List and dictionary command line arguments from README not executable in some shells

This command in the README:
c302 MyNetwork parameters_C -cells ["AVBR","VD3"] -cellstostimulate ["AVBR"] -paramoverride {"unphysiological_offset_current":"2.9pA"} -duration 300

Does not execute as-is in some shells, like ZSH, which attempt to parse ["AVBR","VD3"] as a shell glob and fail. (For ZSH, the failure produces a message, zsh: no matches found: [AVBR,VD3], rather than removing quote marks and passing [AVBR,VD3] to c302 as Bash apparently does.) ["AVBR"] is handled similarly. On the other hand, {"unphysiological_offset_current":"2.9pA"} apparently isn't interpreted as a glob and is handled as intended.

first installation error : unable to download c302 module

Hello,
I tried to use sibernetic_c302.py to simulate C. eleganse,
but error occurred.

Collecting c302
  Using cached c302-0.7.0.tar.gz (35.1 MB)
Requirement already satisfied: numpy in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from c302) (1.19.4)
Requirement already satisfied: xlrd in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from c302) (2.0.1)
Collecting xlwt
  Using cached xlwt-1.3.0-py2.py3-none-any.whl (99 kB)
Requirement already satisfied: libNeuroML>=0.2.39 in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from c302) (0.2.53)
Requirement already satisfied: pyNeuroML>=0.3.11 in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from c302) (0.5.5)
Collecting pyopenworm==0.7.1
  Using cached PyOpenWorm-0.7.1.tar.gz (339 kB)
Requirement already satisfied: lxml in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from libNeuroML>=0.2.39->c302) (4.6.2)
Requirement already satisfied: six in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from libNeuroML>=0.2.39->c302) (1.15.0)
Requirement already satisfied: argparse in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from pyNeuroML>=0.3.11->c302) (1.4.0)
Requirement already satisfied: pylems>=0.4.9.1 in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from pyNeuroML>=0.3.11->c302) (0.5.1)
Requirement already satisfied: airspeed==0.5.4dev-20150515 in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from pyNeuroML>=0.3.11->c302) (0.5.4.dev20150515)
Requirement already satisfied: neuromllite>=0.1.9 in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from pyNeuroML>=0.3.11->c302) (0.1.9)
Requirement already satisfied: kiwisolver<=1.1.0 in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from pyNeuroML>=0.3.11->c302) (1.1.0)
Requirement already satisfied: matplotlib in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from pyNeuroML>=0.3.11->c302) (3.3.3)
Collecting bibtexparser==0.6.1
  Using cached bibtexparser-0.6.1.tar.gz (26 kB)
Collecting BTrees==4.0.8
  Using cached BTrees-4.0.8.tar.gz (608 kB)

DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\USER\AppData\Local\Programs\Python\Python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pycharm-packaging\\btrees\\setup.py'"'"'; __file__='"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pycharm-packaging\\btrees\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\USER\AppData\Local\Temp\pip-pip-egg-info-kckznqqe'
         cwd: C:\Users\USER\AppData\Local\Temp\pycharm-packaging\btrees\
    Complete output (46 lines):
    WARNING: The wheel package is not available.
      ERROR: Command errored out with exit status 1:
       command: 'C:\Users\USER\AppData\Local\Programs\Python\Python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-wheel-rczjvzy3\\persistent\\setup.py'"'"'; __file__='"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-wheel-rczjvzy3\\persistent\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\USER\AppData\Local\Temp\pip-wheel-h6lc6nk8'
           cwd: C:\Users\USER\AppData\Local\Temp\pip-wheel-rczjvzy3\persistent\
      Complete output (8 lines):
      WARNING: The wheel package is not available.
      WARNING: The wheel package is not available.
      usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
         or: setup.py --help [cmd1 cmd2 ...]
         or: setup.py --help-commands
         or: setup.py cmd --help
    
      error: invalid command 'bdist_wheel'
      ----------------------------------------
      ERROR: Failed building wheel for persistent
    ERROR: Failed to build one or more wheels
    Traceback (most recent call last):
      File "C:\Users\USER\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\installer.py", line 126, in fetch_build_egg
        subprocess.check_call(cmd)
      File "C:\Users\USER\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 373, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['C:\\Users\\USER\\AppData\\Local\\Programs\\Python\\Python39\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\USER\\AppData\\Local\\Temp\\tmpuvxibmva', '--quiet', 'persistent']' returned non-zero exit status 1.
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\USER\AppData\Local\Temp\pycharm-packaging\btrees\setup.py", line 116, in <module>
        setup(name='BTrees',
      File "C:\Users\USER\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\__init__.py", line 152, in setup
        _install_setup_requires(attrs)
      File "C:\Users\USER\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\__init__.py", line 147, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "C:\Users\USER\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py", line 673, in fetch_build_eggs
        resolved_dists = pkg_resources.working_set.resolve(
      File "C:\Users\USER\AppData\Local\Programs\Python\Python39\lib\site-packages\pkg_resources\__init__.py", line 764, in resolve
        dist = best[req.key] = env.best_match(
      File "C:\Users\USER\AppData\Local\Programs\Python\Python39\lib\site-packages\pkg_resources\__init__.py", line 1049, in best_match
        return self.obtain(req, installer)
      File "C:\Users\USER\AppData\Local\Programs\Python\Python39\lib\site-packages\pkg_resources\__init__.py", line 1061, in obtain
        return installer(requirement)
      File "C:\Users\USER\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py", line 732, in fetch_build_egg
        return fetch_build_egg(self, req)
      File "C:\Users\USER\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\installer.py", line 128, in fetch_build_egg
        raise DistutilsError(str(e)) from e
    distutils.errors.DistutilsError: Command '['C:\\Users\\USER\\AppData\\Local\\Programs\\Python\\Python39\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\USER\\AppData\\Local\\Temp\\tmpuvxibmva', '--quiet', 'persistent']' returned non-zero exit status 1.

I thought it's maybe the problem of the latest version,
so I tried to download 0.6.0 version of c302

Collecting c302==0.6.0
  Using cached c302-0.6.0.tar.gz (642 kB)

DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\USER\AppData\Local\Programs\Python\Python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pycharm-packaging\\c302\\setup.py'"'"'; __file__='"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pycharm-packaging\\c302\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\USER\AppData\Local\Temp\pip-pip-egg-info-evn57mh0'
         cwd: C:\Users\USER\AppData\Local\Temp\pycharm-packaging\c302\
    Complete output (8 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\USER\AppData\Local\Temp\pycharm-packaging\c302\setup.py", line 6, in <module>
        import c302
      File "C:\Users\USER\AppData\Local\Temp\pycharm-packaging\c302\c302\__init__.py", line 1416
        print 555522
              ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print(555522)?
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 20.2.3; however, version 20.3.3 is available.
You should consider upgrading via the 'C:\Users\USER\AppData\Local\Programs\Python\Python39\python.exe -m pip install --upgrade pip' command.

But an even weirder error occurred.
Please help...

Porting the computation of C302 neural network operations to my neural morphology chip.

Hello, respected developer. I have two questions. The first one is that I want to transplant the neural network computation of C302 to my neural morphology chip. However, currently my neural morphology chip only supports C language, so how can I use C language to reconstruct the network structure of C302 and perform computation on my chip.
Secondly, I am currently well aware that the definition of network structure and neural network calculations that rely on stimulating cells all come from LEMS files, such as LEMS_c302_A_Full.xml. But when I was reading the LEMS file, I found that I couldn't find the three files described in the following code in the local environment, so I would like to ask where these three files are located.

    <Include file="Cells.xml" />
    <Include file="Networks.xml" />
    <Include file="Simulation.xml" />

Data Provenance

Hello everyone!

I think it would be useful to made a readme.txt in the data folders to account about the data provenance.

Anyway, could anyone tell me where is the data coming from:

I am using neuroML2 models of neurons, herm_full_edgelist_MODIFIED, and CElegansNeuronTables.csv.

Thanks!

Make a proper unit test suite

There's a test.sh script (which also doesn't work with the python 3
updates) that does not have clear pass/fail which is unhelpful for quickly
diagnosing errors.

owmeta installation fails on GH actions

@mwatts15 Could you have a quick look at the installation of owmeta as used in the CI test here: https://github.com/openworm/c302/blob/development/.github/workflows/non_omv.yml#L23?

It fails: https://github.com/openworm/c302/runs/4035587014?check_suite_focus=true with an error:

owmeta_core.bundle.exceptions.BundleNotFound: Missing bundle "openworm/owmeta-data" at version 6: Bundle directory, "/home/runner/.owmeta/bundles/openworm%2Fowmeta-data/6", does not exist for the specified version

but the dir /home/runner/.owmeta/bundles/openworm%2Fowmeta-data/1 does exist

Move tests to travis-ci.com

Need to move tests on this from travis-ci.org to travis-ci.com. They will eventually move to github actions, but as a short term solution (since travis-ci.org will shut on June 15th) tests can be moved to travis-ci.com.

This seems to be set up in Settings, but there is a block on this under Third Party Access
Screenshot 2021-06-07 at 12 43 25
@mwatts15 It has you down as requesting this. Any reason not to grant access to this?

Can't connect to PyOpenWorm

I called the command

c302 -h

And found this error

FileNotFoundError: [Errno 2] No such file or directory: '/Users/username/PyOpenWorm/.pow/worm.db.lock' Failed to open the data source because: Could not open the database file "/Users/username/PyOpenWorm/.pow/worm.db"
c302 >>> Can't connect to PyOpenWorm: ...
PyOpenWorm connection failed: Could not open the database file "/Users/username/PyOpenWorm/.pow/worm.db". Perhaps you need to do a "pow clone"?

It seems like c302 cannot connect to PyOpenWorm. Where can I access this database?

Create a c302 DataTranslator and DataSources

PyOpenWorm has a notion of DataTranslators that describe how data get from
one form to another and each of those forms is called a DataSource. A
DataSource should be created to describe the input to c302 and a DataSource
should be created to describe the output NeuroML files. The DataTranslator
should have a translate method which runs c302 with the first DataSource
type and outputs the second. The first DataSource should have a Translation
linking it back to the PyOpenWorm insert_worm DataSource (TBD:
openworm/owmeta#364).

blocked by openworm/owmeta#364

Deprecated dependencies: Use command line interface to create new network

This is for the Readme, in Usage Examples: Section 2) Use command line interface to create new network
Specifically, for this command line example code:

c302 MyNetwork parameters_C -cells ["AVBR","VD3"] -cellstostimulate ["AVBR"] -paramoverride {"unphysiological_offset_current":"2.9pA"} -duration 300

There's a lot of things going on here. I had some issue with owmeta that I dont recall what they were.

The wrapt package that was setup on my system, I guess when I installed this, was too new. I had to downgrade to version 1.11.1.

Now I'm getting this:
ImportError: cannot import name inspect.formatargspec. I guess the code, or one of its dependencies, is trying to use the formatargspec function from the inspect module, which has been deprecated and removed in Python 3.11. I'm reading that the inspect.signature function replaced it.

If I try to correct that code on my system, I think I will get sucked into a rabbit hole because I do not know the design of this software.

Reason I want to use this functionality
I was wanting to do a variation on that command in order to generate the LEMS files, and I guess the NeuroML 2 files, for each neuron for a script that:

  1. Iterates over a range of current clamp values.
  2. Runs a simulation for each value.
  3. Records the neuron's response.
  4. Identifies the minimum active response and the maximum sustainable response.
  5. Saves a record of the test results to have the input current value, the output current value, and the ISI if there is one.

These tests would be ran on one neuron each. Not to simulate the interactions between the neurons.

Is there another way I can generate that LEMS file, such as another program, or the possibility of running that command from the openworm docker image?

I don't know how to run the command from the openworm docker image, if doing that is possible. But I can figure it out if the other stuff I am trying does not work. Right now I am setting up older versions of linux in virtual machines trying to find one that is not too old to prevent me from installing this program in it, while not being too new to run that command.

No module named 'bioparameters'

I installed c302, following the instructions. When running to create a new network. I entered the following command.

c302 MyNetwork parameters_C -cells ["AVBR","VD3"] -cellstostimulate ["AVBR"] -paramoverride {"unphysiological_offset_current":"2.9pA"} -duration 300

Quick test problem

hello
I am try to install c302 according to README.md

I have done:
git clone https://github.com/openworm/c302.git
cd c302
python setup.py install

when I try to run

owm bundle remote --user add ow 'https://raw.githubusercontent.com/openworm/owmeta-bundles/master/index.json'

I met up with the problem of
image

so I turned to run

~/opt/anaconda3/bin/owm bundle remote --user add ow 'https://raw.githubusercontent.com/openworm/owmeta-bundles/master/index.json'

and succeed with
image

but afterwards, when I try to run the quick test

python c302/c302_Pharyngeal.py

I get the error of:
image
(The ! mark is because I added something to the dataobject.py file like this:
image
)

can you please give me advice to overcome this?
Thanks a lot

fatal error: 'H5public.h' file not found

After cloning the c302 repo and running pip3 install . I am getting the following error-

/var/folders/b6/75cxrjwd3vb2ljjm8mxm452h0000gn/T/H5closeoesewhwn.c:1:10: fatal error: 'H5public.h' file not found
Screenshot 2023-12-17 at 4 13 19 AM

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.