SD2E/opil

Allow specification of a unit for a `VariableFeature` without having to indicate a value

bjkeller opened this issue · 5 comments

Request is for a direct way to indicate that the concentration of a component in a combinatorial derivation should be specified.

I am currently doing this by adding a nonsensical measure to the component, such as

        concentration = sbol3.Measure(
            nan,
            SBO.concentration_of_an_entity_pool,
            identity='antibiotic_concentration'
        )
        concentration.description = "Antibiotic concentration"

may relate to #159

I think that for now at least, you need to at least indicate whether you want things in molar vs. grams/liter, etc. Or do you really want to be taking in every possible way a human might think of to express concentration on your end?

We will eventually be able to support more sophisticated reasoning about units, but for now, I think you need to pick one. We'll likely to be able to support generalized prefixing soon (e.g., mM vs. nM), but broader is more complicated.

I'm fine with picking a specific concentration unit. The issue is more with having to specify the value (e.g., nan).

Understood; for now, though, please do specify nan. This is a kludge until we agree on a good way to approach #135

Per discussion on Slack, we've decided to use a value of -1.0 as a kludge, since JSON serialization doesn’t allow NaN as a float value.