Skip to content

Unified data access library for data about the c. elegans anatomy and model for the OpenWorm project

License

Notifications You must be signed in to change notification settings

mwatts15/PyOpenWorm

 
 

Repository files navigation

Build Status

PyOpenWorm

Unified data access library for data about the c. elegans anatomy and model for the OpenWorm project

What does it do?

Allows asking various questions about the c. elegans nervous system.

Basic Usage

  >>>import openworm
  
  # Grabs the representation of the neuronal network
  >>>net = PyOpenWorm.Worm().get_neuron_network()
  >>>net.aneuron('AVAL').type()
  Interneuron
  #show how many gap junctions go in and out of AVAL
  >>>net.aneuron('AVAL').GJ_degree()
  60

More examples

Returns information about individual neurons::

  >>>net.aneuron('AVAL').name()
  AVAL
  #list all known receptors
  >>>net.aneuron('AVAL').receptors()
  ['GLR-1', 'NMR-1', 'GLR-4', 'GLR-2', 'GGR-3', 'UNC-8', 'GLR-5', 'NMR-2']
  >>>net.aneuron('DD5').type()
  motor
  >>>net.aneuron('PHAL').type()
  sensory
  #show how many chemical synapses go in and out of AVAL
  >>>net.aneuron('AVAL').Syn_degree()
  74

Returns the list of all neurons::

  >>>len(net.neurons())
  302

Returns the list of all muscles::

  >>>'MDL08' in PyOpenWorm.Worm().muscles()
  True

Returns provenance information providing evidence about facts::

  >>>ader = PyOpenWorm.Neuron('ADER')
  >>>ader.receptors()
  ['ACR-16', 'TYRA-3', 'DOP-2', 'EXP-1']
  #look up what reference says this neuron has a receptor EXP-1
  >>>ader.get_reference(0,'EXP-1')
  ['http://dx.doi.org/10.100.123/natneuro']

Returns the c. elegans connectome represented as a NetworkX graph::

  >>>net.as_networkx()
  <networkx.classes.digraph.DiGraph object at 0x10f28bc10>

Why is this necessary?

There are many different useful ways to compute with data related to the worm. Different data structures have different strengths and answer different questions. For example, a NetworkX representation of the connectome as a complex graph enables questions to be asked about first and second nearest neighbors of a given neuron. In contrast, an RDF semantic graph representation is useful for reading and writing annotations about multiple aspects of a neuron, such as what papers have been written about it, multiple different properties it may have such as ion channels and neurotransmitter receptors. A NeuroML representation is useful for answering questions about model morphology and simulation parameters. Lastly, a Blender representation is a full 3D shape definition that can be used for calculations in 3D space. Further representations regarding activity patterns such as Neo or simulated activity can be considered as well.

Using these different representations separately leads to ad hoc scripting for for each representation. This presents a challenge for data integration and consolidation of information in 'master' authoritative representations. By creating a unified data access layer, different representations can become encapsulated into an abstract view. This allows the user to work with objects related to the biological reality of the worm. This has the advantage that the user can forget about which representation is being used under the hood.

The worm itself has a unified sense of neurons, networks, muscles, ion channels, etc and so should our code.

Installation

git clone https://github.com/slarson/PyOpenWorm.git
cd PyOpenWorm
python setup.py install

Running tests

After checking out the project, tests can be run on the command line with::

python -m unittest discover -s tests

About

Unified data access library for data about the c. elegans anatomy and model for the OpenWorm project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.9%
  • Shell 0.1%