Problems with installation of latest version of cobratoolbox 'binary' in .gitmodules

814 views
Skip to first unread message

Patrik

unread,
May 10, 2018, 8:26:24 AM5/10/18
to COBRA Toolbox
Hi,

I am not a computer expert but have used older cobra toolbox versions fine for a while (also basing part of my teaching on it). However, when trying to implement FVA I was struck by recent changes to matlabpool. I was unsuccessful trying to solve this and therefore decided to install the latest version of cobra toolbox instead (on a Mac with MATLAB R2015a). Following instructions (https://opencobra.github.io/cobratoolbox/latest/installation.html), I downloaded the compressed archive as I did not have git installed. I subsequently installed git (2.15.1) using the Xcode terminals command line tools link. I deleted all the old cobra files from the Matlab path and set the new downloaded files and folders to the path. initCobraToolbox then gives me the following: 

 > Checking if git is installed ...  Done.
 > Checking if the repository is tracked using git ...  > Checking if curl is installed ...  Done.
 > Checking if remote can be reached ...  Done.
 Done.
 > Checking if curl is installed ...  Done.
 > Checking if remote can be reached ...  Done.
 > Initializing and updating submodules (this may take a while)...fatal: No url found for submodule path 'binary' in .gitmodules
Error using initCobraToolbox (line 196)
The submodules could not be initialized.

This is where I got stuck, searching for solutions yielded nothing, and would appreciate help to sort it out.

Thanks, Patrik


Laurent Heirendt

unread,
May 10, 2018, 11:32:56 AM5/10/18
to COBRA Toolbox
Hi Patrik,

Now as you have the command line tools installed, may you try installing the COBRA Toolbox by typing in the Terminal (not MATLAB):


$ git clone
--depth=1 https://github.com/opencobra/cobratoolbox.git cobratoolbox


Then, restart MATLAB, and type:

>> restoredefaultpath; clear all;
>> cd cobratoolbox
>> initCobraToolbox

That should work. If all else fails, I recommend downloading the compressed archive as explained on the main website and re-run the MATLAB commands above. That .zip file includes all submodules, the one from Github does not.

Please let me know if this worked.

Best regards,

Laurent

Patrik

unread,
May 10, 2018, 1:27:02 PM5/10/18
to COBRA Toolbox
Hi Laurent,

It works, my pre-installed Gurobi solver was also recognized. Many thanks. I was just about to jump over to CobraPy..

Interestingly, just running a basic optimizeCbModel with older ecoli_core_model.xml models did not work but using the one that comes with the newly installed v.3.0 package did. 

Thank you, Patrik

Koushik Garain

unread,
Sep 8, 2022, 2:06:40 PM9/8/22
to COBRA Toolbox
Hi,
I am Koushik, facing the same problem. I am trying to build a community model in the COBRA toolbox. But, there are errors for initCobraToolbox. I am using Mac and Matlab 2015b. The error is 

Error in initCobraToolbox (line 212)
            if contains(result_gitSubmodule,'modified') ||
            contains(result_gitSubmodule,'Untracked files')

I don't know what to do. Please help me. After that, I want to use createCommModel for two specieses.

Ronan M.T. Fleming

unread,
Sep 13, 2022, 6:52:04 AM9/13/22
to COBRA Toolbox
contains is a function introduced in R2016b

--

---
You received this message because you are subscribed to the Google Groups "COBRA Toolbox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cobra-toolbo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cobra-toolbox/06ca1a65-588d-4cfb-a067-5b8ecdef3075n%40googlegroups.com.


--
--
Mr. Ronan MT Fleming B.V.M.S. Dip. Math. Ph.D.
----------------------------------------------------------------------------
Associate Professor,
School of Medicine,
National University of Ireland, Galway.
&
Assistant Professor,
Division of Systems Biomedicine and Pharmacology,
Leiden Academic Centre for Drug Research,
Faculty of Science,
Leiden University.
https://www.universiteitleiden.nl/en/staffmembers/ronan-fleming
&
H2020 Project Coordinator,
Systems Medicine of Mitochondrial Parkinson’s Disease,
http://sysmedpd.eu
----------------------------------------------------------------------------
Peer-reviewed publications: https://goo.gl/FZPG23
Mobile:  +353 852 109 806
Skype: ronan.fleming
----------------------------------------------------------------------------
(This message is confidential and may contain privileged information. It is intended for the named recipient only. If you receive it in error please notify me and permanently delete the original message and any copies.)

Koushik Garain

unread,
Sep 13, 2022, 7:14:16 AM9/13/22
to cobra-...@googlegroups.com
Thank you sir. Now, I am using Matlab R2020a and the Cobra toolbox is working properly. But, I need cplex solver. Is this freely available?


You received this message because you are subscribed to a topic in the Google Groups "COBRA Toolbox" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cobra-toolbox/8pvsbv2oYbk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cobra-toolbo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cobra-toolbox/CAOivGYsEQrY3460j4TKFPYGWtZ4KR9D1tgRyuWCnDEVWMGs0CQ%40mail.gmail.com.

Ronan M.T. Fleming

unread,
Sep 13, 2022, 7:24:31 AM9/13/22
to COBRA Toolbox
Reply all
Reply to author
Forward
0 new messages