forked from dlal-group/Simple-ClinVar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.R
More file actions
292 lines (286 loc) · 22.6 KB
/
ui.R
File metadata and controls
292 lines (286 loc) · 22.6 KB
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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
library(shiny)
library(ggplot2)
library(readr)
library(stringr)
library(tidyr)
library(Hmisc)
library(ggrepel)
library(DT)
library(ggrepel)
library(dplyr)
library(tm)
library(shinycssloaders)
library("shinythemes")
# With Drawprotein
library(drawProteins)
library(magrittr)
#library(rlang)
# Define UI for application that draws a histogram
shinyUI(fluidPage(
navbarPage(theme = shinytheme("yeti"), id = "inTabset",selected = "panel1",
title = "SCV",
# Main box search and description -----------------------------------------
tabPanel("Home", value = "panel1",
br(),br(),
h2("Shiny ClinVar (SCV)", align = "center"),
br(),br(),
fluidRow(
column(width = 6, offset = 3, align = "center",
wellPanel("Type gene name or disease term",
style = "background-color: #333333;
color: white;
border-top-color: #333333;
border-left-color: #333333;
border-right-color: #333333;
box-shadow: 3px 3px 3px #d8d8d8;
margin-bottom: 0px;
padding:5px"),
wellPanel(br(),br(),
textInput(inputId = "genename", label = NULL),#, value = "clinvar"),
br(),
actionButton(inputId ="goButton", label = "Submit", class = "btn-primary"),
style = "background-color: #ffffff;
border-bottom-color: #333333;
border-left-color: #333333;
border-right-color: #333333;
box-shadow: 3px 3px 3px #d8d8d8;
margin-top: 0px")
) # WellPanel
), #Fluid row
fluidRow(column(width = 6, offset = 3, br(), br(), p("How many missense variants are associated to heart disease?
What are the top 10 genes mutated in Alzheimer? Does CDKL5 have pathogenic mutations? If so, where?
SCV is able to answer these questions and more, in a matter of seconds. \n SCV was developed to
provide gene and disease wise summary statistic based on all available genetic variants from ClinVar.",
align = "center"), p(""), style = "background-color: #ffffff")
)
),
# Filtering "left" side -------------------------------------------------------------
tabPanel("Results", value = "panel2",
fluidRow(column(width = 12, h6(strong("Displaying results for:")))),
fluidRow(column(width = 2, style = "padding-right: 0px",
wellPanel(textOutput(outputId = "displayquery"),
style = "background-color:#008CBA;
color:white;
border-color:#008CBA;
box-shadow: 3px 3px 3px #d8d8d8;
margin-bottom: 0px;
padding:15px;
width: 80%"),
fluidRow(column(width = 12,h5(""))),
fluidRow(column(width = 12,h5(""))),
wellPanel(h6(strong("Choose your filter")),
style = "background-color:white;
border-bottom: 2px solid #EEEEEE;
border-top-color: white;
border-right-color: white;
border-left-color: white;
box-shadow: 0px 0px 0px white;
padding:3px;
width: 100%"),
checkboxGroupInput(inputId = "clinicalinput",
label = "Clinical Significance",
choices = c("Pathogenic",
"Likely pathogenic",
"Risk factor/Association",
"Uncertain/conflicting",
"Protective/Likely benign",
"Benign"),
selected = NULL ),
checkboxGroupInput(inputId = "consequenceinput",
label = "Consequence",
choices= c("Missense",
"Stop-gain",
"In frame indel",
"Frameshift",
"Synonymous"),
selected = NULL ),
checkboxGroupInput(inputId = "typeinput",
label = "Type",
choices= c("SNV",
"Deletion",
"Duplication",
"Deletion",
"Indel",
"Inversion"),
selected = NULL ),
checkboxGroupInput(inputId = "reviewinput",
label = "Review status",
choices= c("Criteria provided/ multiple submitters/ no conflicts",
"Reviewed by expert panel",
"Practice guideline",
"Criteria provided/ single submitter",
"Criteria provided/ conflicting interpretations",
"No assertion criteria provided"),
selected = NULL ),
actionButton(inputId = "filter", label = "Filter", width = "80%",
style = "box-shadow: 3px 3px 3px #d8d8d8;
margin-bottom: 0px;
padding:5px"),
br(),br(),
actionButton(inputId = "newsearch", label = "New Search",
width = "80%",
style = "box-shadow: 3px 3px 3px #d8d8d8;
margin-bottom: 0px;
padding:5px")
),
# Results/Plots Panel -----------------------------------------------------
column(width = 10, style = "padding-left: 0px",
fluidRow(
column(2, offset = 1,
actionButton(inputId = "seevariants", label = textOutput(outputId = "displayobservation"),
width = "100%",
style = "box-shadow: 3px 3px 3px #d8d8d8;
margin-bottom: 0px;
padding:15px",
class = "btn-success")),
column(2, offset = 1,
actionButton(inputId = "seegenes", label = textOutput(outputId = "displayngenes"),
width = "100%",
style = "box-shadow: 3px 3px 3px #d8d8d8;
margin-bottom: 0px;
padding:15px",
class = "btn-danger")),
column(2, offset = 1,
actionButton(inputId = "seephenotypes", label = textOutput(outputId = "displayphenotypes"),
width = "100%",
style = "box-shadow: 3px 3px 3px #d8d8d8;
margin-bottom: 0px;
padding:15px",
class = "btn-warning")),
column(2, offset = 1,
actionButton(inputId = "seetable", label = "Show Table",
width = "100%",
style = "box-shadow: 3px 3px 3px #d8d8d8;
margin-bottom: 0px;
padding:15px"))
),
br(),br(),
fluidRow(column(width = 12,
tabsetPanel(type = "tabs", id = "displaywhat", selected = "1",
tabPanel(title = NULL, value = "1",#br(),
fluidRow(
column(3, h6("\tType"), align = "center",
withSpinner(plotOutput("Type", width="100%"))),
column(3, h6("\tConsequence"), align = "center",
withSpinner(plotOutput("consequence", width="100%"))),
column(3, h6("\tClinical Significance"), align = "center",
withSpinner(plotOutput("ClinicalSignificance", width="100%"))),
column(3, h6("\tReview status"), align = "center",
withSpinner(plotOutput("review", width="100%")))
)
),
tabPanel(title = NULL, value = "2",
uiOutput("genefield")
),
tabPanel(title = NULL, value = "3",#br(),
fluidRow(column(8, h6("Top 10 phenotypes associated"), align = "center", br(),
plotOutput("DiseaseCount")),
column(4, h6("Total phenotypes associations"), align = "center",
wellPanel(DT::dataTableOutput("DiseaseCountTotal"),
style = "background-color: #ffffff;
border-color: #ffffff;
box-shadow: 0px 0px 0px #ffffff;
margin-bottom: 5px")
)
) #Fluid row
),
tabPanel(title = NULL, value = "4",
fluidRow(column(12,br(), align = "center",
wellPanel(DT::dataTableOutput("clinvartable1"),
style = "background-color: #ffffff;
border-color: #ffffff;
box-shadow: 0px 0px 0px #ffffff;
margin-bottom: 5px")
) # Column
),
fluidRow(column(12,downloadLink("downloadData1", "Download"))
),
fluidRow(column(12,br(), align = "center",
wellPanel(DT::dataTableOutput("clinvartable2"),
style = "background-color: #ffffff;
border-color: #ffffff;
box-shadow: 0px 0px 0px #ffffff;
margin-bottom: 5px")
)# Column
),# Fluid row
fluidRow(column(12,downloadLink("downloadData2", "Download"))
)
) #TabPanle
) #TabsetPanel
) # Column
) #Fluidrow aqui abajo solo de bonito
) # column
),
fluidRow(column(width = 12,
wellPanel(style = "background-color:white;
border-bottom: 2px solid #EEEEEE;
border-top-color: white;
border-right-color: white;
border-left-color: white;
box-shadow: 0px 0px 0px white;
padding:0px;
width: 100%"))) #,
# verbatimTextOutput("test")
), #mainTabPanel,
# about page --------------------------------------------------------------
tabPanel("About", value = "panel3",
br(),br(),
fluidRow(column(width = 5, offset = 1, align = "center",
wellPanel("Beta Release",
style = "background-color: #333333;
color: white;
border-top-color: #333333;
border-left-color: #333333;
border-right-color: #333333;
box-shadow: 3px 3px 3px #d8d8d8;
margin-bottom: 0px;
padding:5px"),
wellPanel(br(),p("The present release of Shiny ClinVar is a beta version."),
p("We encourage you to contact us with bugs or suggestions."),
br(),
style = "background-color: #ffffff;
border-color: #333333;
box-shadow: 3px 3px 3px #d8d8d8;
margin-top: 0px")
), # Column
column(width = 5,
wellPanel("Contact", align = "center",
style = "background-color: #333333;
color: white;
border-top-color: #333333;
border-left-color: #333333;
border-right-color: #333333;
box-shadow: 3px 3px 3px #d8d8d8;
margin-bottom: 0px;
padding:5px"),
wellPanel(align = "center",
p(br(),icon("envelope", lib = "glyphicon")," e.perezpalma@uni-koeln.de"),
p(icon("envelope", lib = "glyphicon")," mgramm1@smail.uni-koeln.de"),
br(),
style = "background-color: #ffffff;
border-color: #333333;
box-shadow: 3px 3px 3px #d8d8d8;
margin-top: 0px")
) # Column
),br(),br() #Fluid row
# fluidRow(column(width = 6, offset = 3, align = "center",
# wellPanel("Tutorial",
# style = "background-color: #333333;
# color: white;
# border-top-color: #333333;
# border-left-color: #333333;
# border-right-color: #333333;
# box-shadow: 3px 3px 3px #d8d8d8;
# margin-bottom: 0px;
# padding:5px"),
# wellPanel(br(),br(),br(),
# p(">youtube placeholder<"),br(),br(),br(),
# style = "background-color: #ffffff;
# border-color: #b2baba;
# box-shadow: 3px 3px 3px #d8d8d8;
# margin-top: 0px")
# ) #column
# ) #Fluid row
) # TabPanel
) # NavbarPage
))