webchem
webchem copied to clipboard
Change CTS to use REST API
While puzzling through some problems with cts_*()
functions (see #255, #243 ) I noticed that CTS has a REST API that is not currently implemented in the cts_*()
functions.
https://cts.fiehnlab.ucdavis.edu/services
The REST API currently seems broken, but I'm watching an issue and will take a crack at this when the API is working again. https://bitbucket.org/fiehnlab/ctsproxy/issues/24/ssl-certificate-has-expired-for-rest-api
Could httr::RETRY()
mitigate our difficulties with the cts functions? If yes, then this may be a simple fix, I am happy to submit it.
If it's an easy change, then it might be a good stopgap measure until CTS gets fixed.
Ok, then I'll jump in on this one.
I am closing this issue as REST API would still be nice, but CTS seems to be working fine so I'll just mark it as low priority.
REST API seems to be working now! Features available by REST that are not currently in webchem::cts_*
functions:
- Convert from chemical name to InChiKey with either a "popularity" or "biological" (?) score—could be integrated with the
match =
argument forcts_convert()
. - Convert InChiKey to MOL/SDF
- Count biological IDs. I think this means 'how many hits are there for this InChiKey in various biological molecule databases?' Only works with InChiKey as input.