-
Notifications
You must be signed in to change notification settings - Fork 2
/
app.R
48 lines (37 loc) · 1.52 KB
/
app.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
devtools::install_cran("plotly") # not yet on UW dataviz
devtools::install_cran("markdown") # not yet on UW dataviz
devtools::install_cran("cowplot") # not yet on UW dataviz
devtools::install_cran("ggdendro") # not yet on UW dataviz
#devtools::install_cran("RSQLite") # not yet on UW dataviz
devtools::install_github("byandell/foundr")
dirpath <- file.path("big")
traitData <- readRDS(file.path(dirpath, "traitData.rds"))
traitSignal <- readRDS(file.path(dirpath, "traitSignal.rds"))
traitStats <- readRDS(file.path(dirpath, "traitStats.rds"))
#db <- RSQLite::dbConnect(RSQLite::SQLite(),
# file.path(dirpath, "traitData.sqlite"))
#traitData <- dplyr::tbl(db, "traitData")
customSettings <- list(
help = "help.md",
condition = "diet",
entrykey = "Founder",
dataset = c(
PlaMet0 = "Plasma metabolites 0min",
PlaMet120 = "Plasma metabolites 120min",
LivMet = "Liver metabolites",
LivRna = "Liver gene expression",
Physio = "Physiological traits",
Enrich = "Plasma enrichment",
Module = "WGCNA Module eigentraits"))
################################################################
title <- "Founder Diet Study"
ui <- foundr::ui(title)
server <- function(input, output, session) {
# shiny::onStop(function() {RSQLite::dbDisconnect(db)})
foundr::server(input, output, session,
traitData, traitSignal, traitStats,
customSettings)
# Allow reconnect with Shiny Server.
session$allowReconnect(TRUE)
}
shiny::shinyApp(ui = ui, server = server)