Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Things to amend - March 2023 #1313

Open
3 of 4 tasks
nclopezo opened this issue Mar 28, 2023 — with Slack · 14 comments
Open
3 of 4 tasks

Things to amend - March 2023 #1313

nclopezo opened this issue Mar 28, 2023 — with Slack · 14 comments
Assignees

Comments

Copy link
Member

nclopezo commented Mar 28, 2023

  • Amend the drug_indications and drug_mechanism section of the compound report card so that parent and alternative drug forms are clearly specified (use the existing example that we have for drug_warnings on the compound report card)

  • Drop the section of the compound report card called “Clinical Data” because the link to clinical trials is not curated data, and the link to the Cochrane Data is nothing to do with ChEMBL as far as we are aware (this was part of the old interface)

  • Amend the drug_mechanisms section of the compound report card so that any salt data is aggregated onto the parent drug. But salt data is not assigned (sideways) to the other salts within a compound family. This would make the mechanism data consistent with drug_indications and drug_warning data.

  • Create a “source” bubble on the front page that has a table that can link each source to the various ChEMBL entities (compounds, targets, assays, documents etc).

Slack Message

@nclopezo
Copy link
Member Author

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
Copy link
Member Author

It also updates the compound report card section:
Screenshot 2023-04-13 at 12 24 29

@FionaEBI
Copy link

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
Copy link

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
Copy link

mpaulam commented Apr 17, 2023

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
Copy link
Member Author

Those problems should be fixed now.

@FionaEBI
Copy link

@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
Copy link

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
Copy link
Member Author

nclopezo commented Apr 24, 2023

  • The Clinical Trials links come from the database, they should be updated in the database, the interface does not modify them or generates them.
  • The query used for the indications should be the same as the one used currently:
    • For the parent CHEMBL1336 is drug_indication.parent_molecule_chembl_id:CHEMBL1336
    • For the Alt. Form. CHEMBL1200485 is drug_indication.molecule_chembl_id:CHEMBL1200485
      @juanfmx2 is there a better way to create those queries? You can see the query when you click on 'Browse all' and then see the dataset description.
  • I can add the default sorting.

@nclopezo
Copy link
Member Author

nclopezo commented May 3, 2023

The default sorting has now been applied.

@nclopezo
Copy link
Member Author

nclopezo commented May 23, 2023

@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
Copy link

@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
Copy link
Member Author

The query to get the data is created like this:

  • If it is a parent, for example CHEMBL1336, then the query to get the indications is drug_indication.parent_molecule_chembl_id:CHEMBL1336
  • Else, for example CHEMBL1200485, then the query is drug_indication.molecule_chembl_id:CHEMBL1200485
    This queries are exactly the same as in the current version.

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
Copy link
Member Author

nclopezo commented Jul 7, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants