Module modelmage :: Class ModelMaGe
[hide private]
[frames] | no frames]

Class ModelMaGe

source code

This class is the main interface for all the other classes. It is instantiated by calling the module from the command line and by the web interface. The methods provided by this class represent the main functionalities of the whole program.

Instance Methods [hide private]
 
__init__(self, model=None, filename=None, verbose=False, output='')
The class can be initialized with various preset parameters.
source code
 
setMasterModel(self, SBMLmodel=None, filename=None)
This function sets the master model of the ModelMage instance.
source code
 
getMasterSBMLFunctions(self, mastermodel)
This function produces the dictionary {self.functionsIdName:{function_id : function_name}}
source code
 
getMasterModel(self)
Returns the master model of the object.
source code
 
getFilename(self)
Returns the filename of the object.
source code
list
getMasterModelSpecies(self)
Returns a list of species.
source code
list
getMasterModelReactions(self)
Returns a list of reactions.
source code
list
transferData(self, expDataFiles)
transfer the experimental data in the right place, so that the process of parameter estimation can be properly executed
source code
 
generate(self, remove=None, kinetics=None, macros=None, useMacros=False, show=False)
Generates the candidate models from the master model.
source code
None
Update_tasks_cps(self, modelFunctionsIdName, nameKineticNameMap, ReverseMacros, idNameMap, inputCPS)
Updates tasks in cps files, so they can be used for parameter estimation.
source code
 
getFunction_Id_Name_XML(self, modelName, idNameReactions)
This function constructs a dictionary with the keys of reaction_id and the values of corresponding function_id
source code
 
getCandidateSBMLFunctions(self, candidateName)
This function produces the dictionary {self.functionsIdName:{function_id : function_name}}
source code
 
estimateParameters(self)
This method starts a parameter estimation for all created output files.
source code
 
discriminate(self)
This method returns a ranking of the estimated models that is produced by Discriminator
source code
Class Variables [hide private]
  __masterModel = None
  verbose = True
Method Details [hide private]

__init__(self, model=None, filename=None, verbose=False, output='')
(Constructor)

source code 

The class can be initialized with various preset parameters. Depending on the calling class. This way it can be used by the web interface as well as well as from command line.

Parameters:
  • model (Model) - a model that can be passed directly to the class and is set as the master model
  • filename (str) - the filename of the file that was passed as a model.
  • verbose (bool) - switch that decides if the output on the commandline is verbose
  • output (str) - path and name of the output files

setMasterModel(self, SBMLmodel=None, filename=None)

source code 

This function sets the master model of the ModelMage instance. The model can be given as an SBML file of a Model object.

Parameters:
  • SBMLmodel (Model) - a model object that can be set as the master model
  • filename (str) - filename of the master model

getMasterSBMLFunctions(self, mastermodel)

source code 

This function produces the dictionary {self.functionsIdName:{function_id : function_name}}

Parameters:
  • mastermodel (str) - filename of the master model

getMasterModelSpecies(self)

source code 

Returns a list of species.

Returns: list
list of species

getMasterModelReactions(self)

source code 

Returns a list of reactions.

Returns: list
list of reactions

transferData(self, expDataFiles)

source code 

transfer the experimental data in the right place, so that the process of parameter estimation can be properly executed

Returns: list
list of experimental files

generate(self, remove=None, kinetics=None, macros=None, useMacros=False, show=False)

source code 

Generates the candidate models from the master model.

Parameters:
  • remove (str) - logical combination of elements that shall be removed
  • kinetics (str) - kinetics that shall be exchanged
  • macros (map) - contains the keys of candidate model name and values of remove combinations
  • useMacros (bool) - flag that tells if the user specified custom names for the models
  • show (bool) - for -s --show option

Update_tasks_cps(self, modelFunctionsIdName, nameKineticNameMap, ReverseMacros, idNameMap, inputCPS)

source code 

Updates tasks in cps files, so they can be used for parameter estimation.

Returns: None
None

getFunction_Id_Name_XML(self, modelName, idNameReactions)

source code 

This function constructs a dictionary with the keys of reaction_id and the values of corresponding function_id

Parameters:
  • modelName (str) - filename of the master model
  • idNameReactions (dictionary) - {reaction_id : reaction_name}
Returns:
a map of { functionReactionMap:{reaction_id : function_id} }used by def assignFunctionNames() in generator.py

getCandidateSBMLFunctions(self, candidateName)

source code 

This function produces the dictionary {self.functionsIdName:{function_id : function_name}}

Parameters:
  • candidateName (str) - filename of the model