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