-
Notifications
You must be signed in to change notification settings - Fork 2
/
ui.R
178 lines (166 loc) · 4.88 KB
/
ui.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(shinyjs)
library(shinyBS)
library(rintrojs)
library(parallel)
library(markdown)
library(rclipboard)
library(shinyFeedback)
library(shinydashboard)
cores <- detectCores()
customDashboardHeader <-
function(...) {
items <- list(...)
tags$header(
class = "main-header",
tags$nav(
class = "navbar navbar-default",
role = "navigation",
tags$div(class = "navbar-header",
tags$button(type="button", class="navbar-toggle", `data-toggle`="collapse", `data-target`="#navbar", `aria-expanded`="true", tags$span(class="icon-bar"), tags$span(class="icon-bar"), tags$span(class="icon-bar")),
tags$a(
class = "navbar-brand",
href = "http://bowtie-bio.sourceforge.net/bowtie2/index.shtml",
tags$img(
src = "bowtie_logo.png",
height = "50px",
title = "Bowtie 2"
)
)
),
tags$div(
class = "navbar-collapse collapse",
id = "navbar",
tags$ul(class = "nav navbar-nav",
items),
tags$ul(class = "nav navbar-nav navbar-right",
tags$li(
class = "dropdown",
style = "font-size: 20px",
tags$a(
`data-value` =" More",
`aria-expanded` = "false",
`data-toggle` = "dropdown",
class = "dropdown-toggle",
href = "#",
icon("github"),
tags$b(class = "caret")
),
tags$ul(
class = "dropdown-menu",
tags$li(
tags$a(
href = "https://github.com/langmead-lab/bt2-ui",
target = "_blank",
"UI repo"
)
),
tags$li(
tags$a(
href = "https://github.com/langmead-lab/bt2-ui/issues",
target = "_blank",
"UI issues"
)
),
tags$li(
tags$a(
href = "https://github.com/BenLangmead/bowtie2",
target = "_blank",
"Bowtie2 repo"
)
)
)
),
tags$li(
a(
href = 'http://www.jhu.edu/',
img(
src = 'university.small.horizontal.white.png',
title = "Johns Hopkins University",
height = "30px"
),
style = "padding-top:10px; padding-bottom:10px;"
),
class = "dropdown"
)
)
)
)
)
}
header <- dashboardHeader(
title = tags$a(
href = "http://bowtie-bio.sourceforge.net/bowtie2/index.shtml",
tags$img(
src = "bowtie_logo.png",
height = "40px",
width = "75%",
title = "Bowtie 2"
),
style = "padding-left:1px;"
),
tags$li(
a(
href = 'http://www.jhu.edu/',
img(
src = 'university.small.horizontal.white.png',
title = "Johns Hopkins University",
height = "30px"
),
style = "padding-top:10px; padding-bottom:10px;"
),
class = "dropdown"
)
)
sidebar <- dashboardSidebar(collapsed = TRUE,
sidebarMenu(
id = "tabs",
menuItem(h5("Bowtie 2"), tabName = "bowtie2"),
menuItem(h5("CRISPR"), tabName = "crispr"),
menuItem(h5("Visuals"), tabName = "visuals"),
menuItem(h5("Help"), tabName = "manual")
))
body <- dashboardBody(
rclipboardSetup(),
tags$head(tags$script(src = "init.js")),
includeCSS("www/style.css"),
useShinyjs(),
introjsUI(),
useShinyFeedback(),
tabItems(
tabItem("bowtie2", bowtie2_tab),
tabItem("crispr", crispr_tab),
tabItem("visuals", visuals_tab),
tabItem(
"manual",
tags$iframe(style = "position: absolute; height: 100%; border: none", width =
"100%", src = "MANUAL.html")
)
)
)
header <- customDashboardHeader(
menuItem("Bowtie 2", tabName = "bowtie2", selected = TRUE),
menuItem("CRISPR", tabName = "crispr"),
menuItem("Visuals", tabName = "visuals"),
menuItem("Manual", tabName = "manual")
)
#
# customDashboardPage <- function(header, sidebar, body, title) {
# addDeps <- getFromNamespace("addDeps", "shinydashboard")
# content <- div(class = "wrapper", header, sidebar, body)
# addDeps(
# tags$body(class = "skin-blue sidebar-collapse",
# style = "min-height: 611px;",
# shiny::bootstrapPage(content, title = title)))
# }
function(request) {
dashboardPage(header, sidebar, body, title = "bowtie2 UI")
}