Unrecognized field name "S"

14 views
Skip to first unread message

Brian Parker

unread,
May 30, 2024, 1:27:15 PMMay 30
to COBRA Toolbox
Hello,

I am switching from using Python the using MATLAB to work with the Recon3D model and am having issues looking at the model. Importing the model worked as I can manually look through the model structure in the MATLAB workspace. When I try to print or add reactions, I get the 'Unrecognized field name 'S' or Unrecognized field name 'rxns' errors, respectively.

To import the model I used:
model = readstruct('Recon3D.xml');

To print reaction details I used:
printRxnFormula(m, 'R_COAtl')

To add a recation I used:
m = addReaction(m, 'newRxn', 'A -> B');

Does anybody know why I am able to import the model and manually look through the structure, but am unable to analyze it using the built-in functions?

Thank you in advance.

Ronan M.T. Fleming

unread,
May 30, 2024, 5:17:57 PMMay 30
to cobra-...@googlegroups.com
In matlab look at the model structure and see if it has the standard model fields:
--

---
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-toolbox+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cobra-toolbox/8fc0ac42-3b06-41f4-81ff-f78c4f6d77f6n%40googlegroups.com.


--
--
Mr. Ronan MT Fleming B.V.M.S. Dip. Math. Ph.D.
----------------------------------------------------------------------------
Associate Professor,
School of Medicine,
University of Galway,
Ireland.
Coordinator of the Horizon Europe project "Reconstruction and Computational Modelling for Inherited Metabolic Diseases" (Recon4IMD)
----------------------------------------------------------------------------
Peer-reviewed publications: https://goo.gl/FZPG23
Mobile:  +353 852 109 806
Github: @rmtfleming
----------------------------------------------------------------------------

Subasree S

unread,
May 31, 2024, 9:43:36 AMMay 31
to cobra-...@googlegroups.com
Hi,
The ideal function to read SBML,XLS, etc and convert them into .mat files suitable for COBRA is readCbModel.

PFA the link below


--

---
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.
Message has been deleted

Brian Parker

unread,
Jun 4, 2024, 9:28:01 AMJun 4
to COBRA Toolbox
It is now reading the model correctly. Thank you for the help.

Thomas Pfau

unread,
Jun 4, 2024, 9:30:21 AMJun 4
to cobra-...@googlegroups.com

Hi,

The Cobra toolbox has a readCbModel function which you can use to load all file formats supported by the toolbox.
In your case:
model = readCbModel('Recon3D.xml')

Best,

Thomas

Reply all
Reply to author
Forward
0 new messages