Cobra Toolbox with iJO1366 and Escher Maps

671 views
Skip to first unread message

Constantin Ruprecht

unread,
Oct 2, 2015, 8:08:34 AM10/2/15
to COBRA Toolbox
Hey guys,
I am a PhD Student from Hamburg and working on strain development. I just started to get into modelling and I dont have a Bioinformatics Background, but come from Molecular Biology.
So what I want to do is use the Matlab Cobra Toolbox with iJO1366 from the BiGG Model and Escher maps. I have tried to load their SBML file but as it is sbml level 3 I am having trouble loading it even with the new experimental libsbml.
Therefor i used the .mat file supplied. So i managed to print a flux distribution in a manner that i can upload it to escher maps by making some changes to printLabeledData.m file, but know comes my BiGG isue (haha ;-) )
So I am trying to perform Knockouts... But I get the following error message:

Reference to non-existent field 'rxnGeneMat'.

Error in removeRxns (line 65)
    modelOut.rxnGeneMat = model.rxnGeneMat(selectRxns,:);

Error in Starchmodelling (line 21)
Knockouts=removeRxns(iJO1366,rxnRemoveList);

When I look and compare a loaded iAF1260 (with readCbModel) i realize that there are actually quite a lot of differences... Is it possible to create the rxnGeneMat from the iJO1366.mat file? or is there antoher solution?
I hope that someone can help me with this:-)
Kind regards,
Constantin

PS Here is the code I am using:

changeCobraSolver('gurobi5');
load('iJO1366.mat')
%Definition der Substrate für Wachstum mit aufnahme raten
Substrates={'EX_malt_e','EX_malttr_e','EX_malthx_e','EX_maltpt_e','EX_maltttr_e'};
iJO1366=changeRxnBounds(iJO1366,Substrates,-10,'l');

%Glucose transport und aufnahme verhindern
Glucosetransport={'EX_glc__D_e','GLCtex_copy1','GLCtex_copy2'};
iJO1366=changeRxnBounds(iJO1366,Glucosetransport,0,'b');

%FBA analysis
FBA=geometricFBA(iJO1366); %optimizeCbModel

%Ausgabe des flux vectors als csv datei
%format = '%.6f\t'; in printLabeledData.m geändert  auf .6f geändert damit 6 nachkommastellen angezeigt werden!
printFluxVector(iJO1366,FBA,1,0,1,'flux.csv',{'ID', 'time 0sec'});

%Knockoutgenlisten:
rxnRemoveList={'G1PTT'};%
Knockouts=removeRxns(iJO1366,rxnRemoveList);
FBA_KO=geometricFBA(Knockouts);
printFluxVector(Knockouts,FBA_KO,1,0,1,'flux_KO.csv',{'ID', 'time 0sec'});

Longfei Mao

unread,
Oct 14, 2015, 12:26:40 PM10/14/15
to COBRA Toolbox

Hi Constantin


