Coder Social home page Coder Social logo

openworm / celegansneuroml Goto Github PK

View Code? Open in Web Editor NEW
134.0 134.0 50.0 236.93 MB

NeuroML based C elegans model, contained in a neuroConstruct project, as well as c302

Home Page: http://opensourcebrain.org/projects/celegans

XSLT 15.92% Python 2.20% Shell 0.04% Batchfile 0.01% HTML 0.53% AMPL 0.14% Jupyter Notebook 81.16% Dockerfile 0.01%

celegansneuroml's Introduction

OpenWorm

Docker Image CI Docker Image Test - quick Docker Image Test Build - Intel drivers

About OpenWorm

OpenWorm aims to build the first comprehensive computational model of Caenorhabditis elegans (C. elegans), a microscopic roundworm. With only a thousand cells, it solves basic problems such as feeding, mate-finding and predator avoidance. Despite being extremely well-studied in biology, a deep, principled understanding of the biology of this organism remains elusive.

We are using a bottom-up approach, aimed at observing the worm behaviour emerge from a simulation of data derived from scientific experiments carried out over the past decade. To do so, we are incorporating the data available from the scientific community into software models. We are also forging new collaborations with universities and research institutes to collect data that fill in the gaps.

You can earn a badge with us simply by trying out this package! Click on the image below to get started. OpenWorm Docker Badge

Quickstart

We have put together a Docker container that pulls together the major components of our simulation and runs it on your machine. When you get it all running it does the following:

  1. Run our nervous system model, known as c302, on your computer.
  2. In parallel, run our 3D worm body model, known as Sibernetic, on your computer, using the output of the nervous system model.
  3. Produce graphs from the nervous system and body model that demonstrate its behavior on your computer for you to inspect.
  4. Produce a movie showing the output of the body model.

Example Output

Worm Crawling

NOTE: Running the simulation for the full amount of time would produce content like the above. However, in order to run in a reasonable amount of time, the default run time for the simulation is limited. As such, you will see only a partial output, equivalent to about 5% of run time, compared to the examples above. To extend the run time, use the -d argument as described below.

Installation

Pre-requisites:

  1. You should have at least 60 GB of free space on your machine and at least 2GB of RAM
  2. You should be able to clone git repositories on your machine. Install git, or this GUI may be useful.

To Install:

  1. Install Docker on your system.
  2. If your system does not have enough free space, you can use an external hard disk. On MacOS X, the location for image storage can be specified in the Advanced Tab in Preferences. See this thread in addition for Linux instructions.

Running

  1. Ensure the Docker daemon is running in the background (on MacOS/Windows there should be an icon with the Docker whale logo showing in the menu bar/system tray).
  2. Open a terminal and run: git clone http://github.com/openworm/openworm; cd openworm
  3. Optional: Run ./build.sh (or build.cmd on Windows). If you skip this step, it will download the latest released Docker image from the OpenWorm Docker hub.
  4. Run ./run.sh (or run.cmd on Windows).
  5. About 5-10 minutes of output will display on the screen as the steps run.
  6. The simulation will end. Run stop.sh (stop.cmd on Windows) on your system to clean up the running container.
  7. Inspect the output in the output directory on your local machine.

Advanced

Arguments

  • -d [num] : Use to modify the duration of the simulation in milliseconds. Default is 15. Use 5000 to run for time to make the full movie above (i.e. 5 seconds).

Other things to try

  • Open a terminal and run ./run-shell-only.sh (or run-shell-only.cmd on Windows). This will let you log into the container before it has run master_openworm.py. From here you can inspect the internals of the various checked out code bases and installed systems and modify things. Afterwards you'll still need to run ./stop.sh to clean up.
  • If you wish to modify what gets installed, you should modify Dockerfile. If you want to modify what runs, you should modify master_openworm.py. Either way you will need to run build.sh in order to rebuild the image locally. Afterwards you can run normally.

FAQ

What is the Docker container?

The Docker container is a self-contained environment in which you can run OpenWorm simulations. It's fully set up to get you started by following the steps above. At the moment, it runs simulations and produces visualizations for you, but these visualizations must be viewed outside of the Docker container. While you do not need to know much about Docker to use OpenWorm, if you are planning on working extensively with the platform, you may benefit from understanding some basics. Docker Curriculum is an excellent tutorial for beginners that is straightforward to work through (Sections 1 - 2.5 are plenty sufficient).

Is it possible to modify the simulation without having to run build.sh?

Yes, but it is marginally more complex. The easiest way is to modify anything in the Docker container once you are inside of it - it will work just like a bash shell. If you want to modify any code in the container, you'll need to use an editor that runs in the terminal, like nano. Once you've modified something in the container, you don't need to re-build. However, if you run stop.sh once you exit, those changes will be gone.

