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 4 formats: .mlx
, .m
, .pdf
, and .html
.
- The interactive version
.mlx
is a MATLAB Live-script format and can be run using the MATLAB Live-script editor. - The static version
.html
can be visualized on the tutorial section of the COBRA Toolbox documentation. - For your reference, the
.pdf
version can be downloaded from the tutorial section. The .m version of the tutorial can be opened and run directly in MATLAB. This is particularly useful to build new analysis scripts based on an existing tutorial.
A template for generating a new tutorial is provided here.
There are two ways to contribute to the tutorials:
You can use the MATLAB.devTools to submit your tutorial.
Fork the COBRA.tutorials repository on Github.
Clone the forked repository to a directory of your choice:
$ git clone [email protected]:<userName>/COBRA.tutorials.git fork-COBRA.tutorials.git
Change to the directory:
$ cd fork-COBRA.tutorials.git/
Set the upstream to the
opencobra/COBRA.tutorials
repository:$ git remote add upstream [email protected]:opencobra/COBRA.tutorials.git
Fetch from the upstream repository
$ git fetch upstream
Checkout a new branch from
develop
:$ git checkout -b <yourBranch> upstream/develop
Now, make your changes in the tutorial in MATLAB.
Once you are done making changes, add the files to your branch, where
tutorial_<yourFile>
is the name of the tutorial. Make sure to add the.m
and the.mlx
files.$ git add tutorial_<yourFile>.m $ 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
, where<yourUserName>
is your Github username.Click on
Compare & Pull Request
.Change the target branch
develop
.Submit your pull request.
Wait until your pull request is accepted.