Closed stelmo closed 8 months ago
That's strange. Can you give more details on that? What part of the model is invalid SBML ?
Sure thing, I can supply the model too if you like. To check if the SBML is valid I use the sbml.org group's validation tool. However, the model does load in Cobrapy, despite the SBML issues...
Here is the the first part of the error message generated by the SBML validator:
ErrorA Species object must have the required attributes 'id', 'compartment', 'hasOnlySubstanceUnits', 'boundaryCondition' and 'constant', and may have the optional attributes 'metaid', 'sboTerm', 'name', 'initialAmount', 'initialConcentration', 'substanceUnits' and 'conversionFactor'. No other attributes from the SBML Level 3 Core namespace are permitted on a Species object. Reference: L3V1 Section 4.6 The required attribute 'boundaryCondition' is missing from the <species> with the id 'M_10fthf_c'.
Line 33 Column 103:
<species metaid="M_10fthf_c" sboTerm="SBO:0000247" id="M_10fthf_c" name="10-Formyltetrahydrofolate" compartment="C_c" hasOnlySubstanceUnits="true" fbc:charge="-2" fbc:chemicalFormula="C20H21N7O7">
...
I think the "boundary" attribute became mandatory recently, and we have not updated the SBML output to comply with that. But anyway that attribute is not used by cobrapy or other tools that do FBA simulation, so it should not be a problem.
Some recently released cobra software, e.g. COBREXA, make use of the latest SBML standards, and this is actually what led me here :)
Yes, the boundary attribute is used by many SBML FBA tools. Boundary metabolites are converted into boundary reactions, i.e. boundary metabolites are non-balanced metabolites in an FBA problem. It is recommended to encode boundary conditions for metabolites via boundary reactions, but some (legacy) tools use the boundaryCondition flag for that. So it is a very important flag in the SBML/FBA context. Also this is mandatory in all level 3 SBML already for some years.
BEst M
On Tue, Nov 30, 2021 at 10:17 AM St. Elmo Wilken @.***> wrote:
Some recently released cobra software, e.g. COBREXA https://github.com/LCSB-BioCore/COBREXA.jl, make use of the latest SBML standards, and this is actually what led me here :)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cdanielmachado/carveme/issues/148#issuecomment-982437634, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG33OWH2QF43NVW7HQ4UW3UOSJEPANCNFSM5IYZALMQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Matthias König, PhD. Junior Group Leader LiSyM - Systems Medicine of the Liver Humboldt Universität zu Berlin, Institute of Biology, Institute for Theoretical Biology https://livermetabolism.com @.*** https://twitter.com/konigmatt https://github.com/matthiaskoenig Tel: +49 30 2093 98435
Sorry forgot. Yes, the flag is used by cobrapy to read the boundary metabolites from legacy models (you will see some warnings in the import).
On Tue, Nov 30, 2021 at 10:24 AM Matthias König @.***> wrote:
Yes, the boundary attribute is used by many SBML FBA tools. Boundary metabolites are converted into boundary reactions, i.e. boundary metabolites are non-balanced metabolites in an FBA problem. It is recommended to encode boundary conditions for metabolites via boundary reactions, but some (legacy) tools use the boundaryCondition flag for that. So it is a very important flag in the SBML/FBA context. Also this is mandatory in all level 3 SBML already for some years.
BEst M
On Tue, Nov 30, 2021 at 10:17 AM St. Elmo Wilken @.***> wrote:
Some recently released cobra software, e.g. COBREXA https://github.com/LCSB-BioCore/COBREXA.jl, make use of the latest SBML standards, and this is actually what led me here :)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cdanielmachado/carveme/issues/148#issuecomment-982437634, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG33OWH2QF43NVW7HQ4UW3UOSJEPANCNFSM5IYZALMQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Matthias König, PhD. Junior Group Leader LiSyM - Systems Medicine of the Liver Humboldt Universität zu Berlin, Institute of Biology, Institute for Theoretical Biology https://livermetabolism.com @.*** https://twitter.com/konigmatt https://github.com/matthiaskoenig Tel: +49 30 2093 98435
-- Matthias König, PhD. Junior Group Leader LiSyM - Systems Medicine of the Liver Humboldt Universität zu Berlin, Institute of Biology, Institute for Theoretical Biology https://livermetabolism.com @.*** https://twitter.com/konigmatt https://github.com/matthiaskoenig Tel: +49 30 2093 98435
Ok, thanks for clarifying that.
I detected an inconsistent prefix usage in SBML name space declaration that also leads to invalid SBML files.
Hi @cdanielmachado, I also get the following error on the SBML validator, any clue on how to fix it?
ErrorA Species object must have the required attributes 'id', 'compartment', 'hasOnlySubstanceUnits', 'boundaryCondition' and 'constant', and may have the optional attributes 'metaid', 'sboTerm', 'name', 'initialAmount', 'initialConcentration', 'substanceUnits' and 'conversionFactor'. No other attributes from the SBML Level 3 Core namespace are permitted on a Species object. Reference: L3V1 Section 4.6 The required attribute 'boundaryCondition' is missing from the
Finally fixed this in version 1.6.0. Apologies that it took so long.
Hi, I just started working with carveme, but it seems the program generates invalid SBML models. Is there a way to ensure that it generates valid SBML models?