working on cobrapy mat import

66 views
Skip to first unread message

Uri David Akavia

unread,
Mar 31, 2022, 11:24:13 AM3/31/22
to COBRA Toolbox
Hi
I've been working on cobrapy mat import/export, and I have some questions about the model format.
osense - what values are allowed? Does -1 mean "min" or "max" for objective direction?

What database/website does metSMILES refer to? I understand it is SMILES, but is there a link where I can find the SMILES database?

what do metPdMap, metSBOTerm refer to? I thought that SBOTerm is about processes.

Thank you,

Uri David

Ronan M.T. Fleming

unread,
Mar 31, 2022, 2:30:25 PM3/31/22
to COBRA Toolbox
Hi Uri,

SMILES are database independent
https://en.wikipedia.org/wiki/Simplified_molecular-input_line-entry_system
https://github.com/EBI-BioModels/SBO
See also
https://github.com/opencobra/cobratoolbox/blob/master/docs/source/notes/COBRAModelFields.md

metPdMap is nonstandard, you can ignore it.

Regards,

Ronan
> --
>
> ---
> 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 on the web visit https://groups.google.com/d/msgid/cobra-toolbox/ee9e00f9-18aa-47b9-b0d9-53041eb592fbn%40googlegroups.com.



--
--
Mr. Ronan MT Fleming B.V.M.S. Dip. Math. Ph.D.
----------------------------------------------------------------------------
Associate Professor,
School of Medicine,
National University of Ireland, Galway.
&
Assistant Professor,
Division of Systems Biomedicine and Pharmacology,
Leiden Academic Centre for Drug Research,
Faculty of Science,
Leiden University.
https://www.universiteitleiden.nl/en/staffmembers/ronan-fleming
&
H2020 Project Coordinator,
Systems Medicine of Mitochondrial Parkinson’s Disease,
http://sysmedpd.eu
----------------------------------------------------------------------------
Peer-reviewed publications: https://goo.gl/FZPG23
Mobile: +353 852 109 806
Skype: ronan.fleming
----------------------------------------------------------------------------
(This message is confidential and may contain privileged information.
It is intended for the named recipient only. If you receive it in
error please notify me and permanently delete the original message and
any copies.)

Uri David Akavia

unread,
Mar 31, 2022, 3:06:27 PM3/31/22
to cobra-...@googlegroups.com
Thanks Ronan.

What about osense? I've tried importing Recon3D_301.mat into cobrapy, and it has osense, not osenseStr. So I'm wondering what that means.

Thank you,

Uri David

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/0JLqWuMZaHg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cobra-toolbo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cobra-toolbox/CAOivGYuZZ1igqyOY5LXbhv-ZWXdhMFjnvJKxFYcUf973ZYZqeg%40mail.gmail.com.

Ronan M.T. Fleming

unread,
Mar 31, 2022, 3:13:05 PM3/31/22
to COBRA Toolbox

Uri David Akavia

unread,
Apr 4, 2022, 10:11:03 AM4/4/22
to cobra-...@googlegroups.com
Thank you.
One question about groups - it seems like groups are stored as subSystems, and cobra doesn't make distinction between groups and subsystems. Is that correct? Does this mean that only reactions have groups?

Thomas Pfau

unread,
Apr 5, 2022, 3:38:32 AM4/5/22
to cobra-...@googlegroups.com

Hi Uri David,

Yes, at the moment only subSystems are mapped to groups in sbml files. No other groups have been implemented in the COBRA Toolbox model structure (for all I know at least).
This file:
https://github.com/opencobra/cobratoolbox/blob/master/docs/source/notes/COBRAModelFields.md
should contain most field information

And this file:
https://github.com/opencobra/cobratoolbox/blob/master/src/base/io/definitions/COBRA_structure_fields.tab
Should contain all computational definitions on how fields have to look.
There are of course models around that have additional fields but for those fields there is no clear definition (at least none specified in the toolbox).

This function:

https://github.com/opencobra/cobratoolbox/blob/master/src/base/io/utilities/generateFieldDescriptionFile.m

creates the description file from the definition file and thus, if used as intended the above two files should be in sync.

I hope this helps

Thomas

Uri David Akavia

unread,
Apr 12, 2022, 9:16:27 AM4/12/22
to cobra-...@googlegroups.com
Hi Thomas and Ronan,
Thank you for all your help.
I was wondering if you could help me get a test model. I was thinking about Recon3, since it has most of the fields. If you can trim it down to less metabolites, reactions, genes, so it would be easy to have it be part of the cobrapy test suite without being too large, that would be great.
I'm thinking around 100KB gzipped compressed if that is possible.
Also, if you can do that, can you please export it as SBML from cobratoolbox? I'll compare the mat and the SBML to make sure they are both read correctly.

Thank you so much

Yours,

Uri David

Uri David Akavia

unread,
Apr 12, 2022, 9:20:30 AM4/12/22
to cobra-...@googlegroups.com
Actually,  never mind. I'l use the models in COBRA.models if that's okay with you. 

Ronan M.T. Fleming

unread,
Apr 12, 2022, 9:35:14 AM4/12/22
to COBRA Toolbox
Hi Uri,
yes, perfect, because COBRA.models was designed to share models for
code testing purposes, rather than a means of model dissemination.
Regards,
Ronan

On Tue, 12 Apr 2022 at 14:20, Uri David Akavia
> To view this discussion on the web visit https://groups.google.com/d/msgid/cobra-toolbox/CAOka1Anh9%2BjXzq3sJ8_aoSEBSQV9VxmFW3_1iXuG-CVcTvu1ZA%40mail.gmail.com.

Uri David Akavia

unread,
Apr 16, 2022, 2:48:10 PM4/16/22
to cobra-...@googlegroups.com
Hi Ronan,

Can you please do me a quick favor?
I've been trying to import Recon2.v04.mat into cobrapy, and I'm having some issues. I'm not sure if it is my code or the original .mat file. Can you please tell me what the grRules and rules field is for reaction H2CO3D?
That one is tripping up my cobrapy code. I want to see what it is in cobratoolbox.
I'd check it myself, but I no longer have access to MATLAB.

Thank you,

Uri David



Ronan M.T. Fleming

unread,
Apr 19, 2022, 10:05:17 AM4/19/22
to COBRA Toolbox
Hi Uri,
see the "Associated human genes" section of:
https://www.vmh.life/#reaction/H2CO3D
Regards,
Ronan

On Sat, 16 Apr 2022 at 19:48, Uri David Akavia
> To view this discussion on the web visit https://groups.google.com/d/msgid/cobra-toolbox/CAOka1An3pXSeDxKngqNzj7Su6m5EV_iTTc-Jt%3DusqQnXOBWYCg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages