Looking forward to a bash/R script to implement Jean-Karim's procedure.
I am looking for a database/API to map ''Target ChEMBL ID" to "Entrez Gene". For example, given CHEMBL6196 I would like to get 7363 (UGT2B4).
How about "Molecule ChEMBL ID" to "DrugBank Id", e.g. 'CHEMBL1256957': 'DB00264'?
Currently, I have to do this manually by searching for each ID in https://www.ebi.ac.uk/chembl.
1 answer
ChEMBL targets are primarily associated with Uniprot accessions so you'll probably need to do it in two steps. The first is to retrieve the Uniprot accession number, the second to convert Uniprot accession to Entrez gene ID. For the first step, you have a few options:
You can retrieve Uniprot accessions mapped to a ChEMBL target ID from Uniprot's Retrieve/ID mapping service by selecting ChEMBL as "From" option.
There's also the ChEMBL REST API, e.g.
https://www.ebi.ac.uk/chembl/api/data/target/search?q=CHEMBL6196
This gives access to other IDs than Uniprot accession, e.g. Ensembl gene IDs or gene symbol which may be easier to convert to Entrez gene IDs. Default format is XML but you can get json or yaml by adding e.g. &format=yaml to the request.- There's also the option of downloading the database and performing SQL queries on it (with some examples here). This is useful if you're going to do this a lot and remote queries via the web are taking too long.
Log in to answer this question.
It works, thanks, Jean. Do you also know how can I change "Molecule ChEMBL ID" to "DrugBank Id"?
Please use
ADD COMMENT/ADD REPLYwhen responding to existing answers/comments to keep threads logically organized.SUBMIT ANSWERis for new answers to the original question.I found biomaRt helpful in toggling between different database ids, I guess this would also work to jump from ChEMBL to Entrez. I have not tried that combination however in the past I have managed to jump from ensembl to uniprot, as an example.
A sample code which does this for me is :
More information on the parameters can be found in this manual which I find extremely helpful - https://bioconductor.org/packages/release/bioc/vignettes/biomaRt/inst/doc/biomaRt.html