Module modelmage :: Module preparator :: Class kineticHandler
[hide private]
[frames] | no frames]

Class kineticHandler

source code

Handles the input for alternative kinetics form the commandline or from the annotation of the root model.

Instance Methods [hide private]
 
__init__(self) source code
{str:[str]}
getKinetics(self, string, document, macros)
Reads and processes 'string' for alternative kinetics from commandline.
source code
{str:[str]}
__getKineticsFromString(self, string, macros)
Reads different kinetics from the commandline argument -k/--kinetics
source code
{str:[str]}
__getKineticsFromModel(self, document)
Reads different kinetics from the root models annotation and writes them into a dictionary
source code
bool
checkReactionIds(self, ids)
Checks if all given ids have the correct form as it is given in the SBML definition.
source code
list
checkPartOfModel(self, model, ids)
Checks if reaction ids are part of a given model.
source code
 
getInvalidIds(self) source code
 
getNonModelIds(self) source code
Method Details [hide private]

getKinetics(self, string, document, macros)

source code 

Reads and processes 'string' for alternative kinetics from commandline. Or if 'string' is empty reads the kinetics from the annotation of the root model. The string must follow the conventions of the parameter -k: "reaction(kinetic)"

Parameters:
  • string (str) - string of the form "reaction(kinetic)"
  • document (sbml.SBMLDocument) - the SBML document containing the root model
Returns: {str:[str]}
alternate kinetics for each reaction in the root model

__getKineticsFromString(self, string, macros)

source code 

Reads different kinetics from the commandline argument -k/--kinetics

Returns: {str:[str]}
alternate kinetics for each reaction in the root model

__getKineticsFromModel(self, document)

source code 

Reads different kinetics from the root models annotation and writes them into a dictionary

Returns: {str:[str]}
alternate kinetics for each reaction in the root model

checkReactionIds(self, ids)

source code 

Checks if all given ids have the correct form as it is given in the SBML definition.

Parameters:
  • ids (list) - list of ids
Returns: bool
true if all ids match the right pattern, false otherwise

checkPartOfModel(self, model, ids)

source code 

Checks if reaction ids are part of a given model.

Parameters:
  • model (sbml.SBMLModel) - the root model
  • ids (list) - list of ids
Returns: list
list of reactions that are in the model and in 'ids'