chembl / chembl_webservices_2

Source code of the ChEMBL web services.
https://www.ebi.ac.uk/chembl/ws
Other
16 stars 3 forks source link

Include short data validity comment in activity endpoint #147

Closed juanfmx2 closed 6 years ago

juanfmx2 commented 7 years ago

Using the DATA_VALIDITY_LOOKUP table:

select concat(concat(concat(concat('"',d.DESCRIPTION ),'": "'), d.DATA_VALIDITY_COMMENT), '",') from DATA_VALIDITY_LOOKUP d;

mnowotka commented 6 years ago

This is now implemented for example: https://www.ebi.ac.uk/chembl/api/data/activity/32190.json. Field name is "activity_comment".

juanfmx2 commented 6 years ago

activity comment and data validity comment are different, the short version of the comment is already present in the activity table. select distinct(act.DATA_VALIDITY_COMMENT) from activities act where act.DATA_VALIDITY_COMMENT IS NOT NULL

However, the web service exposes the long one: https://www.ebi.ac.uk/chembl/api/data/activity/4773286.json

Probably from: select d.DESCRIPTION, d.DATA_VALIDITY_COMMENT from DATA_VALIDITY_LOOKUP d;

screen shot 2018-02-06 at 14 34 53

it should expose both:

probably as:

{
  . . .
  "data_validity_comment": "<SHORT FORM>",
  "data_validity_comment_description": "<LONG FORM>",
  . . .
}

{
  . . .
  "data_validity_comment": "Outside typical range",
  "data_validity_comment_description": "Values for this activity type are unusually large/small, so may not be accurate",
  . . .
}
mnowotka commented 6 years ago

Can you please check now?

juanfmx2 commented 6 years ago

it looks good thanks!