Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid SBML file #148

Closed
stelmo opened this issue Nov 25, 2021 · 10 comments
Closed

Invalid SBML file #148

stelmo opened this issue Nov 25, 2021 · 10 comments

Comments

@stelmo
Copy link

stelmo commented Nov 25, 2021

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?

@cdanielmachado
Copy link
Owner

That's strange. Can you give more details on that? What part of the model is invalid SBML ?

@stelmo
Copy link
Author

stelmo commented Nov 26, 2021

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">
...

@cdanielmachado
Copy link
Owner

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.

@stelmo
Copy link
Author

stelmo commented Nov 30, 2021

Some recently released cobra software, e.g. COBREXA, make use of the latest SBML standards, and this is actually what led me here :)

@matthiaskoenig
Copy link
Contributor

matthiaskoenig commented Nov 30, 2021 via email

@matthiaskoenig
Copy link
Contributor

matthiaskoenig commented Nov 30, 2021 via email

@cdanielmachado
Copy link
Owner

Ok, thanks for clarifying that.

@GwennyGit
Copy link

I detected an inconsistent prefix usage in SBML name space declaration that also leads to invalid SBML files.

@eromj
Copy link

eromj commented Oct 13, 2023

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 with the id 'M_10fthf_c'.
Line 28 Column 103:

@cdanielmachado
Copy link
Owner

Finally fixed this in version 1.6.0. Apologies that it took so long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants