Design and Implementation

The Netpredictor package can be used in two ways - either in standalone form and compelling web application running locally or on an Amazon cloud server \cite{amazon}. The web applications accessible through the Internet and standalone package are functionally identical. More details regarding the package accessibility and the instructions on how to use it via the web application and run locally are given in the availability section. The interface consists of two parts - a web interface and a web server. Both of these components are controlled by code that is written within the framework of Shiny application in R. RShiny uses “reactive programming” which ensures that changes in inputs are immediately reflected in outputs, making it possible to build a highly interactive tool. Within the RShiny package, ordinary controllers or widgets are provided for ease of use for application programmers. Many of the procedures like uploading files, refreshing the page, drawing new plots and tables are provided automatically. The communication between the client and server is done over the normal TCP connection. The data traffic that is needed for many of web applications between the browser and the server is facilitated over the websockets protocol. This protocol operates separately using handshake mechanism between the client and server is done over the HTTP protocol. The duplex connection is open all the time and therefore authentication is not needed when exchange is done. In order for an RShiny app to execute, we have to create an RShiny server. RShiny follows a pre-defined way to write R scripts. It consists of server.R and ui.R, which need to be in same directory location. If a developer wants to customize the user interface shiny can also integrate additional CSS and Javascript libraries within the web application. The GUI consists of introduction page with tab panels shown in Fig 1. The first tab, start prediction, consists of sidebar panels and a main output panel Fig 2. The sidebar is used to upload the data and select the algorithms and its parameters.  The start prediction tab consists of data upload, compute recommendations, compute network properties and visualization of user given data. The advanced analysis tab has two sections the statistical analysis section and permutation testing tab.  We also computed the recommendations of the Drugbank database using NBI and included the predictions results in the Drugbank search tab.