Cobratoolbox
The COnstraint-Based Reconstruction and Analysis Toolbox. Documentation:
Install / Use
/learn @opencobra/CobratoolboxREADME
.. raw:: html
.. raw:: html
<h1 align="center"> The COBRA Toolbox<br> COnstraint-Based Reconstruction and Analysis Toolbox </h1>.. raw:: html
<div align="center">.. image:: https://img.shields.io/github/v/release/opencobra/cobratoolbox?label=Version&color=purple :target: https://github.com/opencobra/cobratoolbox/releases :alt: Latest release version
.. raw:: html
</div>.. raw:: html
<div align="center">.. image:: https://img.shields.io/github/actions/workflow/status/opencobra/cobratoolbox/build-and-publish-docs.yml?branch=master&label=CI%20For%20Website :target: https://github.com/opencobra/cobratoolbox/actions/workflows/build-and-publish-docs.yml :alt: CI for building website
.. image:: https://img.shields.io/github/actions/workflow/status/opencobra/cobratoolbox/testAllCI_step2.yml?branch=master&label=CI%20For%20Testing :target: https://github.com/opencobra/cobratoolbox/actions/workflows/testAllCI_step2.yml?query=branch%3Adevelop :alt: testAllCI Step 2 workflow status
.. raw:: html
</div>The COBRA Toolbox is a comprehensive suite of functions for constraint-based modeling of biological networks. It supports the analysis of genome-scale metabolic reconstructions and other constraint-based models in MATLAB.
Resources
- 📘 Installation: https://opencobra.github.io/cobratoolbox/stable/installation.html
- 🎓 Tutorials: https://opencobra.github.io/cobratoolbox/stable/tutorials/index.html
- 💬 Community Support: https://groups.google.com/forum/#!forum/cobra-toolbox
System Requirements and Solver Installation
.. begin-requirements-marker
⚠️ Please follow this guide <https://opencobra.github.io/cobratoolbox/docs/requirements.html>__ in order to configure your system properly.
⚠️ Please make sure you install a compatible solver. Check the compatibility here <https://opencobra.github.io/cobratoolbox/docs/compatibility.html>__.
You may install TOMLAB, IBM ILOG CPLEX, GUROBI, or MOSEK by following these detailed instructions <https://opencobra.github.io/cobratoolbox/docs/solvers.html>__.
.. end-requirements-marker
Installation
.. begin-installation-marker
-
Download this repository (the folder
./cobratoolbox/will be created). You can clone the repository using:.. code-block:: console
$ git clone --depth=1 https://github.com/opencobra/cobratoolbox.git cobratoolbox
⚠️ Please note the
--depth=1in the clone command.
Run this command in Terminal (on macOS and Linux) or in Git Bash (on Windows) — not in MATLAB.
Although not recommended, you can download the repository as acompressed archive <https://github.com/opencobra/cobratoolbox/archive/refs/heads/master.zip>__.
-
Change to the folder
cobratoolbox/and run from MATLAB.. code-block:: matlab
initCobraToolbox
.. end-installation-marker
Tutorials, Documentation, and Support
-
Consult all tutorials in the section |tutorials|. All tutorials can be run from the
/tutorials <https://github.com/opencobra/cobratoolbox/tree/master/tutorials>__ directory. -
All functions are documented in the |latest|.
-
If you need support, please feel free to post your question in our |forum|.
-
Answers to Frequently Asked Questions (FAQ) are
here <https://opencobra.github.io/cobratoolbox/stable/faq.html>__.
How to contribute
.. begin-how-to-contribute-marker
In order to lower the technological barrier to the use of the popular software development tool git, we have developed MATLAB.devTools, a new user-friendly software extension that enables the submission of new COBRA toolbox functions and tutorials.
.. raw:: html
<p align="center"> <img src="https://cdn.jsdelivr.net/gh/opencobra/MATLAB.devTools@e735bd91310e8ef10fab4d3c21833a85bf4b8159/docs/source/_static/img/logo_devTools.png" height="120px" alt="devTools"/> </p>You can install the
MATLAB.devTools <https://github.com/opencobra/MATLAB.devTools>__ from
within MATLAB by typing:
.. code-block:: matlab
>> installDevTools()
💡 Check out MATLAB.devTools <https://github.com/opencobra/MATLAB.devTools>__ – and contribute the smart way!
The official documentation is here <https://opencobra.github.io/MATLAB.devTools/>__.
👉 Contribute to the opencobra/cobratoolbox repository by following these instructions <https://opencobra.github.io/MATLAB.devTools/stable/contribute.html#the-cobra-toolbox>__:
.. code-block:: matlab
>> contribute('opencobra/cobratoolbox');
👉 Contribute to the opencobra/COBRA.tutorials repository by following these instructions <https://opencobra.github.io/MATLAB.devTools/stable/contribute.html#cobra-tutorials>__:
.. code-block:: matlab
>> contribute('opencobra/COBRA.tutorials');
- Please follow the
Style Guide <https://opencobra.github.io/cobratoolbox/docs/styleGuide.html>__. - More information on writing a test is
here <https://opencobra.github.io/cobratoolbox/docs/testGuide.html>__ and a template ishere <https://opencobra.github.io/cobratoolbox/docs/testTemplate.html>__. - More information on formatting the documentation is
here <https://opencobra.github.io/cobratoolbox/docs/documentationGuide.html>__ - A guide for reporting an issue is
here <https://opencobra.github.io/cobratoolbox/docs/issueGuide.html>__.
If you want to use git via the command line interface and need help,
this
guide <https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github>__
or the official GitHub guide <https://help.github.com/articles/creating-a-pull-request/>__
come in handy.
.. end-how-to-contribute-marker
How to cite the COBRA Toolbox
.. begin-how-to-cite-marker
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 v3.0 [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] Laurent Heirendt & Sylvain Arreckx, Thomas Pfau, Sebastian N.
Mendoza, Anne Richelle, Almut Heinken, Hulda S. Haraldsdottir, Jacek
Wachowiak, Sarah M. Keating, Vanja Vlasov, Stefania Magnusdottir,
Chiam Yu Ng, German Preciat, Alise Zagare, Siu H.J. Chan, Maike K.
Aurich, Catherine M. Clancy, Jennifer Modamio, John T. Sauls,
Alberto Noronha, Aarash Bordbar, Benjamin Cousins, Diana C. El
Assal, Luis V. Valcarcel, Inigo Apaolaza, Susan Ghaderi, Masoud
Ahookhosh, Marouen Ben Guebila, Andrejs Kostromins, Nicolas
Sompairac, Hoai M. Le, Ding Ma, Yuekai Sun, Lin Wang, James T.
Yurkovich, Miguel A.P. Oliveira, Phan T. Vuong, Lemmer P. El Assal,
Inna Kuperstein, Andrei Zinovyev, H. Scott Hinton, William A.
Bryant, Francisco J. Aragon Artacho, Francisco J. Planes, Egils
Stalidzans, Alejandro Maass, Santosh Vempala, Michael Hucka, Michael
A. Saunders, Costas D. Maranas, Nathan E. Lewis, Thomas Sauter,
Bernhard Ø. Palsson, Ines Thiele, Ronan M.T. Fleming, **Creation and
analysis of biochemical constraint-based models: the COBRA Toolbox
v3.0**, Nature Protocols, volume 14, pages 639–702, 2019
`doi.org/10.1038/s41596-018-0098-2 <https://doi.org/10.1038/s41596-018-0098-2>`__.
It is important if you are submitting a paper that depends on the COBRA toolbox to mention a specific release version, and ideally also the git sha-1 hash code that identifies the current commit to make sure that reviewers are using the correct version.
Example citation:
COBRA Toolbox v3.5 ( commit ffd220aa7996b03d5546a7d24d9f8c626749d169 ) was used for all analyses.
You can find the release number on the Releases page <https://github.com/opencobra/cobratoolbox/releases>__, and the commit SHA-1 hash with the command:
.. code-block:: console
git rev-parse HEAD
.. end-how-to-cite-marker
Binaries and Compatibility
⚠️ Please make sure you install a compatible solver. Check the
compatibility
here <https://opencobra.github.io/cobratoolbox/docs/compatibility.html>__.
.. begin-binaries-marker
For convenience, we provide
glpk_mex <https://github.com/blegat/glpkmex>__ and
libSBML-5.17+ <http://sbml.org/Software/libSBML>__ in
/external.
Binaries <https://github.com/opencobra/COBRA.binary>__ for these
libraries are provided in a submodule for Mac OS X 10.6 or later
(64-bit), GNU/Linux Ubuntu 14.0+ (64-bit), and Microsoft Windows 7+
(64-bit). For unsupported OS, please refer to their respective building
instructions
(glpk_mex <https://github.com/blegat/glpkmex#instructions-for-compiling-from-source>,
libSBML <http://sbml.org/Software/libSBML/5.17.0/docs//cpp-api/libsbml-installation.html>).
Read more on the compatibility with SBML-FBCv2
here <https://opencobra.github.io/cobratoolbox/docs/notes.html>__.
.. end-binaries-marker
Disclaimer
*The software provided by the openCOBRA Project is distributed under the GNU GPLv3 or later. However, this software is designed for scientific research and as such may contain algorithms that are associated with patents in the U.S. and abroad. If the user so chooses to use the software provided by the openCOBRA project f
