Hello everyone,
I am new to MATLAB and COBRA Toolbox, and I am trying to load an SBML model
exported from KBase into COBRA.
Here is the code I used:
>>initCobraToolbox(false);
changeCobraSolver('gurobi','LP',1);
>>fileName = 'D:\Shared\Lab\Methylocystis_NC52PC_rumen.gbk_genome.mdl.xml';
modelOri = readCbModel(fileName)
But I am getting
the following error message:
Error
using :
Colon operands must be real scalars.
Error in getDefinedFieldProperties (line 90)
for i = 1:size(relarray)
^
Error in getDatabaseMappings
(line 38)
mappings = getDefinedFieldProperties('Database',true);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in mapAnnotationsToFields (line 46)
knownMappings = getDatabaseMappings(field);
^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in readSBML (line 122)
model =
mapAnnotationsToFields(model,databases,identifiers,qualifiers,'met');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in readCbModel (line 211)
model =
readSBML(fileName,defaultBound);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
My setup:
- MATLAB R2025b
- COBRA Toolbox 0.30.0
- Windows 11
I’m not sure what I did wrong. I would really appreciate any guidance or suggestions.
Best regards,
Banurea
--
---
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 visit https://groups.google.com/d/msgid/cobra-toolbox/aac82b53-fc2e-4de0-991c-e3128f6a458bn%40googlegroups.com.