Ejemplo n.º 1
0
 def _creationScriptParams(self, scriptRefs):
     args, keywords = NeuroObject._creationScriptParams(self, scriptRefs)
     if self.modality is not None:
         keywords[
             'modality'] = 'library.modality(\'' + self.modality.identifier.replace(
                 '\\', '\\\\').replace('\'', '\\\'') + '\')'
     return (args, keywords)
Ejemplo n.º 2
0
 def _creationScriptParams(self, scriptRefs):
     args, keywords = NeuroObject._creationScriptParams(self, scriptRefs)
     neurite2 = list(self._neurites)[1]
     if neurite2.networkId not in scriptRefs:
         neurite2 = neurite2.root
     args.insert(0, scriptRefs[neurite2.networkId])
     return (args, keywords)
Ejemplo n.º 3
0
 def _creationScriptParams(self, scriptRefs):
     args, keywords = NeuroObject._creationScriptParams(self, scriptRefs)
     args.insert(0, scriptRefs[self.region.networkId])
     if self.sendsOutput is not None:
         keywords['sendsOutput'] = str(self.sendsOutput)
     if self.receivesInput is not None:
         keywords['receivesInput'] = str(self.receivesInput)
     return (args, keywords)
Ejemplo n.º 4
0
 def _creationScriptParams(self, scriptRefs):
     args, keywords = NeuroObject._creationScriptParams(self, scriptRefs)
     if self.parentRegion is not None:
         keywords['parentRegion'] = '' + scriptRefs[self.parentRegion.networkId]
     if self.ontologyTerm is not None:
         ontologyId = str(self.ontologyTerm.ontology.identifier).replace('\\', '\\\\').replace('\'', '\\\'')
         termId = str(self.ontologyTerm.identifier).replace('\\', '\\\\').replace('\'', '\\\'')
         keywords['ontologyTerm'] = 'library.ontology(\'%s\').findTerm(name = \'%s\')' % (ontologyId, termId)
     return (args, keywords)
Ejemplo n.º 5
0
 def _creationScriptParams(self, scriptRefs):
     args, keywords = NeuroObject._creationScriptParams(self, scriptRefs)
     args.insert(0, scriptRefs[self.region2.networkId])
     if self.region1Projects != True:
         keywords['knownProjection'] = str(self.region1Projects)
     elif self.region2Activation is not None:
         keywords['activation'] = self.region2Activation
     if self.region2Projects != None:
         keywords['bidirectional'] = str(self.region2Projects)
     elif self.region1Activation is not None:
         keywords['backActivation'] = self.region1Activation
     return (args, keywords)
Ejemplo n.º 6
0
 def _creationScriptParams(self, scriptRefs):
     args, keywords = NeuroObject._creationScriptParams(self, scriptRefs)
     postRefs = []
     for postPartner in self.postSynapticPartners:
         if postPartner in scriptRefs:
             postRefs.append(scriptRefs[postPartner.networkId])
         else:
             postRefs.append(scriptRefs[postPartner.root.networkId])
     if len(postRefs) == 1:
         args.insert(0, postRefs[0])
     else:
         args.insert(0, '(' + ', '.join(postRefs) + ')')
     return (args, keywords)
Ejemplo n.º 7
0
 def _creationScriptParams(self, scriptRefs):
     args, keywords = NeuroObject._creationScriptParams(self, scriptRefs)
     if self.neuronClass is not None:
         keywords['neuronClass'] = 'library.neuronClass(\'' + self.neuronClass.identifier + '\')'
     if len(self.neurotransmitters) > 0:
         ntCalls = []
         for neurotransmitter in self.neurotransmitters:
             ntCalls.append('library.neurotransmitter(\'' + neurotransmitter.identifier + '\')')
         keywords['neurotransmitters'] = '[' + ', '.join(ntCalls) + ']'
     if self.activation is not None:
         keywords['activation'] = '\'' + self.activation + '\''  # TODO: this should be 'NeuralActivation.' + self.activation
     if len(self._functions) > 0:
         keywords['functions'] = '[Neuron.Function.' + ', Neuron.Function.'.join(self._functions) + ']'
     if self.polarity is not None:
         keywords['polarity'] = 'Neuron.Polarity.' +  self.polarity
     if self.region is not None:
         keywords['region'] = scriptRefs[self.region.networkId]
     return (args, keywords)
Ejemplo n.º 8
0
 def _creationScriptParams(self, scriptRefs):
     args, keywords = NeuroObject._creationScriptParams(self, scriptRefs)
     if self.neuronClass is not None:
         keywords['neuronClass'] = 'library.neuronClass(\'' + self.neuronClass.identifier + '\')'
     if len(self.neurotransmitters) > 0:
         ntCalls = []
         for neurotransmitter in self.neurotransmitters:
             ntCalls.append('library.neurotransmitter(\'' + neurotransmitter.identifier + '\')')
         keywords['neurotransmitters'] = '[' + ', '.join(ntCalls) + ']'
     if self.activation is not None:
         keywords['activation'] = '\'' + self.activation + '\''  # TODO: this should be 'NeuralActivation.' + self.activation
     if len(self._functions) > 0:
         keywords['functions'] = '[Neuron.Function.' + ', Neuron.Function.'.join(self._functions) + ']'
     if self.polarity is not None:
         keywords['polarity'] = 'Neuron.Polarity.' +  self.polarity
     if self.region is not None:
         keywords['region'] = scriptRefs[self.region.networkId]
     return (args, keywords)
Ejemplo n.º 9
0
 def _creationScriptParams(self, scriptRefs):
     args, keywords = NeuroObject._creationScriptParams(self, scriptRefs)
     if self.modality is not None:
         keywords['modality'] = 'library.modality(\'' + self.modality.identifier.replace('\\', '\\\\').replace('\'', '\\\'') + '\')'
     return (args, keywords)
Ejemplo n.º 10
0
 def _creationScriptParams(self, scriptRefs):
     args, keywords = NeuroObject._creationScriptParams(self, scriptRefs)
     if self._pathway is not None:
         keywords["pathway"] = scriptRefs[self._pathway.networkId]
     return (args, keywords)
Ejemplo n.º 11
0
 def _creationScriptParams(self, scriptRefs):
     args, keywords = NeuroObject._creationScriptParams(self, scriptRefs)
     args.insert(0, scriptRefs[self.muscle.networkId])
     return (args, keywords)
Ejemplo n.º 12
0
 def _creationScriptParams(self, scriptRefs):
     args, keywords = NeuroObject._creationScriptParams(self, scriptRefs)
     args.insert(0, scriptRefs[self.muscle.networkId])
     return (args, keywords)
Ejemplo n.º 13
0
 def _creationScriptParams(self, scriptRefs):
     args, keywords = NeuroObject._creationScriptParams(self, scriptRefs)
     if self._pathway is not None:
         keywords['pathway'] = scriptRefs[self._pathway.networkId]
     return (args, keywords)