In the Navigation bar the user can select to query using reactions(EC numbers) or the proteins(NP numbers)
You can run the Shiny app on your local computer to query the Cigene Blazegraph server.
The installation instructions below were tested by jonovik on Windows 10, R 3.3.2, with R packages updated as of 2017-02-18.
Prerequisites:
- RStudio (and R, obviously)
- Command-line
curl
(mine came with Anaconda Python) - Working rJava (can be tricky)
- RGBOLApi (some assembly required, see https://gitlab.com/gbol and ask Jesse van Dam or Róbert Hafþórsson).
Note: Don't
install.packages("../RGBOLApi",repos=NULL, type="source")
but instead create a new RStudio project in the RGBOLApi folder, thenBuild > Build and Reload
(You may have to install and configure build tools in RStudio. Google it.) - Running Blazegraph server at the URL indicated in
app.R
(search forhttp://
in that file). (This server will normally be up and running.)
Then:
- Clone this repo.
- Double-click
SAPPquery/app.R
and RStudio should open the project. install.packages(c("RCurl", "shinyBS", "shinyjs", "SPARQL", "data.table", "DT", "stringr", "plyr"))
- Connect to NMBU VPN if you're not already inside the firewall. (You can check whatismyip to verify that your IP begins with 128.39...)
- Click RStudio's
Run app
button (a dropdown setting lets you choose to run in an RStudio window or an external browser).
The SAPP Query
app should open. Hopefully you should now be able to click Submit
button, wait a while, and see a resultset of records.
Testing just Curl and the Blazegraph server:
echo SELECT ?answer WHERE { BIND (42 as ?answer) } > query.tmp
curl -X POST http://10.209.0.133:8080/blazegraph/namespace/ManualAnno/sparql --data-urlencode [email protected] -H Accept:text/tab-separated-values
should return
?answer
"42"^^<http://www.w3.org/2001/XMLSchema#integer>