checkDatabaseIDs(model, results)

Checks the model for validity of database identifiers


results = checkDatabaseIDs(model,results)


model: a structure that represents the COBRA model. results: the results structure for this test


results: a struct with problematic database ids added.

checkPresentFields(fieldProperties, model, results)

Check the model fields for consistency with the given fieldProperties and update the results struct. The desired properties of each field are described here: And computationally defined here: ‘’


results = checkPresentFields(fieldProperties,model, results)

fieldProperties: field properties as obtained by


model: a structure that represents the COBRA model. results: the results structure for this test


results: The updated results struct.

verifyModel(model, varargin)

Checks the model for consistency with the COBRA Toolbox

A list of fields of a COBRA structure is described in and defined computationally in: src/base/io/definitions/


results = verifyModel(model, varargin)


model: a structure that represents the COBRA model.

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)


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.


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’})


try to verify if a given rule string is syntactically correct USAGE:

tf = verifyRuleSyntax(ruleString)


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


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