PyOpenWorm.worm module¶
-
class
PyOpenWorm.worm.Worm(scientific_name=False, **kwargs)[source]¶ Bases:
PyOpenWorm.biology.BiologyTypeA representation of the whole worm.
All worms with the same name are considered to be the same object.
Attributes: - neuron_network : ObjectProperty
The neuron network of the worm
- muscle : ObjectProperty
Muscles of the worm
-
defined_augment()[source]¶ This fuction must return False if
identifier_augment()would raise anIdentifierMissingException. Override it when defining a non-standard identifier for subclasses of DataObjects.
-
get_neuron_network()[source]¶ Return the neuron network of the worm.
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
Returns: An object to work with the network of the worm Return type: PyOpenWorm.Network
-
get_semantic_net()[source]¶ - Get the underlying semantic network as an RDFLib Graph
Returns: A semantic network containing information about the worm Return type: rdflib.ConjunctiveGraph
-
identifier_augment(*args, **kwargs)[source]¶ Override this method to define an identifier in lieu of one explicity set.
One must also override
defined_augment()to return True whenever this method could return a valid identifier.IdentifierMissingExceptionshould be raised if an identifier cannot be generated by this method.Raises: - IdentifierMissingException