chembl / GLaDOS

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

Things to amend - March 2023 #1313

Open nclopezo opened 1 year ago

nclopezo commented 1 year ago

Slack Message

nclopezo commented 1 year ago

There is a new version of the drug indications browser on the staging environment: https://wwwdev.ebi.ac.uk/chembl/web_components/explore/drug_indications/

The references are now more clearly separated by the chembl id where they come from:

Screenshot 2023-04-13 at 12 18 27
nclopezo commented 1 year ago

It also updates the compound report card section:

Screenshot 2023-04-13 at 12 24 29
FionaEBI commented 1 year ago

Hi @nclopezo This looks okay - but is not quite right yet, sorry.

e.g. When I look at the drug indications for e.g. SORAFENIB CHEMBL1336, then the first row of the compound report card indications shows CHEMBL1336 as the alternative form (but it is the parent!). See screenshot: Screenshot 2023-04-17 at 11 20 08

The efo_id and efo_term are missing from the table in the compound report card?

FionaEBI commented 1 year ago

When I click ("inline") on a reference in the compound report card in the drug_indications section, then it gives a broken link. Although the link works if I right-click to open in a new tab! See screenshot. Screenshot 2023-04-17 at 11 37 35

mpaulam commented 1 year ago

CHEMBL1699 (memantine hydrochloride) doesn't show any indications from the salt page (https://wwwdev.ebi.ac.uk/chembl/compound_report_card/CHEMBL1699/) but it does show indications from the parent page (https://wwwdev.ebi.ac.uk/chembl/compound_report_card/CHEMBL807/)

nclopezo commented 1 year ago

Those problems should be fixed now.

FionaEBI commented 1 year ago

@nclopezo Thanks.

  1. The issues with labelling of the parent compound and including the efo_id and efo_term are correct now :-)

  2. However there are still issues with the parent compound displaying all indications, but the alternative form compound report card does not. e.g. https://wwwdev.ebi.ac.uk/chembl/compound_report_card/CHEMBL1336/ The first screenshot shows the parent indications (sorted by max phase in descending order). If you look at the second row (Thyroid Neoplasms) then there are indications from the parent and two salts. But neither of the salts has this indication when I look at the individual compound report cards (2nd and 3rd screenshot). Screenshot 2023-04-24 at 10 39 04 Screenshot 2023-04-24 at 10 39 23 Screenshot 2023-04-24 at 10 39 38

  3. Also - it would be really helpful to have the default sorting of max_phase in descending order, please? This would be in both the drug_indications browser and in the individual compound report cards. It is a really common feature to sort the indications / warnings / mechanisms by max_phase. But most people want to see the approved drugs (ie 4) first, and the lowest clinical phase (0.5 / 1) last. Is this an easy fix to do at the same time?

FionaEBI commented 1 year ago

There's also an issue with the link to Clinical Trials - but I believe the issue is either at the Clinical Trials end, or results from how we format the ClinicalTrial URL? e.g. this returns ALL results.

https://clinicaltrials.gov/search?id=%22NCT02870569%22OR%22NCT03602495%22

But this returns the correct results: https://clinicaltrials.gov/ct2/results?cond=&term=%22NCT02870569%22OR%22NCT03602495%22&cntry=&state=&city=&dist=

Do you have any comments about this? Paula and I think that Clinical Trials is in the process of updating their API, and this may be the issue? For their URL, do you think that we are incorrectly formatting the URL currently? ie something has changed in the formatting of the URL that we are not aware of? If you think that we need to change the method to format the URL, then please do say? Thanks for your advice!

nclopezo commented 1 year ago
nclopezo commented 1 year ago

The default sorting has now been applied.

nclopezo commented 1 year ago

@FionaEBI. Regarding the incoherence in the references, the data comes with those references. I guess this is not expected? @juanfmx2

The references for CHEMBL1336, with mesh id D013964, have the following data:

