cobratoolbox icon indicating copy to clipboard operation
cobratoolbox copied to clipboard

ExportModel error

Open mascencio27 opened this issue 2 years ago • 0 comments

Hi.

I need to use the input exportModel(model, filename...), but result in an error:

WARNING: There is no unconstrained field in the model structure. This means that no metabolites are considered exchange metabolites WARNING: The "inchis" field must be a cell array of strings WARNING: The "rxnReferences" field must be a cell array of strings WARNING: The model contains empty reaction IDs WARNING: The following reaction IDs are duplicates:

Array indices must be positive integers or logical values.

Error in checkModelStruct (line 228) metInComp=strcat(model.metNames,'[',model.comps(model.metComps),']');

Error in exportModel (line 68) checkModelStruct(model,false);

Error in exportModelxml (line 13) exportModel(modelRAVEN2,'reh16_V10.xml',1,0);

I hereby confirm that I have:

  • [x ] Tried to solve the issue on my own
  • [ x] Retried to run my code with the latest version of The COBRA Toolbox
  • [ x] Checked that a similar issue has not already been opened

the input complete is: clear solverOK = changeCobraSolver('glpk','LP'); modelCOBRA=readCbModel('reh16_gapfilled_cobra_V10.xls'); modelRAVEN2=ravenCobraWrapper(modelCOBRA); modelRAVEN2.id = char("raeu"); modelRAVEN2.description = char("ralstonia eutropha"); modelRAVEN2.annotation = struct(); modelRAVEN2.rxnMiriams = cell(2911,1); modelRAVEN2.rxnReferences = cell(2911,1); %modelRAVEN2.rxnConfidenceScores = double(2911); modelRAVEN2.geneShortNames= cell(1584,1); modelRAVEN2.inchis= cell(1860,1); exportModel(modelRAVEN2,'reh16_V10.xml',1,0);

Thanks!

mascencio27 avatar Nov 03 '21 15:11 mascencio27