PyOpenWorm.neuron module

class PyOpenWorm.neuron.ConnectionProperty(**kwargs)[source]

Bases: PyOpenWorm.pProperty.Property

A representation of the connection between neurons. Either a gap junction or a chemical synapse

TODO: Add neurotransmitter type. TODO: Add connection strength

get(self, pre_post_or_either='pre', **kwargs)[source]

Get a list of connections associated with the owning neuron.

Parameters:
pre_post_or_either: str

What kind of connection to look for. ‘pre’: Owner is the source of the connection ‘post’: Owner is the destination of the connection ‘either’: Owner is either the source or destination of the connection

Returns:
list of Connection
set(self, conn, **kwargs)[source]

Add a connection associated with the owner Neuron

Parameters:
conn : PyOpenWorm.connection.Connection

connection associated with the owner neuron

Returns:
A PyOpenWorm.neuron.Connection
class PyOpenWorm.neuron.Neighbor(**kwargs)[source]

Bases: PyOpenWorm.pProperty.Property

get(self, **kwargs)[source]

Get a list of neighboring neurons.

Parameters:
See parameters for PyOpenWorm.connection.Connection
Returns:
list of Neuron
set(self, other, **kwargs)[source]

Set the value of this property

Derived classes must override.

class PyOpenWorm.neuron.Neuron(name=False, **kwargs)[source]

Bases: PyOpenWorm.cell.Cell

A neuron.

See what neurons express some neuropeptide

Example:

# Grabs the representation of the neuronal network
>>> net = P.Worm().get_neuron_network()

# Grab a specific neuron
>>> aval = net.aneuron('AVAL')

>>> aval.type()
set([u'interneuron'])

#show how many connections go out of AVAL
>>> aval.connection.count('pre')
77

>>> aval.name()
u'AVAL'

#list all known receptors
>>> sorted(aval.receptors())
[u'GGR-3', u'GLR-1', u'GLR-2', u'GLR-4', u'GLR-5', u'NMR-1', u'NMR-2', u'UNC-8']

#show how many chemical synapses go in and out of AVAL
>>> aval.Syn_degree()
90
Parameters:
name : string

The name of the neuron.

Attributes:
neighbor : Property

Get neurons connected to this neuron if called with no arguments, or with arguments, state that neuronName is a neighbor of this Neuron

connection : Property

Get a set of Connection objects describing chemical synapses or gap junctions between this neuron and others

GJ_degree(self)[source]

Get the degree of this neuron for gap junction edges only

Returns:total number of incoming and outgoing gap junctions
Return type:int
Syn_degree(self)[source]

Get the degree of this neuron for chemical synapse edges only

Returns:total number of incoming and outgoing chemical synapses
Return type:int
get_incidents(self, type=0)[source]

Get neurons which synapse at this neuron

innexin

Innexin types associated with this neuron

neuropeptide

Name of the gene corresponding to the neuropeptide produced by this neuron

neurotransmitter

Neurotransmitters associated with this neuron

receptor

The receptor types associated with this neuron

receptors

Alias to py:attr:receptor

type

The neuron type (i.e., sensory, interneuron, motor)