libsbgn icon indicating copy to clipboard operation
libsbgn copied to clipboard

explicitly unknown stoichiometry ("?") could be stored as NaN

Open adrienrougny opened this issue 1 year ago • 1 comments

From Amdreas: As far as storing in SBGN-ML goes, one could represent the ? with the actual numerical value NaN, so that the data type is always a number but renders as a question mark if not-a-number is given.

adrienrougny avatar Sep 05 '24 09:09 adrienrougny

What is the rationale behind that idea?

The stoichiometry (cardinality) is currently stored using a label element which is a generic element in SBGN-ML to store labels as strings. Thus, the stoichiometry (cardinality) is stored as a string and not as a number.

Changing SBGN-ML to store stoichiometry (cardinality) as numbers would probably be a breaking change for existing maps and tools (I'm not sure yet, need to think a bit more about this).

However, NaN can be stored right now as a string. It's then just a tool issue to interpret this correctly.

tczauderna avatar Oct 07 '24 17:10 tczauderna