Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

[![Build Status](https://travis-ci.org/openworm/PyOpenWorm.png?branch=master)](https://travis-ci.org/openworm/PyOpenWorm)

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
-----------

```python
>>>import PyOpenWorm

# 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::

```python
>>>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::

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

Returns the list of all muscles::

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


Returns provenance information providing evidence about facts::

```python
>>>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](http://networkx.github.io/documentation/latest/) graph::

```python
>>>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/openworm/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

Metadata

Release files for PyOpenWorm 0.0.1-alpha

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyOpenWorm 0.0.1-alpha
File Size Uploaded Provenance Actions
PyOpenWorm-0.0.1-alpha.tar.gz 9.5 kB Without provenance Details for PyOpenWorm-0.0.1-alpha.tar.gz

Release files / PyOpenWorm-0.0.1-alpha.tar.gz

Download URL PyOpenWorm-0.0.1-alpha.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
efd2cb66c6be72c3136cf451b6eca317c5986249a830b5a47fdec952fc7a738a
BLAKE2b-256 checksum
How to use checksums
36667a5ad28defc0c84803655ce09fe61c3a19e52a3a1772e2c815c31ff20c85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for PyOpenWorm 0.0.1-alpha

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page