dieterich-lab / medex

Intuitive Graphical User Interface for Medical Data Exploration
MIT License
4 stars 3 forks source link

TableBrowser/by measurement: Nummerical fields are sorted alphabetical #33

Closed HaraldWilhelmi closed 1 year ago

HaraldWilhelmi commented 1 year ago

The row data used by table browser is cast to string before doing any sorting. That is required in the 'flat format' because here numerical and categorical data are mixed in the 'value' column.

In the 'by measurement' format however we have one data type per field. However the the code for the 'flat' case is re-used. As a result all values are sorted alphabetical even if they are clearly numerical, e.g. we get the incorrect sorting [10, 11, 9] instead of the expected [9, 10, 11].

To fix that we need to move form the union clause used with flat case to a multiple self-join.

HaraldWilhelmi commented 1 year ago

That is long merged.