The COBRA.tutorials repository exists to collect and maintain tutorials for developed and published constraint-based genome-scale modelling methods and studies. Its purpose is to provide clear, reproducible instructional material that demonstrates how new algorithms, workflows, and analysis techniques can be applied within the COBRA modelling framework. By centralising these tutorials, the repository supports both new and experienced users in learning, comparing, and adopting state-of-the-art constraint-based modelling approaches.
Tutorials are here to get you started with using The COBRA
Toolbox. The
tutorials are grouped according to the src/ folder structure:
All tutorials are provided in these formats: .mlx, .m, and .html.
- The interactive version
.mlxis a MATLAB Live Script format and can be run using the MATLAB Live-script editor. - The static version
.htmlis automatically generated and is accessible on the tutorial section of the COBRA Toolbox documentation. - The
.pdfversion can be downloaded from the same tutorial section. The.mversion can be opened and run directly in MATLAB, which is particularly useful for building new analysis scripts based on existing tutorials.
The COBRA.tutorials repository uses an automated continuous integration (CI) workflow.
When a contributor pushes a new or updated .mlx tutorial to the repository:
- The CI pipeline is automatically triggered.
- The
.mlxfile is converted into three formats: -.m(MATLAB script) -.pdf(print-ready copy) -.html(web-friendly version) - These generated files are published to the COBRA Toolbox website, making the tutorial immediately accessible to users.
The diagram below illustrates this workflow:
A template for generating a new tutorial is provided here.
There are two ways to contribute to the tutorials:
Fork the COBRA.tutorials repository on Github.
Clone the forked repository to a directory of your choice:
git clone git@github.com:<userName>/COBRA.tutorials.git fork-COBRA.tutorials.gitChange to the directory:
cd fork-COBRA.tutorials.git/Set the upstream to the
opencobra/COBRA.tutorialsrepository:git remote add upstream git@github.com:opencobra/COBRA.tutorials.gitFetch from the upstream repository:
git fetch upstreamCheckout a new branch from
upstream/master:git checkout -b master upstream/masterNow, make your changes to the tutorial in MATLAB.
Once you are done making changes, add the files to your branch (
tutorial_<yourFile>refers to the tutorial name). Make sure to add the.mlxformat of the tutorial.git add tutorial_<yourFile>.mlx git commit -m "Changes to tutorial_<yourFile>"
Push your commits on
<yourBranch>to your fork:git push origin <yourBranch>Browse to your fork on:
https://www.github.com/<yourUserName>/COBRA.tutorials
Click on Compare & Pull Request.
Confirm the target branch is
master.Submit your pull request.
Wait until your pull request is accepted.
