Relax validation rule 10503

5 views
Skip to first unread message

Matthias König

unread,
Jun 22, 2021, 12:06:57 PM6/22/21
to libsbml-development
Hi all,

I my opinion the validation rule 10503 is much too restrictive and hampers development of models with multiple different participants such as metabolites, proteins and mRNA encoded in the species formalism.

> 10503 The unit of measurement associated with the mathematical formula in the MathML math element of every KineticLaw object in a model should be identical to all KineticLaw objects in the model. (References: SBML L3V1 Section 3.4; SBML L3V2 Section 3.4.)

The rule enforces that all KineticLaw objects have the same units, which is in the end basically substanceUnit/timeUnit. As a consequence the rule enforces that all species must have the same substanceUnit!
Consequently one can not mix species which different substanceUnits, e.g. using `mmole` for metabolites and `dimensionless` for relative mRNA or protein levels in a single model.

The much better (and more relaxed) rule is that all KineticLaws affecting species in a single connected component of the species-reaction graph must have the identical units.
E.g. a model with metabolites S1 and S2 and proteins P1 and P2
S1 -- r1--> S2 -- r2 -->, with S1 and S2 metabolites with substanceAmount [mmole], time in [min];
P1 -- r3--> P2; P2 -- r4 --> P3, with P1 and P2 proteins with substanceAmount [dimensionless], time in [min];
The resulting units of the reactions are
r1, r2, dS1/dt, dS2/dt: [mmole/min];
r3, r4, dP1/dt, dP2/dt: [dimensionless/min]; 
P1 would be a modifierSpecies of r1 and P2 a modifierSpecies of r2 (which couples the subgraphs via regulation, but not stoichiometric matrix).

This is a completely valid model and the two separate components in the species-reaction graphs can have different units.

The workaround to use parameters for the proteins with RateRules looses the species-reaction graph, i.e. the stoichiometric matrix,  and requires to create this manually for the rate rule. Also the model cannot be visualized nicely any more.

This is a recurring issue with coupling signalling to metabolic networks for me and also in the coupling of different models with comp (which often don't use the same substanceAmounts for species, but are unconnected components in the species-reaction graph.

Suggestion: relax rule 10503 as described above and update the validator accordingly.

Best Matthias

Frank T. Bergmann

unread,
Jun 23, 2021, 7:31:24 AM6/23/21
to libsbml-development

As the warning is in the SBML specification, I think this needs to be discussed in sbml-discuss first, and the editors. 

LibSBML and the validator should change only once the spec has been updated. 

Cheers
Frank

Matthias König

unread,
Jul 13, 2021, 7:51:07 AM7/13/21
to LibSBML Development List
Hi Frank,
thanks for the answer. I just tried to create some examples for the issue on sbml-discuss but found a solution while doing this.

Apparently, one idea in the design of SBML L3 was to have one global extent unit for species with all KineticLaws having extent/time.
To account for the case that sometimes species do not have the same units the conversionFactors were introduced on Species. While this approach seems unintuitive to me it apparently works. By using model and species conversion factors the units of species can be adapted to give valid SBML files.

See specification 4.6.7:
In SBML, the unit of measurement associated with a species’ quantity can be different from the unit of extent of reactions in the model. SBML avoids implicit unit conversions by providing an explicit way to indicate any unit conversion that might be required. The use of a conversion factor in computing the effects of reactions on a species’ quantity is explained in Section 4.11.7 on p. 78. Because the value of the conversion Factor attribute is the identifier of a Parameter object, and because parameters can have units attached to them, the transformation from reaction extent units to species units can be completely specified using this approach.

So problem solved, and learned something about SBML in the process ;).
Best Matthias


--
You received this message because you are subscribed to a topic in the Google Groups "libsbml-development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/libsbml-development/m2AD4yW_dUE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to libsbml-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/libsbml-development/19dcb606-da31-4cc2-a2a6-fa2770362825n%40googlegroups.com.


--
Matthias König, PhD.
Junior Group Leader LiSyM - Systems Medicine of the Liver
Humboldt Universität zu Berlin, Institute of Biology, Institute for Theoretical Biology
  https://livermetabolism.com
koni...@googlemail.com
https://github.com/matthiaskoenig
Tel: +49 30 2093 98435
Reply all
Reply to author
Forward
0 new messages