Skip to content

COnstraint-Based Reconstruction and Analysis toolbox

License

Notifications You must be signed in to change notification settings

wbryant/cobratoolbox

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

For convenience, we provide the SBMLToolbox 4.1.0, and glpk_mex in external/toolboxes libSBML-5.13.0-matlab in io/utilities for Mac OS X 10.6 or later (64-bit), GNU/Linux Ubuntu 10.0 (64-bit), and Microsoft Windows 7 (64-bit).  If you do not wish to use these items please delete the directories.  If you require these external libraries for other architectures please ask google or visit their respective websites.


From MATLAB, run

  initCobraToolbox


NOTE: If you do not have gurobi_mex and tomlab installed on your machine, you will get some warnings and some errors.  The COBRA Toolbox will try to use glpk if it cannot find gurobi for LP / MILP.  To solve any NLP problems you need tomlab_snopt.

After running initCobraToolbox, run
  testAll
to see what functions will work with your current configuration.  Note, it is likely that one or more functions will not work unless you have  tomlab with snopt installed.


Citation policy: 

When citing The COBRA Toolbox, it is important to cite the original paper where an algorithm was first reported, as well as its implementation in The COBRA Toolbox. This is important, because the objective of The COBRA Toolbox is to amalgamate and integrate the functionality of a wide range of COBRA algorithms and this will be undermined if contributors of new algorithms do not get their fair share of citations. The following is one example how to approach this within the methods section of a paper (not the supplemental material please): 
"To generate a context-specific model the FASTCORE algorithm [1], implemented in The COBRA Toolbox [2], was employed." 
[1] = Vlassis N, Pacheco MP, Sauter T (2014) Fast Reconstruction of Compact Context-Specific Metabolic Network Models. PLoS Comput Biol 10(1): e1003424. 
[2] = Schellenberger J, Que R, Fleming RMT, Thiele I, Orth JD, Feist AM, Zielinski DC, Bordbar A, Lewis NE, Rahmanian S, Kang J, Hyduke DR, Palsson BØ. 2011 Quantitative prediction of cellular metabolism with constraint-based models: the COBRA Toolbox v2.0. Nature Protocols 6:1290-1307. 


SBML-FBCv2 update note:


The COBRA toolbox supports reading SBML with FBC-v2 files and writing COBRA-Matlab structures to SBML-FBCv2 files. Two COBRA functions, "io/readCbModel.m" and "io/writeCbModel.m”, were updated  in 04/2016 to support the input and output of COBRA models in the SBML-FBCv2 files. 

The "io/readCbModel.m" function is dependent on another function "io/utilities/readSBML.m" to use libSBML library (http://sbml.org/Software/libSBML), to parse a SBML-FBCv2 file into a COBRA-Matlab structure. The "io/readCbModel.m" function is backward compatible with older SBML versions.  A list of fields of a COBRA structure is described in a Excel spreadsheet  "io/COBRA_structure_fields.xlsx" . While some fields are necessary for a COBRA model, others are not.

The ""io/writeCbModel" function relies on another function "io/utilities/writeSBML.m" to convert a COBRA- Matlab structure into a libSBML-Matlab structure and then call libSBML to export a FBCv2 file. The current version of the ""io/writeSBML.m" does NOT require the SBML toolbox (http://sbml.org/Software/SBMLToolbox). 

1) When reading some old COBRA SBML files, there could be some warning messages in the command window, which are probably caused by the lack of some reconstruction information (e.g., metabolite charges) in the SBML files. It is safe to ignore the messages.

 2) When exporting a COBRA Matlab structure to an FBC file, it is usually required that the objective coefficient vector (the c field) of the COBRA model structure is not all zeros  (i.e., at least one objective function is specified), which is demanded by the FBC extension.

If an SBML-FBCv2 file is exported from a COBRA Matlab structure without an objective function defined, validation of the SBML-FBCv2 file on BiGG validator (http://bigg.ucsd.edu/validator/app) may give a warning.

Solutions to some potential issues with reading/writing FBC files.

1) Ensure there are NO multiple versions of COBRA toolbox on the Matlab path. 

2) Currently the latest libSBML 5.13.0 supports FBCv2 extension. Ensure the old versions of libSBML Matlab bindings are NOT on the Matlab path.

3) Validate the problematic FBC file using the online SBML validator (http://sbml.org/validator/) and BiGG validator (http://bigg.ucsd.edu/validator/app).

If none of these troubleshooting steps can help identify the issues with your FBC file, please contact Dr. Ronan Fleming (ronan.mt.fleming@gmail.com)


About

COnstraint-Based Reconstruction and Analysis toolbox

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • MATLAB 96.4%
  • Python 2.1%
  • Perl 1.5%