gapFind(model, findNCgaps, verbFlag)[source]

Identifies all blocked metabolites (anything downstream of a gap) in a model. MILP algorithm that finds gaps that may be missed by simple inspection of the S matrix. To find every gap in a model, change the rxn bounds on all exchange reactions to allow uptake of every metabolite.


[allGaps, rootGaps, downstreamGaps] = gapFind(model, findNCgaps, verbFlag)


  • model – a COBRA model

Optional inputs

  • findNCgaps – find no consupmption gaps as well as no production gaps (default false)
  • verbFlag – verbose flag (default false)


  • allGaps – all gaps found by GapFind
  • rootGaps – all root no production (and consumption) gaps
  • downstreamGaps – all downstream gaps

Based on Kumar, V. et al. BMC Bioinformatics. 2007 Jun 20;8:212.

testPathway(model, MetIn, MetOut, AdditionalMetsInorOut, ObjectiveOption)[source]

Allows the user to see if given one metabolite A, downstream metabolite B can be made made. Additional sinks can be added for co-factors if needed A –>–>–>–>–> B


[Flux, FBAsolution, model] = testPathway(model, MetIn, MetOut, AdditionalMetsInorOut, ObjectiveOption)


  • model – COBRA model structure
  • MetIn – The input metabolite(s) (A)
  • MetOut – The output metabolite (B)

Optional inputs

  • AdditionalMetsInorOut – Additional metabolites for which sinks will be added
  • ObjectiveOption – Boolean:
    • 1 = objective will be production of B (default)
    • 0 = use objective in model


  • Flux – The rate of B production
  • FBAsolution – Solution to the FBA problem
  • model – COBRA model with sinks in it