cobra installation problem on Matlab 2016b

492 views
Skip to first unread message

Zhu Wenhan

unread,
Apr 22, 2017, 10:12:54 AM4/22/17
to COBRA Toolbox
Hi guys, 

I was trying to install cobra on Matlab 2016b, and i have installed GUROBI 7.02, which I think the GUROBI mex is no longer necessary. I cant install tomlab solver because that will cause 900 dollars...


initCobraToolbox, Matlab shows the following error: 

 > Adding all the COBRA Toolbox files ...  Done.

-- Checking the installation of LP solvers --

 > Testing gurobi6 ...  Passed.
 > Testing gurobi5 ...  Passed.
 > Testing gurobi ... Warning: LP solver Gurobi not useable: gurobi_mex not in Matlab path 
> In changeCobraSolver (line 161)
  In initCobraToolbox (line 79) 
 Failed.
 > Testing tomlab_cplex ... Warning: LP solver CPLEX through Tomlab not usable: tomRun.m not in Matlab
path 
> In changeCobraSolver (line 129)
  In initCobraToolbox (line 79) 
 Failed.
 > Testing glpk ...  Passed.
 > Testing mosek ... Warning: LP solver Mosek not usable: mosekopt.m not in Matlab path 
> In changeCobraSolver (line 119)
  In initCobraToolbox (line 79) 
 Failed.
 > Testing cplex_direct ...  Passed.
 > Testing ibm_cplex ... Warning: LP solver CPLEX from IBM not usable: IBM CPLEX not installed or
licence server not up 
> In changeCobraSolver (line 147)
  In initCobraToolbox (line 79) 
 Failed.

-- Checking the installation of MILP solvers --

 > Testing gurobi6 ...  Passed.
 > Testing gurobi5 ...  Passed.
 > Testing gurobi ... Warning: MILP solver Gurobi not useable: gurobi_mex not in Matlab path 
> In changeCobraSolver (line 242)
  In initCobraToolbox (line 79) 
 Failed.
 > Testing tomlab_cplex ... Warning: MILP solver CPLEX through Tomlab not usable: tomRun.m not in
Matlab path 
> In changeCobraSolver (line 220)
  In initCobraToolbox (line 79) 
 Failed.
 > Testing glpk ...  Passed.
 > Testing cplex_direct ... Warning: MILP solver cplex_direct not supported by COBRA Toolbox 
> In changeCobraSolver (line 256)
  In initCobraToolbox (line 79) 
 Failed.
 > Testing ibm_cplex ... Warning: MILP solver CPLEX from IBM not usable: IBM CPLEX not installed or
licence server not up 
> In changeCobraSolver (line 233)
  In initCobraToolbox (line 79) 
 Failed.

-- Checking the installation of QP solvers --

 > Testing gurobi6 ...  Passed.
 > Testing gurobi5 ...  Passed.
 > Testing gurobi ... Warning: QP solver Gurobi not useable: gurobi_mex not in Matlab path 
> In changeCobraSolver (line 296)
  In initCobraToolbox (line 79) 
 Failed.
 > Testing tomlab_cplex ... Warning: QP solver CPLEX through Tomlab not usable: tomRun.m not in Matlab
path 
> In changeCobraSolver (line 267)
  In initCobraToolbox (line 79) 
 Failed.
 > Testing qpng ... Warning: qpng solver has not been fully tested - results may not be correct 
> In changeCobraSolver (line 277)
  In initCobraToolbox (line 79) 
 Passed.

-- Checking the installation of MIQP solvers --

 > Testing gurobi6 ...  Passed.
 > Testing gurobi5 ...  Passed.
 > Testing tomlab_cplex ... Warning: MIQP solver CPLEX through Tomlab not usable: tomRun.m not in
Matlab path 
> In changeCobraSolver (line 320)
  In initCobraToolbox (line 79) 
 Failed.

-- Checking the installation of NLP solvers --

 > Testing matlab ...  Passed.
 > Testing tomlab_snopt ... Warning: MIQP solver CPLEX through Tomlab not usable: tomRun.m not in
Matlab path 
> In changeCobraSolver (line 353)
  In initCobraToolbox (line 79) 
 Failed.
Define CB map output...
CB map output: svg

Warning: TranslateSBML did not work with the test .xml file:
Ecoli_core_ECOSAL.xml 
> In initCobraToolbox (line 147) 

