示例#1
0
文件: SBML.py 项目: kierzek/MUFINS
 def __init__(self, node, parent = None):
     Element.__init__(self, node, parent = parent)
     attrs = node.getElementsByTagName('p')#for FORMULA and CHARGE if there is <note>
     for attr in attrs:
         child = attr.firstChild
         data =  child.data
         key, val = data.split(':', 1)
         self[str(key.strip()).upper()] = str(val.strip())
示例#2
0
文件: SBML.py 项目: kierzek/MUFINS
 def __init__(self, ifile):
     self.Doc = xml.dom.minidom.parse(ifile)
     modelnode = self.Doc.getElementsByTagName('model')[0]
     Element.__init__(self, modelnode)
     self.Compartments = self.ParseElementsByTagName('compartment', Compartment)
     self.SpeType = self.ParseElementsByTagName('speciesType', Species)#w# v4l2
     self.Species = self.ParseElementsByTagName('species', Species)
     self.Reactions = self.ParseElementsByTagName('reaction', Reaction)
示例#3
0
 def __init__(self, node, parent=None):
     Element.__init__(self, node, parent=parent)
     attrs = node.getElementsByTagName(
         'p')  #for FORMULA and CHARGE if there is <note>
     for attr in attrs:
         child = attr.firstChild
         data = child.data
         key, val = data.split(':', 1)
         self[str(key.strip()).upper()] = str(val.strip())
示例#4
0
 def __init__(self, ifile):
     self.Doc = xml.dom.minidom.parse(ifile)
     modelnode = self.Doc.getElementsByTagName('model')[0]
     Element.__init__(self, modelnode)
     self.Compartments = self.ParseElementsByTagName(
         'compartment', Compartment)
     self.SpeType = self.ParseElementsByTagName('speciesType',
                                                Species)  #w# v4l2
     self.Species = self.ParseElementsByTagName('species', Species)
     self.Reactions = self.ParseElementsByTagName('reaction', Reaction)
示例#5
0
文件: SBML.py 项目: kierzek/MUFINS
 def __init__(self, node, parent = None):
     Element.__init__(self, node, parent = parent)
     assocs = node.getElementsByTagName('p') or node.getElementsByTagName('html:p')#'html:p' or 'p' for association
     for assoc in assocs:
         child = assoc.firstChild
         data =  child.data
         key, val = data.split(':',1)
         self[str(key.strip()).upper()] = str(val.strip())
     self.Stoich = self.ParseStoich(node)
     self.ParseBounds(node)
     self.ParseModifiers(node)#w# get gene rule for iHuman1512 model
示例#6
0
 def __init__(self, node, parent=None):
     Element.__init__(self, node, parent=parent)
     assocs = node.getElementsByTagName('p') or node.getElementsByTagName(
         'html:p')  #'html:p' or 'p' for association
     for assoc in assocs:
         child = assoc.firstChild
         data = child.data
         key, val = data.split(':', 1)
         self[str(key.strip()).upper()] = str(val.strip())
     self.Stoich = self.ParseStoich(node)
     self.ParseBounds(node)
     self.ParseModifiers(node)  #w# get gene rule for iHuman1512 model
示例#7
0
文件: SBML.py 项目: kierzek/MUFINS
 def __init__(self, node, parent = None):
     Element.__init__(self, node, parent = parent)
     self.Species = {}
示例#8
0
文件: SBML.py 项目: kierzek/MUFINS
 def __str__(self):
     return Element.__str__(self)[:-1] + '\n\t' + str(self.GetStoich())
示例#9
0
 def __str__(self):
     return Element.__str__(self)[:-1] + '\n\t' + str(self.GetStoich())
示例#10
0
 def __init__(self, node, parent=None):
     Element.__init__(self, node, parent=parent)
     self.Species = {}