chembl / chembl_webservices_2

Source code of the ChEMBL web services.
https://www.ebi.ac.uk/chembl/ws
Other
16 stars 3 forks source link

Targets: add a list of Approved Drugs and Clinical Candidates #98

Closed nclopezo closed 8 years ago

nclopezo commented 8 years ago

For the information obtained for a target, for example CHEMBL2364672: Could a list of the target Approved Drugs and Clinical Candidates?

Like this:

{
  organism: "Bacteria",
  pref_name: "Bacterial DNA-directed RNA polymerase",
  species_group_flag: true,
  target_chembl_id: "CHEMBL2364672",
  target_components: [ ... ],
  approved_drugs_clinical_candidates: [
     { 
        chembl_id: "CHEMBL1852",
        name: "RIFAMPICIN",
        mechanism_of_action: "Bacterial DNA-directed RNA polymerase inhibitor",
        max_phase: 4,
        references: [
          {
            source: "PubMed",
            url:"http://europepmc.org/abstract/MED/4942761"
          },
          ...
          ]

     },
      ....
mnowotka commented 8 years ago

To get the information you need, you have to make two URL calls:

  1. Get all activities linked to your target: https://www.ebi.ac.uk/chembl/api/data/activity?target_chembl_id=CHEMBL2026
  2. Now you can extract molecule_chembl_ids from there and do https://www.ebi.ac.uk/chembl/api/data/molecule?molecule_chembl_id__in=CHEMBL1172,CHEMBL1200392,CHEMBL1200395,CHEMBL1200403,CHEMBL1200406,CHEMBL1200446,CHEMBL1200450,CHEMBL1200491,CHEMBL1200497,CHEMBL1200532,CHEMBL1200540,CHEMBL1200550,CHEMBL1200590,CHEMBL1200618,CHEMBL1200638,CHEMBL1200750,CHEMBL1200769,CHEMBL1200795,CHEMBL1200801,CHEMBL1200809,CHEMBL1200927,CHEMBL1200948,CHEMBL1200959,CHEMBL1200961,CHEMBL1200967,CHEMBL1200974,CHEMBL1201006,CHEMBL1201007,CHEMBL1201023,CHEMBL1201068,CHEMBL1201089,CHEMBL1201113,CHEMBL1201190,CHEMBL1201659,CHEMBL1201747,CHEMBL1201759,CHEMBL1224,CHEMBL1237102,CHEMBL1564,CHEMBL1620,CHEMBL1633,CHEMBL1653,CHEMBL1659,CHEMBL1689,CHEMBL1713082%27,CHEMBL1716,CHEMBL1719,CHEMBL2103739,CHEMBL998&max_phase__gt=1
nclopezo commented 8 years ago

For the record, this has been implemented: https://www.ebi.ac.uk/panda/jira/browse/CHEMBLWEB-10