webchem icon indicating copy to clipboard operation
webchem copied to clipboard

Change CTS to use REST API

Open Aariq opened this issue 4 years ago • 6 comments

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

Aariq avatar May 19 '20 01:05 Aariq

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

Aariq avatar Jun 02 '20 21:06 Aariq

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.

stitam avatar Jul 03 '20 07:07 stitam

If it's an easy change, then it might be a good stopgap measure until CTS gets fixed.

Aariq avatar Jul 09 '20 14:07 Aariq

Ok, then I'll jump in on this one.

stitam avatar Jul 09 '20 16:07 stitam

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.

stitam avatar Sep 17 '20 16:09 stitam

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 for cts_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.

Aariq avatar Jul 31 '23 18:07 Aariq