chembl / GLaDOS

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

Drug Warning Component renders information for the same compound on all compound report cards. #1284

Closed davidcblaney closed 3 years ago

davidcblaney commented 3 years ago

Hi,

It seems that in Vue frontend project in datasets/generators/compound/DrugWarningInfo.js, there is a hard-coded Chembl ID. This causes all Drug Warnings sections to be rendered with the same data.

I would open a PR but I'm not sure if or how you guys accept contributions.

Here is a diff of the changes needed to fix this component. I have tested this locally and the data returned for components now matches that of the API.

--- datasets/generators/compound/DrugWarningInfo.js (revision 7f68bda0abaafa3ecc0a0b429b3237b32c88158f)
+++ datasets/generators/compound/DrugWarningInfo.js (revision 706087b7eca9a5acab2cdfa42581b53bfd9d52c1)
@@ -8,7 +8,7 @@
           must: [
             {
               terms: {
-                'drug_warning._metadata.all_molecule_chembl_ids': ['CHEMBL118'],
+                'drug_warning._metadata.all_molecule_chembl_ids': [chemblID],
               },
             },
           ],

Many thanks for your great tool and hard work, David

nclopezo commented 3 years ago

Hi @davidcblaney,

Thank you very much for noticing this error! It is fixed and deployed now. The code for the vue components is here, in the EBI's gitlab: https://gitlab.ebi.ac.uk/chembl/chembl/main-web-interface/glados-frontend-vue Only a few of the components are in vue, but the plan is to replace the current ones to vue one by one.

davidcblaney commented 3 years ago

Great stuff and thanks. We have just checked out the compounds we were interested in it is fixed 👍

OK, yea, I was looking at the source there. Can anyone sign up to your gitlab and open a PR? Wasn't sure if it was private.

nclopezo commented 3 years ago

The repository is public, and it should allow PRs from external users. But to be honest I haven't checked that case.