How do I access more data than what is already output?

The simulation by default outputs only a few figures and movies to your home system (that is, outside of the Docker container). If you want to access the entire output of the simulation, you will need to copy it from the Docker container.

For example, say you want to extract the worm motion data. This is contained in the file worm_motion_log.txt, which is found in the /home/ow/sibernetic/simulations/[SPECIFIC_TIMESTAMPED_DIRECTORY]/worm_motion_log.txt. The directory [SPECIFIC_TIMESTAMPED_DIRECTORY] will have a name like C2_FW_2018_02-12_18-36-32, and its name can be found by checking the output directory. This is actually the main output directory for the simulation, and contains all output, including cell modelling and worm movement.

Once the simulation ends and you exit the container with exit, but before you run stop.sh, run the following command from the openworm-docker-master folder:

docker cp openworm:/home/ow/sibernetic/simulations/[SPECIFIC_TIMESTAMPED_DIRECTORY]/worm_motion_log.txt ./worm_motion_log.txt

This will copy the file from the Docker container, whose default name is openworm. It is crucial that you do not run stop.sh before trying to get your data out (see below)

What is the difference between exit and stop.sh?

When you are in the Docker Container openworm, and are done interacting with it, you type exit to return to your system's shell. This stops execution of anything in the container, and that container's status is now Exited. If you try to re-start the process using run-shell-only.sh, you will get an error saying that the container already exists. You can choose, at this point, to run stop.sh. Doing so will remove the container and any files associated with it, allowing you to run a new simulation. However, if you don't want to remove that container, you will instead want to re-enter it.

How do I enter a container I just exited?

If you run stop.sh you'll delete your data and reset the container for a new run. If, however, you don't want to do that, you can re-enter the Docker container like this:

docker start openworm                 # Restarts the container
docker exec -it openworm /bin/bash    # Runs bash inside the container

This tells Docker to start the container, to execute commands (exec) with an interactive, tty (-it) bash (bash) shell in the container openworm.

You'll be able to interact with the container as before.

Documentation

to find out more about OpenWorm, please see the documentation at http://docs.openworm.org or join us on Slack.

This repository also contains project-wide tracking via high-level issues and milestones.

celegansneuroml's People

Contributors

aleph-ra avatar aribrich avatar borismarin avatar brijeshmodi12 avatar ed5000 avatar lungd avatar nmsutton avatar pasky avatar pgleeson avatar rayner avatar slarson avatar tarelli 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  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  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

celegansneuroml's Issues

Question on simulations

What brought me here was the video of the simulated brain controlling the Lego robot, found out about it while reading about general AI stuff.

How would one go about setting up something like that? Is it a fairly complicated process, or could I set it up in something like Unity3d, even potentially dusting off my old Mindstorms set and trying to set the thing up on that?

Create validation tests for all synapses between key motor neurons

Tests must be created for connections between each of:

  • AS01
  • AS02
  • DA01
  • DA02
  • DB01
  • DD01
  • SMDDL
  • SMDDR

This will include verifying that neurotransmitter identity and synaptic strengths are correct, given their data source (PyOpenWorm).

This assumes that the authoritative source of data is in PyOpenWorm, but the tests are written on the NeuroML2 version.

Test python scripts

Some scripts in this directory can be tested using a framework like pytest.

A rudimentary example would be to run RegenerateConnectome and look for a 0 exit code (i.e. the script exited successfully).

Higher value tests can compare the outputs of these modules to an expected output, or run specific functions defined in them. This will vary depending on the actual script in question.

For now, let's enumerate some modules, and possible tests that could provide a benefit:

Create validation tests for all gap junctions between key motor neurons

Tests must be created for connections between each of:

  • AS01
  • AS02
  • DA01
  • DA02
  • DB01
  • DD01
  • SMDDL
  • SMDDR

This will include verifying that identity and conductance are correct, given their data source (in the openworm/owmeta-data bundle).

This assumes that the authoritative source of data is in owmeta-data, but the tests are written on the NeuroML2 version.

Discussions on simulating the worm's crawling by means of command neurons, motor neurons and muscle cells

