drugbank
drugbank copied to clipboard
DrugBank to UniChem mapping: cannot decode json
Hi!
Thank you for so useful repository. I have one question, when I am following your code for obtaing the mapping codes, I am getting the next error:
Could you help me, please??
Thanks Pablo
Taking a look at some of the log output we committed from the past, I see the same message:
https://github.com/dhimmel/drugbank/blob/6b9ae386d6ba4a0eca2d66d4b0337a6e90fe81f4/data/mapping-log.txt#L1913-L1915
I think these are cases where the UniChem mapping fails, see cell 37 of unichem-map.ipynb
. So you can probably proceed with these failures, as they're cases perhaps where the chemical structure is not in UniChem?
How many drugbank IDs are you trying to map and how many have the failure?
Thank you for your response, I am trying to map around 14.000 IDs and I have stopped the cell because for the first 800 ID I am obtaining the same error...any idea?
That error message occurs anytime the UniChem response doesn't return valid JSON, but it's probably that the API is returning an error.
This website works: https://www.ebi.ac.uk/unichem/search/connectivity?type=sourceID&compound=DB00006&sourceID=2
Looks like the UniChem API might have had an update. See the current docs at https://www.ebi.ac.uk/unichem/api/docs
Ok if I replace key_search by inchi, I can see this:
I think that it is correct, but in cpd_search in my opinion the information can be extracted from inchi, no? Because, I can see the: 'src_id', 'src_compound_id', but I not sure as I can do this.
Thanks
I imagine it's okay to search only by inchikey, although I must have seen some benefit to first trying the identifier search. I imagine the identifier search is still possible, we just have to figure out the right API call for it.
Yes! I agree, It must have some benefit to first trying the identifier. How can I extract the information only using the inchikey? Could you put the code with this option? It would be great...