-
Notifications
You must be signed in to change notification settings - Fork 8
/
app.R
76 lines (66 loc) · 2.05 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
68
69
70
71
72
73
74
75
76
#! /usr/bin/env Rscript
library(shiny)
library(bslib)
library(shinyWidgets)
library(shinyjs)
library(DT)
library(shinyalert)
library(waiter)
library(tidyverse)
library(vroom)
library(colourpicker)
library(fs)
## change upload file size limit to 5GB
options(shiny.maxRequestSize=5000*1024^2)
## load custom settings and functions
source(file = "utils.R", local = T, encoding = "UTF-8")
## load ui pages
source(file = "ui/main_view.ui.R", local = T, encoding = "UTF-8")
source(file = "ui/dot_view.ui.R", local = T, encoding = "UTF-8")
source(file = "ui/pipeline.ui.R", local = T, encoding = "UTF-8")
source(file = "ui/help.ui.R", local = T, encoding = "UTF-8")
jsCode <- '
shinyjs.hideSetting = function() {
d3.select("#settingPanel")
.attr("hidden", "");
d3.select("#mainPanel")
.attr("class", "col-sm-12");
}
shinyjs.showSetting = function () {
d3.select("#settingPanel")
.attr("hidden", null);
d3.select("#mainPanel")
.attr("class", "col-sm-9");
}'
ui <- tagList(
tags$head(
tags$link(rel = "stylesheet", type = "text/css", href = "custom.css")
),
useShinyjs(),
extendShinyjs(text = jsCode, functions = c("hideSetting", "showSetting")),
useShinyalert(),
useWaiter(),
useWaitress(),
navbarPage(
theme = bs_theme(version = 5,bootswatch = "flatly"),
title = "ShinySyn",
mainView_ui,
dotView_ui,
pipeline_ui,
help_ui
),
##tags$script(src="https://unpkg.com/@popperjs/core@2"),
##tags$script(src="https://unpkg.com/tippy.js@6"),
tags$script(src = "js/popper.v2.11.5.min.js"),
tags$script(src = "js/tippy-bundle.umd.v6.3.7.min.js"),
tags$script(src = "js/d3.min.js"),
tags$script(src = "js/synteny.min.js"),
tags$script("tippy('[data-tippy-content]');")
)
server <- function(input, output, session){
## Added main view section
source(file = "server/main_view.server.R", local = T, encoding = "UTF-8")
## Added mcscan pipeline codes
source(file = "server/pipeline.server.R", local = T, encoding = "UTF-8")
}
shinyApp(ui, server)