SBRG / bigg_models

The BiGG Models website server
http://bigg.ucsd.edu
Other
80 stars 18 forks source link

General SBML unit question about second multiplier #267

Closed smoretti closed 7 years ago

smoretti commented 7 years ago

Hi

I have a general SBML question about unit tag and the value of multiplier for second. Most models use mmol_per_gDW_per_hr, they define mole, gram, and second. They all use exponent="-1" for second because this is "per hour". But they do not use the same value for multiplier, to go from second to hour.

For BiGG models and some others, the multiplier value is 3600. For SEED and BioCyc models, the multiplier value is 1/3600.

What is the right value for second in mmol_per_gDW_per_hr ? The SBML documentation about that is poor.

zakandrewking commented 7 years ago

I'm not sure what the correct approach is. Maybe another one @draeger can shed light on?

djinnome commented 7 years ago

According to: http://sbml.org/Software/libSBML/docs/java-api/org/sbml/libsbml/Unit.html

Lastly, the attribute named 'multiplier' can be used to multiply the unit by a real-numbered factor; this enables the definition of units that are not power-of-ten multiples of SI units. For instance, a multiplier of 0.3048 could be used to define foot as a measure of length in terms of a metre.

Based on this, I think it should be 3600 to define hour as a measure of time in terms of a second.

smoretti commented 7 years ago

I have posted the same issue on the SEED github to see what they think about that.

An official example in the SBML documentation would be great for second to hour, with multiplier, scale and exponent, instead of meter to foot for which scale and exponent have default values (1). I agree that according to the documentation 1 hour = 3600 * 1 second, so 3600 should be the multiplier value but the exponent value has to be included also.

In all models I checked for kind="second" the exponent value is always set at -1

1 hour = 3600 seconds != (3600 * 1 second)^-1

So to be right

multiplier = 3600 AND exponent = 1 or multiplier = 1/3600 AND exponent = -1

If I get the SBML documentation right

smoretti commented 7 years ago

And as it is per hour, maybe another exponent -1 has to be used?

draeger commented 7 years ago

mmol_per_gDW_per_hr = 10^-3 mol gDW^-1 h^-1 = 10^-3 mol gDW^-1 (3600 * s)^-1

draeger commented 7 years ago

Maybe I should explain this a bit better. 3600 seconds are one hour and we are dividing by hour. The examples in the SBML specification have similar cases. For instance, the most recent specification of SBML Level 3 Version 1 Release 2 gives the example millimoles per litre per second (see page 40 of this document: http://sbml.org/Special/specifications/sbml-level-3/version-1/core/release-2/sbml-level-3-version-1-core-release-2.pdf). There you see that the seconds here also have the exponent -1.

It was a misunderstanding to use 1/3600 when first trying to encode COBRA models in SBML, which you can see in the supplement https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3319681/bin/NIHMS364945-supplement-Supplementary_Material.docx). This has now been corrected in COBRA Toolbox and is no longer used this way. In other words, when you export a model from COBRApy or COBRA Toolbox now, it will use (3600 s)^-1 to encode per hour in SBML.

smoretti commented 7 years ago

So for kind="second" in mmol_per_gDW_per_hr, scale="0", exponent="-1" and multiplier="3600".

This should be added in the SBML documentation as mmol_per_gDW_per_hr is often used in models, and as I mentioned I found lots of models with 1/3600 as multiplier.

draeger commented 7 years ago

Thanks! I will bring this up during the next SBML editors meeting. We can definitely include such an example in SBML Level 3 Version 2, for which no final specification has been released yet.

In order to include this into the specification of L3V1 another release would be necessary (releases are new versions of an existing specification with only textual changes that don't have any impact on implementations). I will also suggest to add such an example there as well.

zakandrewking commented 7 years ago

Is this still an open issue for BiGG? I'm happy to leave it open if further discussion is warranted.

draeger commented 7 years ago

I am always a bit hesitant with closing items, but it seems to me that everything was discussed, so that this can actually be closed.

smoretti commented 7 years ago

This is clear for me now. I think you can close it