Esempio n. 1
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())
Esempio n. 2
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)
Esempio n. 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())
Esempio n. 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)
Esempio n. 5
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
Esempio n. 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
Esempio n. 7
0
 def __init__(self, node, parent = None):
     Element.__init__(self, node, parent = parent)
     self.Species = {}
Esempio n. 8
0
 def __str__(self):
     return Element.__str__(self)[:-1] + '\n\t' + str(self.GetStoich())
Esempio n. 9
0
 def __str__(self):
     return Element.__str__(self)[:-1] + '\n\t' + str(self.GetStoich())
Esempio n. 10
0
 def __init__(self, node, parent=None):
     Element.__init__(self, node, parent=parent)
     self.Species = {}