In a series of documents, I will discuss the role of the command-neurons, different types of motor neurons and their connectivity with the body-wall muscle cells. The ultimate goal is to derive a valid assumption on how the crawling happens in C. elegans and accordingly, simulate the response of the worm to a tap or touch stimulus in C302 and Sibernetics. My justifications will be based on the connectome dataset provided for the adult hermaphrodite by the WormWiring [1]. I will be investigating various neural circuits consisting of command neurons such as AVB and AVA, together with B-type, A-type, D-type and AS motor neurons including their connectivity to the muscles. The first discussion will be on a neural circuit comprised of AVB and B-type motor neurons. I will then discuss D-type and AS motor neurons within the next discussion. Afterwards, I will include the body-wall muscles into the neural circuit and discuss in details the propagation of an AVB-excitation into the motor neurons and muscle cells. I will finally repeat such analyses with AVA command neuron and A-type motor neurons and explain the neural circuit's architecture.
We then simulate our hypotheses in C302 and perform a parameter optimization based on our findings.

1) On the importance of the command neuron AVB and B-type motor-neurons in the worm’s crawling:

AVB command neuron together with B-type motor neurons function in the deriving the forward locomotion. There are seven dorsal and eleven ventral B-type motor neurons spread over the body of the worm. Considering a neural circuit, shown in Figure 1A and 1B, consist of only AVBL/R and all the B-type motor-neurons on the dorsal and ventral sides, one can highlight some attractive fundamental architectural design properties within the circuit:

  • AVBL/R synapse onto all B-type motor neurons with an average number of 10 connections to the dorsal and 8 connections to the ventral motor neurons. Among the motor neurons VB2 is getting the highest number of gap-junctions which can be an indicator of the importance of the VB2 in signaling. Many motor neurons receive a similar number of connections form AVB (with the assumption of the equally distributed weights of each synaptic connection). This presumably implies that the objective of AVB can be in the initiation of a forward-locomotion action as well as equal distribution of the forward-command for several motor-neurons.

openworm-pic2-avb-to-bmotorneurons
Figure 1. AVB and B-type motor neurons neural circuit. A) AVBR\L and dorsal motor neuron neural circuit. Green lines are bidirectional gap junctions. Blue arrows represent excitatory synapses. Numbers on each line/arrow represent the number of synaptic connection between neurons. (Note that for instance 4/3, stands for 4 connections from AVBL and 3 connections from AVBR.) B) AVBR\L and ventral motor neuron neural circuit. C) Worm's muscles [2].

  • By looking at the sequential lateral connections among dorsal B-type motor-neurons, one can observe that DB1, DB2 and DB3 are strongly coupled through their gap-junctions while weakening their correlation rate with the rest of the synced motor-neurons DB4, DB5, DB6 and DB7, through a weak gap-junction between DB3 and DB4. This can potentially indicate that the activity of the dorsal B-type motor-neurons can be decoupled where the neurons 1 to 3 can be responsible for exciting part-A muscle cells shown in figure 1C, and the rest being responsible for the stimulation of the muscles depicted in part-B.

  • Such property holds for the ventral B-type motor neurons as well. Neurons VB2 and VB3 are strongly coupled while they get gradually decoupled to the rest of the motor neurons by means of the weak connections among VB3, VB4 and VB5. Therefore, we assume that the first group including VB1 to VB4 excites part-A muscles cells and second group including VB5 to VB11 excites part-B of the body-wall muscles.

  • Hypothesis 1: Like many other biological optimal networks such as beta cell hubs in islet functional architecture [3], I assume there exist hub neurons within the network of motor neurons in the C. elegans connectome which distribute commands within the network. This is explainable by looking at the connections from AVB to the motor neurons where the first group of motor neurons and specially their hubs (DB1 and VB2) are getting stimulated the most and in the next group DB7 and VB11 gets the most number of connections. The hypothesis can be further supported by an analysis on the connectivity of the motor neurons and muscle cells which will be included within the next discussions.

Such property has been observed also within the D-type dorsal and ventral motor neurons which will be explained in the next discussion.

References:
[1] wormwiring, http://wormwiring.org/hermaphrodite/herm.php
[2] wormbrowser, http://browser.openworm.org
[3] Johnston, Natalie R., et al. "Beta cell hubs dictate pancreatic islet responses to glucose." Cell Metabolism 24.3 (2016): 389-401.

Problem installing

I am trying to install CElegansNeuroML within a docker instance, but I am getting the following error.

root@e70747781c7d:/CElegansNeuroML# python2.7 setup.py install
running install
running bdist_egg
running egg_info
writing requirements to CElegansNeuroML.egg-info/requires.txt
writing CElegansNeuroML.egg-info/PKG-INFO
writing top-level names to CElegansNeuroML.egg-info/top_level.txt
writing dependency_links to CElegansNeuroML.egg-info/dependency_links.txt
reading manifest file 'CElegansNeuroML.egg-info/SOURCES.txt'
writing manifest file 'CElegansNeuroML.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
warning: install_lib: 'build/lib.linux-x86_64-2.7' does not exist -- no Python modules to install

creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying CElegansNeuroML.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying CElegansNeuroML.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying CElegansNeuroML.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying CElegansNeuroML.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying CElegansNeuroML.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/CElegansNeuroML-0.3-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing CElegansNeuroML-0.3-py2.7.egg
Removing /usr/local/lib/python2.7/dist-packages/CElegansNeuroML-0.3-py2.7.egg
Copying CElegansNeuroML-0.3-py2.7.egg to /usr/local/lib/python2.7/dist-packages
CElegansNeuroML 0.3 is already the active version in easy-install.pth

Installed /usr/local/lib/python2.7/dist-packages/CElegansNeuroML-0.3-py2.7.egg
Processing dependencies for CElegansNeuroML==0.3
Searching for matplotlib
Reading https://pypi.python.org/simple/matplotlib/
Reading http://matplotlib.org
Reading http://matplotlib.org/users/installing.html
Reading http://matplotlib.sourceforge.net
Reading http://sourceforge.net/project/showfiles.php?group_id=80706
Reading http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
Reading http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.0/
Reading http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.1/
Reading https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194
Reading https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.1/
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.3/
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0.1/
Best match: matplotlib 1.5.0
Downloading https://pypi.python.org/packages/source/m/matplotlib/matplotlib-1.5.0.tar.gz#md5=7952a539418ed77432aa4727409f24cf
Processing matplotlib-1.5.0.tar.gz
Writing /tmp/easy_install-_Rd1Gk/matplotlib-1.5.0/setup.cfg
Running matplotlib-1.5.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-_Rd1Gk/matplotlib-1.5.0/egg-dist-tmp-6sGC3h
============================================================================
Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
            matplotlib: yes [1.5.0]
                python: yes [2.7.9 (default, Apr  2 2015, 15:33:21)  [GCC
                        4.9.2]]
              platform: yes [linux2]

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.10.1]
              dateutil: yes [dateutil was not found. It is required for date
                        axis support. pip/easy_install may attempt to
                        install it after matplotlib.]
                  pytz: yes [pytz was not found. pip will attempt to install
                        it after matplotlib.]
                cycler: yes [cycler was not found. pip will attempt to
                        install it after matplotlib.]
               tornado: yes [tornado was not found. It is required for the
                        WebAgg backend. pip/easy_install may attempt to
                        install it after matplotlib.]
             pyparsing: yes [using pyparsing version 2.0.2]
                libagg: yes [pkg-config information for 'libagg' could not
                        be found. Using local copy.]
              freetype: yes [version 2.5.2]
                   png: yes [version 1.2.51]
                 qhull: yes [pkg-config information for 'qhull' could not be
                        found. Using local copy.]

OPTIONAL SUBPACKAGES
           sample_data: yes [installing]
              toolkits: yes [installing]
                 tests: yes [nose 0.11.1 or later is required to run the
                        matplotlib test suite. "setup.py test" will
                        automatically download it. Install nose 0.11.1 or
                        later to run matplotlib.test() / mock is required to
                        run the matplotlib test suite. "setup.py test" will
                        automatically download it. Install mock to run
                        matplotlib.test()]
        toolkits_tests: yes [nose 0.11.1 or later is required to run the
                        matplotlib test suite. "setup.py test" will
                        automatically download it. Install nose 0.11.1 or
                        later to run matplotlib.test() / mock is required to
                        run the matplotlib test suite. "setup.py test" will
                        automatically download it. Install mock to run
                        matplotlib.test()]

OPTIONAL BACKEND EXTENSIONS
                macosx: no  [Mac OS-X only]
                qt5agg: no  [PyQt5 not found]
                qt4agg: no  [PySide not found; PyQt4 not found]
               gtk3agg: no  [Requires pygobject to be installed.]
             gtk3cairo: no  [Requires cairocffi or pycairo to be installed.]
                gtkagg: no  [Requires pygtk]
                 tkagg: no  [TKAgg requires Tkinter.]
                 wxagg: no  [requires wxPython]
                   gtk: no  [Requires pygtk]
                   agg: yes [installing]
                 cairo: no  [cairocffi or pycairo not found]
             windowing: no  [Microsoft Windows only]

OPTIONAL LATEX DEPENDENCIES
                dvipng: no
           ghostscript: no
                 latex: no
               pdftops: no

OPTIONAL PACKAGE DATA
                  dlls: no  [skipping due to configuration]