solverSummary = 

                    LP    MILP    QP    MIQP    NLP
                    __    ____    __    ____    ___

    lindo_old       -1    -1      -1    -1      -1 
    lindo_new       -1    -1      -1    -1      -1 
    glpk             1     1      -1    -1      -1 
    mosek            0    -1      -1    -1      -1 
    tomlab_cplex     0     0       0     0      -1 
    cplex_direct     1     0      -1    -1      -1 
    ibm_cplex        0     0      -1    -1      -1 
    lp_solve        -1    -1      -1    -1      -1 
    pdco            -1    -1      -1    -1      -1 
    gurobi           0     0       0    -1      -1 
    gurobi5          1     1       1     1      -1 
    gurobi6          1     1       1     1      -1 
    mps             -1    -1      -1    -1      -1 
    quadMinos       -1    -1      -1    -1      -1 
    dqqMinos        -1    -1      -1    -1      -1 
    opti            -1    -1      -1    -1      -1 
    matlab          -1    -1      -1    -1       1 
    tomlab_snopt    -1    -1      -1    -1       0 

 + Legend: -1 = not applicable, 0 = solver not installed, 1 = solver installed.

 + LP solvers: 10 not applicable, 4 failed, 4 passed
 + MILP solvers: 11 not applicable, 4 failed, 3 passed
 + QP solvers: 14 not applicable, 2 failed, 2 passed
 + MIQP solvers: 15 not applicable, 1 failed, 2 passed
 + NLP solvers: 16 not applicable, 1 failed, 1 passed

 >> You can solve LP problems on this system, but some solvers may not be usable (see above summary).
 >> You can solve MILP problems on this system, but some solvers may not be usable (see above summary).
 >> You can solve QP problems on this system, but some solvers may not be usable (see above summary).
 >> You can solve MIQP problems on this system, but some solvers may not be usable (see above summary).
 >> You can solve NLP problems on this system, but some solvers may not be usable (see above summary).

More over, it looks like the cobra was not properly installed, as I dont see a cobra folder under Matlab folder as seen on tutorial (see 1.png, attached) , and instead, my Matlab folder looks empty (see attached 2.png). 

Can I anyone advice on that? I would really appreciate that! 

Best,

Wenhan

2.png

Zhu Wenhan

unread,
Apr 22, 2017, 10:13:58 AM4/22/17
to COBRA Toolbox
1.png

Laurent Heirendt

unread,
Apr 22, 2017, 11:39:01 AM4/22/17
to COBRA Toolbox
Hi,

I don't see any error with the installation of The COBRA Toolbox itself. As of today, Gurobi 7.02 is not yet fully supported (but it will be shortly though, we are working on it).

From what I can see in the attached picture (2.png), The COBRA Toolbox has been installed in /Users/belly/cobratoolbox, whereas your current folder is /Users/belly/Documents/MATLAB. You have to change your folder to /Users/belly/cobratoolbox to see the content of The COBRA Toolbox (you can do so by clicking on 'belly', and then double-clicking on the folder cobratoolbox that will appear on the left side).

Please let me know if this helps.

Best regards,

Laurent

Zhu Wenhan

unread,
Apr 23, 2017, 10:36:33 AM4/23/17
to COBRA Toolbox
Dear Laurent, 

Thanks for helping me with the issue!  

For Gurobi, I tried Gurobi 6 but it looked the same as Gurobi 7.02...and as the error message shows: 
"> Testing gurobi6 ...  Passed.
 > Testing gurobi5 ...  Passed.
 > Testing gurobi ... Warning: LP solver Gurobi not useable: gurobi_mex not in Matlab path ", Gurobi 5 and 6 are working, I am just not sure whether it is worthy to get gurobi itself to work (which I assume is the older version)? 

For the installation directory, I did look into /Users/belly/cobratoolbox, and the folder does not contain the scripts that are shown in 2.png. Can you help me with that ? 


Thank you so much! 

Best,

Wenhan

Laurent Heirendt

unread,
Apr 23, 2017, 2:07:20 PM4/23/17
to COBRA Toolbox
Dear Wenhan,

The interface 'gurobi' is a legacy interface. I would recommend to stick with 'gurobi6' for now. I also recommend to update to the latest version, as Gurobi 7 has been tested with the latest commits. In the terminal, simply type:

$ cd /Users/belly/cobratoolbox
$ git pull origin master

Then, launch MATLAB and type:

>> initCobraToolbox

What scripts are missing exactly? I am not sure I understand.

Best,

Laurent

Zhu Wenhan

unread,
Apr 23, 2017, 11:42:04 PM4/23/17
to COBRA Toolbox
Hi Laurent,

Thank you so much! Your commands did wonders! Everything is working now! For the "missing scripts", I meant the ones such as "addLoopLawConstraints.m and such", which I realized now live under "src" folder instead of the "cobra" folder. Anyway, thanks again, I found them:) 

On a different note, do you have a good way to feed RNA-seq data (typically those come out from DESeq2 or EdgeR) into the createTissueSpecific function? I can only find "simpleaffy" scripts by Farhad Farjood that can use Affymatrix data. Thanks again! 

Best, 

Wenhan
Reply all
Reply to author
Forward
0 new messages