chembl / GLaDOS

Web Interface for ChEMBL @ EMBL-EBI
https://www.ebi.ac.uk/chembl/
Other
46 stars 6 forks source link

REST API: Error when conducting a similarity search with order by pref name #1185

Closed harryjubb closed 5 years ago

harryjubb commented 5 years ago

I'm using similarity search via the REST API and having issues when combining a similarity search with order_by.

Based on the SMILES similarity search example under the "Getting started" examples:

The original working example: https://www.ebi.ac.uk/chembl/api/data/similarity/CN1C(=O)C=C(c2cccc(Cl)c2)c3cc(ccc13)[C@@](N)(c4ccc(Cl)cc4)c5cncn5C/80

Returns a valid result.

Trying to add ?order_by=pref_name: https://www.ebi.ac.uk/chembl/api/data/similarity/CN1C(=O)C=C(c2cccc(Cl)c2)c3cc(ccc13)[C@@](N)(c4ccc(Cl)cc4)c5cncn5C/80?order_by=pref_name

Returns:

<response>
<error_message>
The object '<MoleculeDictionary: Molecule 389456 (CHEMBL243659) (S)-TIPIFARNIB>' has an empty attribute 'similarity' and doesn't allow a default or null value.
</error_message>
</response>

Other queries (e.g. substructure) appear to be supporting order_by=pref_name without any issue.

The error has occurred for every valid SMILES string I've tried so far.

nclopezo commented 5 years ago

I just moved this issue to the repository of the REST API.

nclopezo commented 5 years ago

I will close this one, so the discussion continues in https://github.com/chembl/chembl_webservices_2/issues/177

harryjubb commented 5 years ago

Ah thank you, hadn't realised I'd put it in the wrong place 😅