UPDATING build/lib.linux-x86_64-2.7/matplotlib/_version.py
set build/lib.linux-x86_64-2.7/matplotlib/_version.py to '1.5.0'
src/py_converters.cpp: In function 'int convert_points(PyObject*, void*)':
src/py_converters.cpp:539:52: warning: format '%d' expects argument of type 'int', but argument 3 has type 'npy_intp {aka long int}' [-Wformat=]
                      points->dim(0), points->dim(1));
                                                    ^
src/py_converters.cpp:539:52: warning: format '%d' expects argument of type 'int', but argument 4 has type 'npy_intp {aka long int}' [-Wformat=]
src/py_converters.cpp: In function 'int convert_transforms(PyObject*, void*)':
src/py_converters.cpp:563:65: warning: format '%d' expects argument of type 'int', but argument 3 has type 'npy_intp {aka long int}' [-Wformat=]
                      trans->dim(0), trans->dim(1), trans->dim(2));
                                                                 ^
src/py_converters.cpp:563:65: warning: format '%d' expects argument of type 'int', but argument 4 has type 'npy_intp {aka long int}' [-Wformat=]
src/py_converters.cpp:563:65: warning: format '%d' expects argument of type 'int', but argument 5 has type 'npy_intp {aka long int}' [-Wformat=]
src/py_converters.cpp: In function 'int convert_bboxes(PyObject*, void*)':
src/py_converters.cpp:587:62: warning: format '%d' expects argument of type 'int', but argument 3 has type 'npy_intp {aka long int}' [-Wformat=]
                      bbox->dim(0), bbox->dim(1), bbox->dim(2));
                                                              ^
src/py_converters.cpp:587:62: warning: format '%d' expects argument of type 'int', but argument 4 has type 'npy_intp {aka long int}' [-Wformat=]
src/py_converters.cpp:587:62: warning: format '%d' expects argument of type 'int', but argument 5 has type 'npy_intp {aka long int}' [-Wformat=]
src/py_converters.cpp: In function 'int convert_colors(PyObject*, void*)':
src/py_converters.cpp:611:52: warning: format '%d' expects argument of type 'int', but argument 3 has type 'npy_intp {aka long int}' [-Wformat=]
                      colors->dim(0), colors->dim(1));
                                                    ^
src/py_converters.cpp:611:52: warning: format '%d' expects argument of type 'int', but argument 4 has type 'npy_intp {aka long int}' [-Wformat=]
src/_path_wrapper.cpp: In function 'PyObject* Py_update_path_extents(PyObject*, PyObject*, PyObject*)':
src/_path_wrapper.cpp:205:35: warning: format '%d' expects argument of type 'int', but argument 3 has type 'npy_intp {aka long int}' [-Wformat=]
                      minpos.dim(0));
                                   ^
extern/qhull/merge.c: In function 'qh_all_merges':
extern/qhull/merge.c:219:10: warning: variable 'freelistp' set but not used [-Wunused-but-set-variable]
   void **freelistp;  /* used !qh_NOmem */
          ^
extern/qhull/merge.c: In function 'qh_appendmergeset':
extern/qhull/merge.c:322:10: warning: variable 'freelistp' set but not used [-Wunused-but-set-variable]
   void **freelistp; /* used !qh_NOmem */
          ^
extern/qhull/merge.c: In function 'qh_mergecycle_ridges':
extern/qhull/merge.c:2086:10: warning: variable 'freelistp' set but not used [-Wunused-but-set-variable]
   void **freelistp; /* used !qh_NOmem */
          ^
extern/qhull/geom.c: In function 'qh_projectpoint':
extern/qhull/geom.c:897:10: warning: variable 'freelistp' set but not used [-Wunused-but-set-variable]
   void **freelistp; /* used !qh_NOmem */
          ^
extern/qhull/geom.c: In function 'qh_setfacetplane':
extern/qhull/geom.c:935:10: warning: variable 'freelistp' set but not used [-Wunused-but-set-variable]
   void **freelistp; /* used !qh_NOmem */
          ^
extern/qhull/poly2.c: In function 'qh_delridge':
extern/qhull/poly2.c:1076:10: warning: variable 'freelistp' set but not used [-Wunused-but-set-variable]
   void **freelistp; /* used !qh_NOmem */
          ^
extern/qhull/poly.c: In function 'qh_delfacet':
extern/qhull/poly.c:248:10: warning: variable 'freelistp' set but not used [-Wunused-but-set-variable]
   void **freelistp; /* used !qh_NOmem */
          ^
extern/qhull/poly.c: In function 'qh_makenew_nonsimplicial':
extern/qhull/poly.c:564:10: warning: variable 'freelistp' set but not used [-Wunused-but-set-variable]
   void **freelistp; /* used !qh_NOmem */
          ^
extern/qhull/poly.c: In function 'qh_newfacet':
extern/qhull/poly.c:981:10: warning: variable 'freelistp' set but not used [-Wunused-but-set-variable]
   void **freelistp; /* used !qh_NOmem */
          ^
extern/qhull/poly.c: In function 'qh_newridge':
extern/qhull/poly.c:1014:10: warning: variable 'freelistp' set but not used [-Wunused-but-set-variable]
   void **freelistp;   /* used !qh_NOmem */
          ^
extern/qhull/qset.c: In function 'qh_setfree':
extern/qhull/qset.c:717:10: warning: variable 'freelistp' set but not used [-Wunused-but-set-variable]
   void **freelistp;  /* used !qh_NOmem */
          ^
extern/qhull/qset.c: In function 'qh_setnew':
extern/qhull/qset.c:927:10: warning: variable 'freelistp' set but not used [-Wunused-but-set-variable]
   void **freelistp; /* used !qh_NOmem */
          ^
src/py_converters.cpp: In function 'int convert_points(PyObject*, void*)':
src/py_converters.cpp:539:52: warning: format '%d' expects argument of type 'int', but argument 3 has type 'npy_intp {aka long int}' [-Wformat=]
                      points->dim(0), points->dim(1));
                                                    ^
src/py_converters.cpp:539:52: warning: format '%d' expects argument of type 'int', but argument 4 has type 'npy_intp {aka long int}' [-Wformat=]
src/py_converters.cpp: In function 'int convert_transforms(PyObject*, void*)':
src/py_converters.cpp:563:65: warning: format '%d' expects argument of type 'int', but argument 3 has type 'npy_intp {aka long int}' [-Wformat=]
                      trans->dim(0), trans->dim(1), trans->dim(2));
                                                                 ^
src/py_converters.cpp:563:65: warning: format '%d' expects argument of type 'int', but argument 4 has type 'npy_intp {aka long int}' [-Wformat=]
src/py_converters.cpp:563:65: warning: format '%d' expects argument of type 'int', but argument 5 has type 'npy_intp {aka long int}' [-Wformat=]
src/py_converters.cpp: In function 'int convert_bboxes(PyObject*, void*)':
src/py_converters.cpp:587:62: warning: format '%d' expects argument of type 'int', but argument 3 has type 'npy_intp {aka long int}' [-Wformat=]
                      bbox->dim(0), bbox->dim(1), bbox->dim(2));
                                                              ^
src/py_converters.cpp:587:62: warning: format '%d' expects argument of type 'int', but argument 4 has type 'npy_intp {aka long int}' [-Wformat=]
src/py_converters.cpp:587:62: warning: format '%d' expects argument of type 'int', but argument 5 has type 'npy_intp {aka long int}' [-Wformat=]
src/py_converters.cpp: In function 'int convert_colors(PyObject*, void*)':
src/py_converters.cpp:611:52: warning: format '%d' expects argument of type 'int', but argument 3 has type 'npy_intp {aka long int}' [-Wformat=]
                      colors->dim(0), colors->dim(1));
                                                    ^
src/py_converters.cpp:611:52: warning: format '%d' expects argument of type 'int', but argument 4 has type 'npy_intp {aka long int}' [-Wformat=]
src/_backend_agg_wrapper.cpp: In function 'PyObject* PyRendererAgg_draw_gouraud_triangle(PyRendererAgg*, PyObject*, PyObject*)':
src/_backend_agg_wrapper.cpp:465:50: warning: format '%d' expects argument of type 'int', but argument 3 has type 'npy_intp {aka long int}' [-Wformat=]
                      points.dim(0), points.dim(1));
                                                  ^
src/_backend_agg_wrapper.cpp:465:50: warning: format '%d' expects argument of type 'int', but argument 4 has type 'npy_intp {aka long int}' [-Wformat=]
src/_backend_agg_wrapper.cpp:472:50: warning: format '%d' expects argument of type 'int', but argument 3 has type 'npy_intp {aka long int}' [-Wformat=]
                      colors.dim(0), colors.dim(1));
                                                  ^
src/_backend_agg_wrapper.cpp:472:50: warning: format '%d' expects argument of type 'int', but argument 4 has type 'npy_intp {aka long int}' [-Wformat=]
src/_backend_agg_wrapper.cpp: In function 'PyObject* PyRendererAgg_draw_gouraud_triangles(PyRendererAgg*, PyObject*, PyObject*)':
src/_backend_agg_wrapper.cpp:506:65: warning: format '%d' expects argument of type 'int', but argument 3 has type 'npy_intp {aka long int}' [-Wformat=]
                      points.dim(0), points.dim(1), points.dim(2));
                                                                 ^
