Up until now libSBML allows a user to convert an invalid model between
levels/versions of SBML. Obviously the user can validate both the source
model and the converted model; but if the source model is invalid then
the converted model will be also.
SBML L2V4 actually introduces a different scenario. Given the relaxation
of rules relating to units and sboTerms it is possible to convert a
valid L2V4 model into an invalid model. In fact, libSBML-3.3.0 does NOT
let you do this. However, Ralph Gauges raised the point that this is in
fact a behaviour change. It is perfectly possible to convert an L2V3
model with bad units into an L1V2 model and so it should be possible to
convert an L2V4 model with bad units to L1V2. Given this is an
unexpected change we will relax the conversion code for libSBML-3.3.1
and allow conversion of L2V4 models with bad units.
But, this does raise an issue. libSBML-4 will be much stricter about the
creation of invalid SBML and so we need to consider what the conversion
code should do and what is the responsibility of the user.
There are three options:
1) allow conversion regardless of the validity of either the source or
the target
2) disallow conversion from a valid model to an invalid model but allow
conversion of valid to valid and invalid to invalid models
3) only allow conversions of a valid model that will produce a valid model
QUESTION: Which option seems preferable ?
Pre-empting the replies I know I will get (for all you "I don't care
about units" people) there is of course the next question:
QUESTION: if we go with option 3 should it be possible to ignore certain
validation checks when determining the validity of the models ?