chembl/chembl_webservices_2

Include short data validity comment in activity endpoint

Closed this issue · 4 comments

Using the DATA_VALIDITY_LOOKUP table:

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

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

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",
  . . .
}

Can you please check now?

it looks good thanks!