src/_backend_agg_wrapper.cpp:506:65: warning: format '%d' expects argument of type 'int', but argument 4 has type 'npy_intp {aka long int}' [-Wformat=]
src/_backend_agg_wrapper.cpp:506:65: warning: format '%d' expects argument of type 'int', but argument 5 has type 'npy_intp {aka long int}' [-Wformat=]
src/_backend_agg_wrapper.cpp:513:65: warning: format '%d' expects argument of type 'int', but argument 3 has type 'npy_intp {aka long int}' [-Wformat=]
                      colors.dim(0), colors.dim(1), colors.dim(2));
                                                                 ^
src/_backend_agg_wrapper.cpp:513:65: warning: format '%d' expects argument of type 'int', but argument 4 has type 'npy_intp {aka long int}' [-Wformat=]
src/_backend_agg_wrapper.cpp:513:65: warning: format '%d' expects argument of type 'int', but argument 5 has type 'npy_intp {aka long int}' [-Wformat=]
src/_backend_agg_wrapper.cpp:520:50: warning: format '%d' expects argument of type 'int', but argument 3 has type 'npy_intp {aka long int}' [-Wformat=]
                      points.dim(0), colors.dim(0));
                                                  ^
src/_backend_agg_wrapper.cpp:520:50: warning: format '%d' expects argument of type 'int', but argument 4 has type 'npy_intp {aka long int}' [-Wformat=]
creating /usr/local/lib/python2.7/dist-packages/matplotlib-1.5.0-py2.7-linux-x86_64.egg
Extracting matplotlib-1.5.0-py2.7-linux-x86_64.egg to /usr/local/lib/python2.7/dist-packages
Adding matplotlib 1.5.0 to easy-install.pth file

Installed /usr/local/lib/python2.7/dist-packages/matplotlib-1.5.0-py2.7-linux-x86_64.egg
error: libNeuroML 0.1.9.1 is installed but libNeuroML>=0.2.5 is required by set(['pyNeuroML'])

Create tests to catch performance regressions in specific functions

We have been exploring writing tests for catching performance regressions in PyOpenWorm and ChannelWorm.

We need to first decide which functions should be tested for performance and then define reference behavior. The simplest way is to check the performance relative to some simple computation, and later we can have a more sophisticated system for tracking performance and catching regressions.

The bare minimum to close this issue is a file called, e.g. PerformanceTests.py, with a single test and docstrings.

@travs

Document the tests in c302

Add docstrings to each test class that describe what the test is doing as well as adding a README.md to the tests/ directory.

Validate two tests of c302 connectivity using SciUnit

Test of functionality to make sure that any pair of neurons that are structurally connected are functionally influencing each other when simulated (both gap junctions and synapses).

  • Implement the two tests
  • Add to the standard tests suite being run with SciUnit

@ahrasheed let's discuss this at the hackathon! Can you link to the similar past work you've done?

@rgerkin this will be another place to come up with capabilities for SciUnit

Replace the _GJ .nml files with an "innexin" model

The _GJ generated .nml files are present in the generatedNeuroML2 directory. Worse, they don't have implementations so the dynamics make no sense. We should replace them all with some kind of "innexin". This also means modifying celegans.net.xml

  • Modify celegans.net.xml anywhere there is a reference to some _GJ "synapse", change to "innexin"
  • Identify a NeuroML gap junction model with actual dynamics that we can use for the time being as a "mock innexin"
  • Create an "innexin.nml" and use the gap junction model for its contents
  • test by running c302 with cells connected by innexins that dynamics actually appear.

@pgleeson -- is there a better way than modifying the files directly at this point? Should we instead modify some script that creates the file -- I have lost track if RegenerateConnectome.py does this.

'No module named airspeed' when running test.sh under c302 first time

unknown1040f3847b74:c302 slarson$ ./test.sh
Traceback (most recent call last):
File "c302_A.py", line 1, in
from c302 import generate
File "/Users/slarson/Documents/CElegansNeuroML/CElegans/pythonScripts/c302/c302.py", line 15, in
import airspeed
ImportError: No module named airspeed

Worse yet, when trying to install it, I got this:

unknown1040f3847b74:c302 slarson$ pip install airspeed
Downloading/unpacking airspeed
Could not find a version that satisfies the requirement airspeed (from versions: 0.2dev-20131105, 0.4.1dev-20131108, 0.4.2dev-20131111, 0.4dev-20131106)
Cleaning up...
No distributions matching the version for airspeed

According to this the message "Could not find a version that satisfies the requirement airspeed" is:

Starting with v1.4, pip will only install stable versions as specified by PEP426 by default.

I get that I can go ahead and install it using pip install airspeed --pre but maybe we shouldn't be using airspeed if there won't be a good way to auto install it? How important is it?

What am I doing wrong?

@pgleeson, I am trying to run c302.
I am getting this and I am not sure what I am missing:

  File "c302_A.py", line 3, in <module>
    import parameters_A as params
  File "/Users/matteocantarelli/Documents/Development/MetaCellWorkspace/CElegansNeuroML/CElegans/pythonScripts/c302/parameters_A.py", line 1, in <module>
    from neuroml import IafCell
ImportError: cannot import name IafCell

I have libNeuroML==0.1.9.1 installed.
Also before getting to this point I had to install the following python libraries, which was not documented, did I do something wrong?

airspeed
jsonpickle
numexpr
tables
Cython
xlrd

"ImportError: cannot import name IafCell" when running test.sh under c302

unknown1040f3847b74:c302 slarson$ ./test.sh
Traceback (most recent call last):
File "c302_A.py", line 3, in
import parameters_A as params
File "/Users/slarson/Documents/CElegansNeuroML/CElegans/pythonScripts/c302/parameters_A.py", line 1, in
from neuroml import IafCell
ImportError: cannot import name IafCell

I am using the latest version of libNeuroML built from its current development branch. What version should I be using @pgleeson ?

Problem with NeuroML loaders and individual cell .nml

When I try running the c302_A.py, I had an error:
Not a valid NeuroML 2 doc: (<type 'exceptions.AttributeError'>, AttributeError('nsmap',), <traceback object at 0x10cf053f8>)

After doing some debugging it seems that the individual morphology files of the cells cannot be read for me.

cell_file = '../../generatedNeuroML2/%s.nml'%cell
Any thoughts?

Make OpenSourceBrain's visualization of this repo include Hive Plots

This should tie together some recent issues that have come up. Based on what @tarelli said (openworm/org.geppetto.docs#32) on the idea of using the widgets:

Geppetto is meant to be a platform integrated with data/model repos rather than covering the full life cycle

it occurs to me that in order to make it easy to have Geppetto's hive plots (openworm/OpenWorm#89) be accessible to all, that we should try to go through OpenSourceBrain's view of this repo, which reuses Geppetto behind the scenes.

So the question for this task is, what modifications do we need to make to this repo so that when we go to visualize the network (which by the way doesn't seem to be working right now? cc:@pgleeson ) we get the lovely connectivity widget set up by default?

And the answer to this possibly can get included in improvements to the Geppetto docs (openworm/org.geppetto.docs#32) to boot.

cc: @borismarin @gidili

Running OpenWorm simulations on SpiNNaker

A good candidate for testing OW simulations, and c302 in particular on the SpiNNaker platform would be this:

c302_A_Social.nml

It's the lowest level of complexity for the c302 model (params A: integrate & fire cells), but would be a good first atteppt to get OW simulations working on SpiNNaker.

This would require some support for the SpiNNaker code generation toolchain to support NeuroML/LEMS. Unfortunately this model can't be fully converted to PyNN, as it has double exponential synapses. Also, if this can't be run on SpiNNaker, none of the other more realistic networks (params B-D) would be supported. The corresponding LEMS file gives the simulation info (what to record, run time etc.)

CC @Huitzilo @slarson

Can't get NEURON to open hoc file generated from PVDL morphology

This was reported by a contributor:

I managed to make the network simulation work and I also generated NEURON files for the morphology from the NeuroML. The problem I get is that neuron doesn’t seem to manage to open these hoc file for the PVDL neuron as it seems the procedure is too big for it to run… I am wondering if there’s a way around that.

Change the path for c302tuner.py

Trying to double check this code ...
I guess the path for this script should be changed :)

if not os.path.isfile('c302.py'):
    print('This script should be run from dir: CElegansNeuroML/CElegans/pythonScripts/c302')
    exit()

Remove Glutamate_GJ etc in neuroConstruct project

These names have been given to the "neurotransmitter" in the XL spreadsheet for gap junctions, e.g.

AIAL ASIL GapJunction 2 Acetylcholine_GJ

However, this only means: There are 2 gap junction connections between AIAL and ASIL (and AIAL's chemical synapses' neurotransmitter is Acetylcholine)

Thankfully there is an equivalent entry for the other direction too:

ASIL AIAL GapJunction 2 Glutamate_GJ

These should only be added as one gap junction connection in the nC project between AIAL and ASIL with 2 connections.

As a first approximation all GJ connections can have the same strength, set by a new Cell Mechanism GapJunction (as opposed to each connection having a cell mechanism Acetylcholine_GJ etc.)

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.