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

feat: check SBML validity #126

Merged
merged 1 commit into from
Jun 26, 2018
Merged

feat: check SBML validity #126

merged 1 commit into from
Jun 26, 2018

Conversation

BenjaSanchez
Copy link
Contributor

Main improvements in this PR:

Following up on the discussion in #125, saveYeastModel.m now errors if the saved model is not an SBML valid structure.

I hereby confirm that I have:

  • Tested my code with all requirements for running the model
  • Selected devel as a target branch (top left drop-down menu)
  • If needed, asked first in the Gitter chat room about this PR

Saving function will error if the model is not SBML compliant
@BenjaSanchez BenjaSanchez added the enhancement new field/feature label Jun 25, 2018
@BenjaSanchez BenjaSanchez self-assigned this Jun 25, 2018
@BenjaSanchez BenjaSanchez requested a review from edkerk June 25, 2018 08:11
Copy link
Member

@edkerk edkerk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be informative to print any occuring errors: include errors in the error() message

@BenjaSanchez
Copy link
Contributor Author

@edkerk TranslateSBML already prints those errors when called. For instance, if 2 gene labels are removed, the following is printed by saveYeastModel:

The model contains 2 errors.

************************************************************
Line ErrorId Severity Message

122963: (2021203)  Error A <GeneProduct> object must have the required attributes 'fbc:id' and 'fbc:label' may have the optional attributes 'fbc:name' and 'fbc:associatedSpecies'. No other attributes from the SBML Level 3 Flux Balance Constraints namespace are permitted on a <GeneProduct> object. 
Reference: L3V1 Fbc V2 Section 3.5
 Fbc attribute 'label' is missing from 'geneProduct' object.


122964: (2021203)  Error A <GeneProduct> object must have the required attributes 'fbc:id' and 'fbc:label' may have the optional attributes 'fbc:name' and 'fbc:associatedSpecies'. No other attributes from the SBML Level 3 Flux Balance Constraints namespace are permitted on a <GeneProduct> object. 
Reference: L3V1 Fbc V2 Section 3.5
 Fbc attribute 'label' is missing from 'geneProduct' object.


Error encountered during read.

Error using saveYeastModel (line 28)
Model should be a valid SBML structure. Please fix all errors before saving.

@BenjaSanchez BenjaSanchez merged commit 79efde7 into devel Jun 26, 2018
@BenjaSanchez BenjaSanchez mentioned this pull request Jun 26, 2018
@BenjaSanchez BenjaSanchez deleted the feat/SBMLvalidityCheck branch July 7, 2018 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new field/feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants