This is a web API for the DNF algorithm. Namely, you can use this API to get BHK lab's DNF network in JSON format, as well as upload new drug data to integrate into the default DNF network.
This project uses OpenCPU's free server. Refer to their documentation on how OpenCPU works.
All endpoints must be declared in DNF.R in the R folder using the proper documentation conventions (as described in roxygen). The project must be installed/built for a change to take effect.
ocpu_start_server(port=x)
postman
folder)You have to do three things to deploy the project. Firstly in R Studio, call roxygen2::roxygenise()
, which will automatically modify certain miscellaneous files that are necessary for building the project on OpenCPU. Secondly, build the project using R Studio build/install (this is mostly a check to see if the API can be deployed). Lastly, commit the changes and push it onto the GitHub master branch of this project. The push will trigger OpenCPU to deploy the API onto their cloud server. You can check whether the API was deployed if you go to the GitHub repository -> Settings -> Webhook and click on the Webhook URL. It will say that the deployment failed, but you will also receive an email reporting the status of the deployment. If the email says that the deployment build was successful, then you can forget about the fail message on GitHub.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.