-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.R
67 lines (61 loc) · 2.07 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
source("modules/load_library.R")
source("modules/helpers_func.R")
source("modules/data_loading.R")
# source("modules/multipartite_network_vis_update.R")
source('modules/data_loading_module2.R')
source('modules/main_app_module2.R')
source('modules/info_panel_module2.R')
source('modules/multipartite_network_module.R')
source('modules/shared_info_module.R')
source('modules/upset_plot_module2.R')
source("modules/shared_pathways_module.R")
options(repos = BiocManager::repositories())
starting_code <- c("250.20","250.70","272.10","278.10","401.10","594.10","296.20")
# starting_code <- c("other aUPD","overlap v617f aUPD","GGCC/GGCC","GGCC/TCTT")
starting_description = c("Type 2 diabetes", "Diabetic retinopathy", "Hyperlipidemia", "Obesity", "Essential hypertension", "Calculus of kidney", "Depression")
# starting_description = c("other aUPD","overlap v617f aUPD","GGCC/GGCC","GGCC/TCTT")
starting_row = c(73,78,83,95,163,274,118)
# starting_row = c(672,673,674,675)
# Used in data table to both select correct row and navigate table to that row
start_index <- which(phecodes$code %in% starting_code)
ui <- shinyUI(
fluidPage(
# titlePanel(
# title = "Phe-Omics Multimorbidity Explorer"
# ),
# hr(),
mainPanel(
width = 12,
includeCSS("inst/custom.css"),
shinyjs::useShinyjs(debug = TRUE),
uiOutput("ui")
)
# ,
# skin = 'black'
)
)
server <- function(input, output, session) {
loaded_data <- callModule(
data_loading, "data_loading",session=session
)
output$ui <- renderUI({
no_data <- is.null(loaded_data())
if(no_data){
data_loading_UI('data_loading')
}else{
main_app_UI('main_app')
}
})
observeEvent(loaded_data(), {
all_data <- loaded_data()
app <- callModule(
main_app_Server, "main_app",
current_phecode = all_data$current_phecode,
current_description = all_data$current_description,
current_institution = all_data$current_institution,
current_row = all_data$current_row,
visualize_network = all_data$visualize_network
)
})
}
shinyApp(ui, server)