biothings / mychem.info

MyChem.info: A BioThings API for chemical/drug annotations
http://mychem.info
Apache License 2.0
16 stars 14 forks source link

Sort "sider" field by "sider.side_effect.frequency" #43

Closed greg-k-taylor closed 5 years ago

greg-k-taylor commented 5 years ago

This patch sorts the "sider" field in records by "sider.side_effect.frequency". The majority of the logic in the function is done in the "percent_float" function in "sider_parser.py". Note that a utility function for getting nested key values is also included. It is expected that this utility function will be moved to another location later.

greg-k-taylor commented 5 years ago

Note: the default values used for sorting records without a "sider.side_effect.frequency" is 101 which places these entries at the top of the list.