yaml2sbml-dev / yaml2sbml

Tool to convert an ODE model specified in the YAML format to SBML.
https://yaml2sbml.readthedocs.io/en/latest/
Other
12 stars 7 forks source link

Issues when state variable begins with a number #107

Closed NicholasCowie closed 3 years ago

NicholasCowie commented 3 years ago

Hi :) There appears to be an issue when specifying state variables that begin with a number, a common instance is BiGG identifiers. I receive the following warning from your software when I run the test_failure.yaml file which is resolved when I run the test.yaml file, the only difference is changing "5mthf" -> "m5mthf". I just guessed that this may be an error and happened to get lucky, so it might be nice for others if there was an explicit warning.

Thanks for your help :)

Cheers, Nicholas

example_yaml.zip

RuntimeWarning: The value of the 'variable' field in all <assignmentRule> and <rateRule> definitions must be unique across the set of all such rule definitions in a model.
Reference: L3V1 Section 4.9.3
   The <rateRule> variable '' conflicts with the previously defined <rateRule> variable ''.

  warnings.warn(document.getErrorLog().getError(error_num).getMessage(), RuntimeWarning)
jvanhoefer commented 3 years ago

Hey Nicholas, first of all thank you for using our tool and reporting that bug!

My first guess would be, that the problem is, (I think) that identifiers of SBML species/parameters/... are not allowed to start with a number, but only with a letter. I will have a more detailed look into this and this also nicely aligns with #99 and #100, which I anyhow wanted to fix later this week :)

jvanhoefer commented 3 years ago

Just a short update: This should now also be checked: If in the SBML generation setting an identifier is not successful, yaml2sbml throws an error for the new release :)

NicholasCowie commented 3 years ago

Hi Jakob,

Thanks for getting everything to work so quickly and cheers for the updates :)