Modelverification

checkDatabaseIDs(model, results)[source]

Checks the model for validity of database identifiers

USAGE

results = checkDatabaseIDs (model,results)

INPUT
  • model – a structure that represents the COBRA model.

  • results – the results structure for this test

OUTPUT

results – a struct with problematic database ids added.

checkPresentFields(fieldProperties, model, results)[source]

Check the model fields for consistency with the given fieldProperties and update the results struct. The desired properties of each field are described here: https://github.com/opencobra/cobratoolbox/blob/master/docs/source/notes/COBRAModelFields.md And computationally defined here: ‘COBRA_structure_fields.tab’

USAGE

results = checkPresentFields (fieldProperties,model, results)

INPUT
  • fieldProperties – field properties as obtained by getDefinedFieldProperties

  • model – a structure that represents the COBRA model.

  • results – the results structure for this test

OUTPUT

results – The updated results struct.

verifyModel(model, varargin)[source]

Checks the model for consistency with the COBRA Toolbox

A list of fields of a COBRA structure is described in https://github.com/opencobra/cobratoolbox/blob/master/docs/source/notes/COBRAModelFields.md and defined computationally in: src/base/io/definitions/COBRA_structure_fields.tab

USAGE

results = verifyModel (model, varargin)

INPUT

model – a structure that represents the COBRA model.

OPTIONAL INPUT

varargin – varargin describes the additional checks (except the basic check whether a models fields adhere to the field definitions. They are to be provided as ParameterName, Value pairs (e.g. verifyModel(model, ‘massBalance’, true) Options are:

  • ‘massBalance’ (checks for Mass balance if the metFormula Field is present), (Default: false)

  • ‘chargeBalance’ (checks for charge Balance) (Default: false)

  • ‘fluxConsistency’ (checks for reaction flux consistency) (Default: false)

  • ‘stoichiometricConsistency’ (checks for Stoichiometric Consisteny, according to Gevorgyan, Bioinformatics, 2008) (Default: false)

  • ‘deadEndMetabolites’ (metabolites which can either not be produced, or consumed) (Default: false)

  • ‘simpleCheck’ returns false if this is not a valid model and true if it is a valid model, ignored if any other option is selected. (Default: false)

  • ‘requiredFields’ sets the fields which are required, the argument must be firectly followed by the list of required fields. (Default: {‘S’, ‘lb’, ‘ub’, ‘c’, ‘rxns’, ‘mets’, ‘genes’, ‘rules’})

  • ‘checkDatabaseIDs’, check whether the database identifiers in specified fields (please have a look at the documentation), match to the expected patterns for those databases.

  • ‘silentCheck’, do not print any information. Only applies to the model structure check. (default is to print info)

  • ‘restrictToFields’ restricts the check to the listed fields. This will lead to requiredFields being reduced to those fields present in the restricted fields. If an empty cell array is provided no restriction is applied. (default: {})

  • ‘FBAOnly’ checks only fields relevant for FBA (default: false)

OUTPUT

results – a struct containing fields for each requested option and an additional field Errors indicating the problems with the model structure detected by the verifyModel function. Results of additional options are returned in fields with the respective names.

Examples

1) Do a simple Field check with the default required fields. results = verifyModel(model,’simpleCheck’, true) 2) Do a mass balance check in addition to a field check. results = verifyModel(model,’massBalance’, true) 3) do a flux consistency and a mass Balance check. results = verifyModel(model,’fluxConsistency’, true,’massBalance’, true) 4) do a simple check with a specified set of fields. results = verifyModel(model,’simpleCheck’, true,’requiredFields’,{‘S,’lb’,’ub’,’c’})

verifyRuleSyntax(ruleString)[source]

try to verify if a given rule string is syntactically correct :USAGE: tf = verifyRuleSyntax (ruleString)

INPUT

ruleString – The string in rule format (i.e. x(1) | x(2) & x(3) …)

OUTPUT

tf – Whether the given string is evaluateable (i.e. the syntax is correct)