本文整理汇总了Python中neuro_object.NeuroObject._creationScriptParams方法的典型用法代码示例。如果您正苦于以下问题:Python NeuroObject._creationScriptParams方法的具体用法?Python NeuroObject._creationScriptParams怎么用?Python NeuroObject._creationScriptParams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类neuro_object.NeuroObject
的用法示例。
在下文中一共展示了NeuroObject._creationScriptParams方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _creationScriptParams
# 需要导入模块: from neuro_object import NeuroObject [as 别名]
# 或者: from neuro_object.NeuroObject import _creationScriptParams [as 别名]
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)
示例2: _creationScriptParams
# 需要导入模块: from neuro_object import NeuroObject [as 别名]
# 或者: from neuro_object.NeuroObject import _creationScriptParams [as 别名]
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)
示例3: _creationScriptParams
# 需要导入模块: from neuro_object import NeuroObject [as 别名]
# 或者: from neuro_object.NeuroObject import _creationScriptParams [as 别名]
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)
示例4: _creationScriptParams
# 需要导入模块: from neuro_object import NeuroObject [as 别名]
# 或者: from neuro_object.NeuroObject import _creationScriptParams [as 别名]
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)
示例5: _creationScriptParams
# 需要导入模块: from neuro_object import NeuroObject [as 别名]
# 或者: from neuro_object.NeuroObject import _creationScriptParams [as 别名]
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)
示例6: _creationScriptParams
# 需要导入模块: from neuro_object import NeuroObject [as 别名]
# 或者: from neuro_object.NeuroObject import _creationScriptParams [as 别名]
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)
示例7: _creationScriptParams
# 需要导入模块: from neuro_object import NeuroObject [as 别名]
# 或者: from neuro_object.NeuroObject import _creationScriptParams [as 别名]
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)
示例8: _creationScriptParams
# 需要导入模块: from neuro_object import NeuroObject [as 别名]
# 或者: from neuro_object.NeuroObject import _creationScriptParams [as 别名]
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)
示例9: _creationScriptParams
# 需要导入模块: from neuro_object import NeuroObject [as 别名]
# 或者: from neuro_object.NeuroObject import _creationScriptParams [as 别名]
def _creationScriptParams(self, scriptRefs):
args, keywords = NeuroObject._creationScriptParams(self, scriptRefs)
args.insert(0, scriptRefs[self.muscle.networkId])
return (args, keywords)