SD2E / opil

The Open Protocol Interface Language (OPIL) is intended as a standard language for protocol interfaces
5 stars 1 forks source link

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

Open bjkeller opened 3 years ago

bjkeller commented 3 years ago

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"
bjkeller commented 3 years ago

may relate to #159

jakebeal commented 3 years ago

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.

bjkeller commented 3 years ago

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

jakebeal commented 3 years ago

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

bbartley commented 3 years ago

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.