ElucidataInc / ElMaven

LC-MS data processing tool for large-scale metabolomics experiments.
https://resources.elucidata.io/elmaven/
GNU General Public License v2.0
86 stars 52 forks source link

Sort compound names using Natural Sort Order, not ASCII order #481

Open lparsons opened 6 years ago

lparsons commented 6 years ago

Currently, it seems that the peak list (and possibly other places), ElMaven is sorting using an ASCII sort order instead of an alphabetic (or better yet, natural) sort order. This was reported by Li Chen in the Rabinowitz Lab.

lparsons commented 6 years ago

I've been unable to confirm since ElMaven crashes after loading any of the data files I have. I've not yet determined if it's a data issue, compilation issue, or bug. The compound list appears to have all names converted to UPPERCASE, thus this issue may be masked there.

lparsons commented 6 years ago

I have worked around my crashing issues (see #482) and confirmed that at least the Peak Table widget sorts the ID column in ASCII order. This should be at least alphabetical, though probably better yet, natural sort order.

chubukov commented 6 years ago

That sounds fine to me, the only thing i would add is that if we don't convert names to uppercase, to retain the search as case-insensitive.

lparsons commented 6 years ago

Totally agree. In fact, I'm not really sure why any names are converted to upper case, I'd likely prefer they remain as entered by the user (in the .csv file) everywhere in the interface. At the very least for consistency. However, I believe that most people prefer a natural sort order (certainly few, if any, would want or expect an ASCII sort order).

lparsons commented 6 years ago

I believe the using natural sort order would also address issue #466.