TranslateSBML error in MATLAB

369 views
Skip to first unread message

Bhushan Dhamale

unread,
Aug 23, 2018, 7:13:51 AM8/23/18
to COBRA Toolbox
Hello,
I am using COBRA Toolbox in MATLAB R2017b. When I initialize COBRA toolbox, I get:

Warning:  > TranslateSBML is installed but is not working properly. 
> In initCobraToolbox (line 302
 > Try running
   >> TranslateSBML('/home/bhushan/softwares/MATLAB/R2017b/toolbox/matlab/cobratoolbox/test/models/xml/ecoli_core_model.xml');
   in order to debug.

On running:
TranslateSBML('/home/bhushan/softwares/MATLAB/R2017b/toolbox/matlab/cobratoolbox/test/models/xml/ecoli_core_model.xml')

I get the error:
Too many input arguments. 

I searched for a fix, but I was not able to find any.
I would really appreciate some help with it.

Laurent Heirendt

unread,
Aug 23, 2018, 9:33:50 AM8/23/18
to COBRA Toolbox

Hi,

Is this the latest version of the COBRA Toolbox? May you attach the systemConfigReport?

Thanks,

Laurent

Niloofar Aghaie Abiane

unread,
Aug 24, 2018, 12:09:52 PM8/24/18
to COBRA Toolbox
put the model into your directory and give the file as an argument instead of the file.
Additionally, have you checked to see if the SBML is installed or not? You also need to install the llibSBML.

Bhushan Dhamale

unread,
Aug 27, 2018, 2:19:43 AM8/27/18
to COBRA Toolbox
Hello Laurent,
I am indeed using the latest version of COBRA Toolbox.
I am attaching the systemConfigReport.
COBRAconfigReport.log

Laurent Heirendt

unread,
Aug 27, 2018, 2:40:00 AM8/27/18
to COBRA Toolbox
Hi,

What does this command return after running initCobraToolbox?

>> TranslateSBML('/home/bhushan/softwares/MATLAB/R2017b/toolbox/matlab/cobratoolbox/test/models/xml/ecoli_core_model.xml');

Best regards,

Laurent

Bhushan Dhamale

unread,
Aug 27, 2018, 2:40:02 AM8/27/18
to COBRA Toolbox
Hello Niloofar,
As per your advice, I navigated to the model directory, and with it as the current directory, I did:
>> model = 'ecoli_core_model.xml';
>> TranslateSBML(model)

But, I still get the same output:
Too many input arguments.

Also, I have SBMLToolbox-4.1.0 and libSBML-5.15.0-matlab installed.
Do you have any other suggestions that might help?

Laurent Heirendt

unread,
Aug 27, 2018, 3:03:32 AM8/27/18
to COBRA Toolbox
Hi,

You should have libSBML 5.17.

What does this command show?

>> system('cd binary && git status')

May you reinstall the COBRA Toolbox?

Best regards,

Laurent

Bhushan Dhamale

unread,
Aug 28, 2018, 1:19:07 AM8/28/18
to COBRA Toolbox
Hello Laurent,
On running the command, I get:
Too many input arguments.

Niloofar Aghaie Abiane

unread,
Aug 28, 2018, 1:30:41 AM8/28/18
to cobra-...@googlegroups.com
What i brlirve is that your model has problem. If you think that all the SBML and LibSBML are installdd correctly and you download the model from BiGG DB i suggest you to dl the iJO1366 from BiGG db as well and test your SBML WITHT that model. If you do not have any error then the problem is with your model. If it does still error check the two sample test located in SBML checking if everything is installed correctly. Additionally, brcareful that you must run the initializeCobrToolbox function before calling any function of it.

--

---
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/b7TJiPm4TMc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cobra-toolbo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Niloofar Aghaieabiane
Department of Computer Science
School of Computing
New Jersey Institute of Technology

Bhushan Dhamale

unread,
Aug 28, 2018, 2:29:56 AM8/28/18
to COBRA Toolbox
Hello Laurent,
Here's what I see:
>> system('cd binary && git status')
# HEAD detached at d6ba736
nothing to commit, working directory clean
ans =
     0

On reinstalling and initializing the COBRA Toolbox, the TranslateSBML issue seems to be fixed, but a new error has popped up:
>> initCobraToolbox


      _____   _____   _____   _____     _____     |
     /  ___| /  _  \ |  _  \ |  _  \   / ___ \    |   COnstraint-Based Reconstruction and Analysis
     | |     | | | | | |_| | | |_| |  | |___| |   |   The COBRA Toolbox - 2018
     | |     | | | | |  _  { |  _  /  |  ___  |   |
     | |___  | |_| | | |_| | | | \ \  | |   | |   |   Documentation:
     \_____| \_____/ |_____/ |_|  \_\ |_|   |_|   |   http://opencobra.github.io/cobratoolbox
                                                  | 

 > Checking if git is installed ...  Done (version: 1.8.3.).
 > Checking if the repository is tracked using git ...  Done.
 > Checking if curl is installed ...  Done.
 > Checking if remote can be reached ...  Done.
 > Initializing and updating submodules (this may take a while)... Done.
 > Adding all the files of The COBRA Toolbox ...  Done.
 > Define CB map output... set to svg.
 > TranslateSBML is installed and working properly.
 > Configuring solver environment variables ...
   - [--*-] ILOG_CPLEX_PATH: /opt/ibm/ILOG/CPLEX_Studio1271/cplex/matlab/x86-64_linux
   - [---*] GUROBI_PATH: /opt/gurobi751/linux64/matlab
   - [----] TOMLAB_PATH: --> set this path manually after installing the solver ( see instructions )
   - [----] MOSEK_PATH: --> set this path manually after installing the solver ( see instructions )
   Done.
 > Checking available solvers and solver interfaces ... Done.
 > Setting default solvers ... Done.
 > Saving the MATLAB path ... Done.
   - The MATLAB path was saved as ~/pathdef.m.

 > Summary of available solvers and solver interfaces

Support    LP MILP    QP MIQP   NLP
----------------------------------------------------------------------
gurobi        active            1     1     1     1     -
ibm_cplex    active            1     1     1     -     -
tomlab_cplex active            0     0     0     0     -
glpk          active            1     1     -     -     -
mosek        active            0     -     0     -     -
matlab        active            0     -     -     -     0
cplex_direct active            0     0     0     0     -
dqqMinos      active            1     -     -     -     -
pdco          active            1     -     1     -     -
quadMinos    active            1     -     -     -     -
qpng          passive            -     -     1     -     -
tomlab_snopt passive            -     -     -     -     0
lp_solve      legacy            1     -     -     -     -
----------------------------------------------------------------------
Total        -                  7     3     4     1     0

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


 > You can solve LP problems using: 'gurobi' - 'ibm_cplex' - 'glpk' - 'dqqMinos' - 'pdco' - 'quadMinos' - 'lp_solve' 
 > You can solve MILP problems using: 'gurobi' - 'ibm_cplex' - 'glpk' 
 > You can solve QP problems using: 'gurobi' - 'ibm_cplex' - 'pdco' - 'qpng' 
 > You can solve MIQP problems using: 'gurobi' 
 > You can solve NLP problems using: 

 > Checking for available updates ...
 > The COBRA Toolbox is up-to-date.
Undefined function or variable 'rdir'.
Error in addCOBRABinaryPathToSystemPath (line 17)
bindirs = rdir([binaryDir filesep '**' filesep '*']);
Error in initCobraToolbox (line 562)
    addCOBRABinaryPathToSystemPath();

Bhushan Dhamale

unread,
Aug 28, 2018, 2:32:30 AM8/28/18
to COBRA Toolbox
Hello Niloofar,
The issue seems to have sorted itself out on reinstalling the COBRA Toolbox.
Thank you for your help :)

Niloofar Aghaie Abiane

unread,
Aug 28, 2018, 3:02:48 AM8/28/18
to cobra-...@googlegroups.com
I had the same error as well. To me, I had two version kf matlab, and when I uninstalled oneof them, the error was fixed. If you only have version the problem is with saving path. You must do it manuallt by setting path on home tab of matlab.

--

---
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/b7TJiPm4TMc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cobra-toolbo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thomas Pfau

unread,
Sep 3, 2018, 3:16:02 AM9/3/18
to cobra-...@googlegroups.com

I know, that the actual issue is resolved but I would like to clarify something here for future reference:

The COBRA toolbox provides its own repository with the matlab bindings for libSBML. Since libSBML is located on sourceforge, and the COBRA toolbox is uses github we provide a copy of the binaries in our repository for ease of use.

Neither libSBML nor the SBMLToolbox are requirements to use SBML models in the COBRA toolbox and indeed, the SBMLToolbox could potentially conflict with the binaries supplied along with the COBRA Toolbox.
So if you have old toolbox installations it might be a good idea to delete them entirely and reclone them from the official repository.

Best

Thomas

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.

For more options, visit https://groups.google.com/d/optout.

-- 
Université du Luxembourg
Faculté des Sciences, de la Technologie et de la Communication
Campus Belval, Biotech II 115
6 avenue du Swing
L-4367 Belvaux
Tel: (+352) 46 66 44 5309
Email: thoma...@uni.lu

Thomas Pfau

unread,
Sep 4, 2018, 7:09:46 AM9/4/18
to cobra-...@googlegroups.com

And one more clarification:

The SBML specific mex files we provide in the COBRA.binary repository are built by the libSBML team and the libSBML matlab bindings code provided in our external folder is also copied from the libSBML sourceforge repository.

These bindings are based on libSBML but don't require an additional installation of libSBML or the SBMLToolbox on the machine they are used on.

Best

Thomas

-- 
Université du Luxembourg
Faculté des Sciences, de la Technologie et de la Communication
Campus Belval, Biotech II 423
6 avenue du Swing
L-4367 Belvaux
Tel: (+352) 46 66 44 5309
Email: thoma...@uni.lu 
Reply all
Reply to author
Forward
0 new messages