#792 closed enhancement (fixed)
Add support for units to annotation values
Reported by: | Nicklas Nordborg | Owned by: | Nicklas Nordborg |
---|---|---|---|
Priority: | major | Milestone: | BASE 2.9 |
Component: | core | Version: | |
Keywords: | Cc: |
Description (last modified by )
See trunk/doc/src/docbook/figures/uml/datalayer.annotations.png for an UML diagram.
Philippe wrote:
Hi Nicklas, base-developpers,
Dominic an myself are currently working on a MAGE-TAB*(http://www.mged.org/mage-tab/) importer for BASE2. The format allows specifying Units to qualify descriptors such as protocol parameter, experimental factors, biomaterial descriptors. I can be quite handy for instance when having to report doses ranges of various compound fed to animals. When trying to get the unit information in BASE2, we are facing the following: Essentially, in order to retain unit information, we have to 'squeeze the information in an Annotation Type of type string that will get the numerical value + the unit value represented in the MAGE-TAB document.
Several drawbacks in using this mechanism in BASE2
- loss of data type
- loss of data validation capability offered by BASE2 Annotation Type
- loss of computation (using BASE formulas for instance) over numerical Annotation types.
The other option of creation several Annotation Type of type float with different labels to reflect unit changes, has serious User friendlyness issues.
Are there any plans to provide a support for units in BASE2 Annotation Type, and if so on which timeline ?
It is not on the timeline. I remember that we discussed it a long time ago, but it was never added as a ticket to the trac system. I think the earliest we can do is for the 2.6 relese. 2.5 is already overloaded with features.
Is it a viable options to alter Float Value and Integer Value for Annotation Type in BASE2 to allow for specification of units (possibly as free text in a first go) ?
Not if we want to do something better in the future. It is very hard to change a temporary solution.
(I reckon this would requires changes to the interface..)
Are we the only BASE2 users confronted with this units/annotation type pb and would there people out there interested in developing this feature and contribute it to BASE2 ?
I remember a few ideas that I had when this issue was discussed earlier.
- A central registry of units that defines all possible units (much like we have for MIME types already).
- To each (numerical) annotation type is an (optional) list of units that are possible to use.
- When annotating an item the user can select one of the possible units as defined by the annotation type.
There will be some problems with queries:
- If we ignore units: >=5 finds items with 5mg and 5g but not 2g
- If we require exact match of unit: >=5mg finds items with 5mg but not 0.005g
A possible solution is to convert all unit-enabled annotations to a standard unit before they are stored in the database. For example, all weights are stored in grams. Query filters are also converted to the standard unit before they are applied. The original unit is remembered by each annotation and the values are converted back when displayed. A drawback is that the conversion can only work for float/double annotation values.
/Nicklas
Change History (34)
comment:1 by , 16 years ago
Milestone: | BASE 2.x+ → BASE 2.9 |
---|
comment:2 by , 16 years ago
comment:4 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:5 by , 16 years ago
comment:6 by , 16 years ago
Description: | modified (diff) |
---|
comment:7 by , 16 years ago
comment:8 by , 16 years ago
comment:9 by , 16 years ago
comment:10 by , 16 years ago
(In [4544]) References #792: Add support for units to annotation values
- Made it possible to select a default unit for an annotation type
- Display annotations with units on the "Annotations" tab in the single-item view
- Test for displaying annotations with units in list pages on the Array designs list page
comment:11 by , 16 years ago
comment:12 by , 16 years ago
comment:13 by , 16 years ago
comment:14 by , 16 years ago
comment:15 by , 16 years ago
comment:16 by , 16 years ago
comment:17 by , 16 years ago
comment:18 by , 16 years ago
comment:19 by , 16 years ago
(In [4557]) References #792: Add support for units to annotation values
Made UnitSymbols.symbol a case-sensitive column so we can tell the difference between units with milli (m) and mega (M) prefixes.
comment:20 by , 16 years ago
comment:21 by , 16 years ago
comment:22 by , 16 years ago
comment:23 by , 16 years ago
comment:24 by , 16 years ago
comment:25 by , 16 years ago
comment:26 by , 16 years ago
comment:27 by , 16 years ago
comment:28 by , 16 years ago
comment:30 by , 16 years ago
(In [4632]) References #792: Add support for units to annotation values
Fixes a permission problem with annotation flat file importer that doesn't try to use units, but still receieved a PermissionDeniedException
Lots of units and conversion factors: http://www.convertworld.com