From 48434e0a70c9cdaf23e4363914e6eac5316b7893 Mon Sep 17 00:00:00 2001 From: KeithKelleher Date: Wed, 22 May 2024 22:56:23 -0400 Subject: [PATCH] pre-fetch the sqlite database for the Docker container --- apps/ramp-server/install.R | 1 + apps/ramp-server/plumber.R | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/ramp-server/install.R b/apps/ramp-server/install.R index e23b04b..71efbeb 100644 --- a/apps/ramp-server/install.R +++ b/apps/ramp-server/install.R @@ -10,3 +10,4 @@ install_github("ncats/RaMP-DB", force = TRUE, dependencies=TRUE) library(RaMP) +rampDB <<- RaMP:::RaMP() # pre-load sqlite database to the container diff --git a/apps/ramp-server/plumber.R b/apps/ramp-server/plumber.R index 334aa22..80fb61f 100644 --- a/apps/ramp-server/plumber.R +++ b/apps/ramp-server/plumber.R @@ -5,6 +5,8 @@ library(R.cache) library(readr) library(ggplot2) +rampDB <<- RaMP:::RaMP() + #* @apiTitle RaMP_API #* @apiDescription REST API for the Relational Database of Metabolomics Pathways (RaMP) Application #* @apiVersion 1.0.1 @@ -520,7 +522,7 @@ function( #' @param biospecimen Restrict background to particular biospecimen #' @param file: File #' @parser multi -#' @parser text +#' @parser text #' @parser json #' @post /api/chemical-enrichment function(metabolites = '', file = '', biospecimen = '', background = "database") {