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