University of Utah
Re: No defaults in SBML L3
23 Sep '09 08:47
This sounds like it solves most of the issues discussed. However, I
would also like to suggest the following:
Allow the readSBML file to take an optional argument that says what
level and version is desired. In other words, the function would read
the file, determine its level and version, and perform the necessary
conversion to get it to the desired level and version. I assume that
conversions from L2 to L3 would fill in default values as specified in
the L2 specification. The reason I want this is I want my tool to be
able to assume that all models are in the latest level and version.
Having a writeSBML that can convert and write could also potentially
On Sep 23, 2009, at 8:08 AM, Sarah Keating wrote:
>> The question is then, how can you tell from a file whether it is the
>> product of writing or saving? It makes sense to make both similar to
>> allow them to be read by the same code, while at the same time, you
>> want to have them marked clearly.
> I've been thinking about this. What about the following:
> A) libSBML has two reading and two writing functions:
> 1) readSBML 3) loadSBML
> 2) writeSBML 4) saveSBML
> 1) readSBML - as now; reads in an sbml file whether valid or not
> 2) writeSBML(bool strict = false); will only write out a model where
> required values have been specified by the user; with the optional
> strict flag to indicate that the user only wants a completely valid
> file to be written.
> 3) & 4) read and write sbml BUT with no assumptions about required
> values, validity etc. In order to allow libSBML to identify these they
> are written using the namespace 'sbml-temporary'.
> Obviously 3 & 4 need not be exposed to the user but 1/2 could work out
> from the namespace what sort of checks to impose.
> I presume that no one would ever really want to exchange these models,
> they are merely a way of allowing a user to save unfinished work. Thus
> it would be possible to provide the facility to let the software
> specify the temporary namespace.
> B) libSBML does not automatically provide default values
> Instead - there are functions for any components that have required
> values that allow the user to set the default values from the L2 spec.
> e.g. Unit::setRequiredValuesAsL2Default()
> would set exponent=1, scale=0,multiplier=1
> This would still mean that users have to call a function but it
> the need for the user to track what values are required. And there
> even be a Model::setRequiredValuesAsL2Default() that just loops
> everything :-)
> I know there is a downside to B) namely that attributes that didn't
> exist in L2 are not covered and it still doesn't help me with how to
> give a boolean a value that is Not-A-Boolean BUT ...
> Am I thinking along lines that might satisfy most people ??
> To manage your libsbml-development list subscription, visit
> For a web interface to the libsbml-development mailing list, visit
> For questions or feedback about the libsbml-development list,
> contact email@example.com
To manage your libsbml-development list subscription, visit
For a web interface to the libsbml-development mailing list, visit
For questions or feedback about the libsbml-development list,
Powered by FUDforum. (Copyright Advanced Internet Designs Inc.)