{
          "drug_indication" : {
            "indication_refs_by_molecule" : {
              "CHEMBL1200485" : [
                {
                  "ref_id" : "NCT00095693",
                  "ref_url" : "https://clinicaltrials.gov/search?id=%22NCT00095693%22",
                  "ref_type" : "ClinicalTrials"
                }
              ],
              "CHEMBL1336" : [
                {
                  "ref_id" : "NCT00887107,NCT01025453,NCT01141309,NCT01263951,NCT02084732,NCT02143726,NCT03565536",
                  "ref_url" : "https://clinicaltrials.gov/search?id=%22NCT00887107%22OR%22NCT01025453%22OR%22NCT01141309%22OR%22NCT01263951%22OR%22NCT02084732%22OR%22NCT02143726%22OR%22NCT03565536%22",
                  "ref_type" : "ClinicalTrials"
                }
              ],
              "CHEMBL4297490" : [
                {
                  "ref_id" : "NCT02870569,NCT03602495",
                  "ref_url" : "https://clinicaltrials.gov/search?id=%22NCT02870569%22OR%22NCT03602495%22",
                  "ref_type" : "ClinicalTrials"
                }
              ]
            }
          }
        }

And this is what is shown in the table. Is this incorrect?

You can get the data with this query:

GET chembl_drug_indication_by_parent/_search
{
  "_source": "drug_indication.indication_refs_by_molecule", 
  "query": {
    "bool": {
      "must": [
        {
          "terms": {
            "drug_indication.parent_molecule_chembl_id": [
              "CHEMBL1336"
            ]
          }
        },
        {
          "terms": {
            "drug_indication.mesh_id": [
              "D013964"
            ]
          }
        }
      ]
    }
  }
}
FionaEBI commented 1 year ago

@nclopezo Thanks for the most recent message.

  1. The data that you pasted yesterday is missing some references - it only appears to have taken one reference per salt/parent drug, although there are multiple rows in the sql table in chembl. (There are three rows of references for CHEMBL1200485 (SORAFENIB TOSYLATE); four rows of references for CHEMBL1336 (SORAFENIB) and one row for CHEMBL4297490 (CM-4307). This is the sql query:

select md.chembl_id, md.pref_name, ind., iref. from chembl_32.molecule_dictionary md join chembl_32.drug_indication ind on md.molregno = ind.molregno join chembl_32.indication_refs iref on ind.drugind_id = iref.drugind_id where md.chembl_id in ('CHEMBL1336','CHEMBL1200485','CHEMBL4297490') and ind.mesh_id = 'D013964';

And I've put a screenshot of the sql results: Screenshot 2023-05-24 at 11 46 15

Please can we discuss this further? I'd like to know how the Elastic Search query is created - where exactly does it take the data from? Please can you point me to the code? Thanks.

2 re url links: I agree that the url link comes from the data in ChEMBL / drugbase. I received a reply from ClinicalTrials today and they confirmed that the url link that we had been using was out-of-date. They have suggested a correct version like this (where the substring "search" is replaced by "ct2/results"). So today I've corrected this on ChEMBL - so that the url link will be correct for the next release. So that issue is now complete - great!

nclopezo commented 1 year ago

The query to get the data is created like this:

From the indications obtained in the query, it looks at the drug_indication.indication_refs_by_molecule field. It looks like that field does not contain the correct references. Maybe we can discuss it with @juanfmx2 on Thursday.

nclopezo commented 1 year ago

There is a new page for Drug Mechanisms available on wwwdev: https://wwwdev.ebi.ac.uk/chembl/

@juanfmx2, for drug indications, the way it decides if the section is shown is

if _metadata.drug_indications.length > 0:
    show
else:
    hide

But I didn't find an easy way to do it for drug mechanisms on the chembl_molecule index. Is there any property that I can use to check that on the chembl_molecule index?

In the old version it just waits until the data is loaded, and if no mechanisms are received it hides the section. I would prefer to do it from a property on the chemb_molecule if possible.