modelmage :: model :: Model :: Class Model
[hide private]
[frames] | no frames]

Class Model

source code

Instance Methods [hide private]
 
__init__(self, document=None, filename=None, history=None) source code
 
getSbmlDocument(self) source code
 
setSbmlDocument(self, document) source code
 
getIdNameMap(self) source code
 
getNameIdMap(self) source code
 
getStoich(self) source code
 
setStoich(self, pair, stoich) source code
 
getGraph(self) source code
none
__buildGraph(self)
Reads a model and returns a directed bipartite graph containing the reactions and species in the file.
source code
({str}{str})
__buildMaps(self, model)
Creates the dicts for the mapping of species to names and the other way round.
source code
[str]
getModelElement(self, element='Species', attr='id')
Returns the given attributes of the given type of elements.
source code
([string],[string])
inspectKineticLaw(self, reaction, species, globalParameters)
Examines the formula of a kinetic law and returns lists of the substrates and parameters.
source code
 
writeSBML(self, filename)
Writes SBML document to a file and automatically determines the filename if wanted.
source code
 
getNewFilename(self, base=None) source code
sbml.SBMLDocuments
readSBML(self, filename, verbose=False)
Reads SBML document from a file or a string and checks if the document is consistent.
source code
Class Variables [hide private]
  __sbmlDocument = None
  __graph = None
  history = None
  filename = None
  __idNameMap = {}
  __nameIdMap = {}
  __stoich = {}
  reactionId = {}
  speciesId = {}
  functions = []
  reactionFunctions = {}
  reactionSubPar = {}
Method Details [hide private]

__buildMaps(self, model)

source code 

Creates the dicts for the mapping of species to names and the other way round.

Returns: ({str}{str})
Dicts that map ids to names and the other way round. The maps include species, reactions and parameters.

getModelElement(self, element='Species', attr='id')

source code 

Returns the given attributes of the given type of elements.

Returns: [str]
list of attributes

inspectKineticLaw(self, reaction, species, globalParameters)

source code 

Examines the formula of a kinetic law and returns lists of the substrates and parameters.

Returns: ([string],[string])
Tupel of lists of substrates/modifiers and parameters

writeSBML(self, filename)

source code 

Writes SBML document to a file and automatically determines the filename if wanted.

Parameters:
  • filename (str) - the base of the filename, removed will be added to this

readSBML(self, filename, verbose=False)

source code 

Reads SBML document from a file or a string and checks if the document is consistent.

Parameters:
  • filename (str) - the path to the file which should be read
Returns: sbml.SBMLDocuments
the SBML document which was contained in the file