I have no problem using "readCbModel()" to load  "iJO1366.xml" into Matlab as a variable (The SBML file is downloaded from http://bigg.ucsd.edu/models/iJO1366). You may try 'git pull' the latest version of the COBRA toolbox and see if the problem is fixed; If not, could you pls post the error message that the "readCbModel" function returns?

The "rxnGeneMat" can be generated based on the "grRules" field of the iJO1366 Matlab variable (you can find it at http://bigg.ucsd.edu/models/iJO1366). You probably need to write a script to parse the GPR rules and construct the "rxnGeneMat" matrix with rows corresponding to network reactions and columns to genes.


Best wishes 


Longfei Mao, Ph.D.

-----------------------------------------------------------------------------------

Research Associate (Collaborateur Scientifique)

Systems Biochemistry Group,

Luxembourg Centre for Systems Biomedicine 


UNIVERSITY OF LUXEMBOURG

CAMPUS BELVAL


House of Biomedicine II 

6, avenue du Swing 

L-4367 Belvaux


T +352 46 66 44 5514

F +352 46 66 44 35514

-----------------------------------------------------------------------------------

 

http://wwwen.uni.lu/lcsb/research/systems_biochemistry

 

longfe...@gmail.com

longf...@uni.lu

www.lcsb.lu

----------------------------

Shuhei Nakane

unread,
Jan 27, 2016, 9:42:37 AM1/27/16
to COBRA Toolbox
Hi,

I encountered the same problem when read the SBML model from BiGG Models (not only iJO1366) with MATLAB2015b and opencobra-cobratoolbox-8a8689c(v2.06?).
Since these models are written in SBML Lv3(v1) w/ FBC(v2), I installed the latest version of SBML Toolbox(v4.1.0) and libSBML(v5.12.0 for MATLAB),
but still didn't work.
I found TranslateSBML showed many errors when I typed
#TranslateSBML('iJO1366.xml')
errors such as...
28817: (10000)  Fatal    Unrecognized error encountered by libSBML
 Groups attribute 'kind' is missing.

Besides, SBML validator (http://sbml.org/Facilities/Validator) returned 151 warnings with 'e_coli_core.xml.gz' from BiGG Models.
Do SBML models in BiGG Models really have correct format?
(Although it is noted that SBML format is only readable by COBRApy v0.4 and later.)

Does experimental version of COBRA toolbox or libSBML (or perhaps "NOT" MATLAB version of libSBML?) solve this problem?

Although Models.mat from BiGG Models can be loaded, 'rxnGeneMat' is always missing as mentioned.
Does COBRA toolbox have the function to construct 'rxnGeneMat' from existing grRules?

Best regards,

Nathan Lewis

unread,
Jan 27, 2016, 1:10:44 PM1/27/16
to cobra-...@googlegroups.com
Thanks Shuhei,

We are looking into these problems now and will address them ASAP. The problem with the validator was a small bug. We are fixing that now

Nathan E. Lewis
 
Assistant Professor
Department of Pediatrics
University of California, San Diego

--

---
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.

marco

unread,
Apr 13, 2016, 7:36:03 AM4/13/16
to COBRA Toolbox
Hi.
I am encountering the same problems described by Shuhei when trying to load SBML v3 l1 in cobratoolbox. Is there any fix available for that now?
I am using the latest cobratoolbox (git clone from the main rep) and libSBML 5.12. 

Additionally, when loading the model (for ecample the iAF1260b model from http://bigg.ucsd.edu/models/iAF1260b) I get many strange and anonymous error messages like this:

error
error
error
error
error
error
....

I counted the number of times this error appears and it corresponds to the number of metabolites so I am guessing it is something that deals with that.
The model is then loaded into cobratoolbox and appears to be working correctly (I can use optimizeCbModel, for example) but the model.genes is missing. This is important to me as I need to perform single gene KO simulations.

let me know if you need more details.
Thanks in advance for your assistance.
best
m.

Longfei Mao

unread,
Apr 13, 2016, 2:39:31 PM4/13/16
to COBRA Toolbox
Hi Marco

The "error" message might be caused by lack of metabolite charge information in the SBML file. The io functions in the current version of COBRA toolbox do not fully support for SBML-FBCv2 files, that is, the gene and GPR associations in the FBCv2 file will not be parsed into the corresponding fields of the COBRA Matlab structure. We have already developed two new io functions to fully support reading and writing the FBCv2 files, and hope they can be made public as soon as they are rigorously examined :).


Best wishes 


Longfei Mao, Ph.D.

-----------------------------------------------------------------------------------

Research Associate (Collaborateur Scientifique)

Systems Biochemistry Group,

Luxembourg Centre for Systems Biomedicine 


UNIVERSITY OF LUXEMBOURG

CAMPUS BELVAL


House of Biomedicine II 

6, avenue du Swing 

L-4367 Belvaux


T +352 46 66 44 5514

F +352 46 66 44 35514

-----------------------------------------------------------------------------------

 

http://wwwen.uni.lu/lcsb/research/systems_biochemistry

 

longfe...@gmail.com

longf...@uni.lu

www.lcsb.lu

----------------------------



marco

unread,
Apr 14, 2016, 4:56:42 AM4/14/16
to COBRA Toolbox
Dear Longfei,
glad to hear that and looking forward to testing the new io functions :)
btw, we have coded a simple and stupid script to add "rxnGeneMat", and "rules" fields to a .mat model imported into cobratoolbox.  If that can be of any help we can share it with the community somehow. just let us know.

all the best.
m.

gianluca mattei

unread,
Apr 21, 2016, 9:39:22 AM4/21/16
to COBRA Toolbox
It could be useful, please share if you can

gianluca
Reply all
Reply to author
Forward
0 new messages