forked from Aridhia-Open-Source/shiny-demo-gwas-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
183 lines (124 loc) · 4.05 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
179
180
181
182
183
################
###### UI ######
################
navbarPage(
title = "GWAS Results Analysis",
windowTitle = "GWAS App",
# 1st Tab - INTERACTIVE MANHATAN PLOT --------------------------------------------------
tabPanel(
"Interactive Manhattan Plot",
# Side bar -----------------------------------------------
sidebarLayout(
sidebarPanel(
# Select data
selectInput(
inputId = "choose_data",
label = "Choose a dataset",
choices = tables
),
# Select color scheme
selectInput("color", "Choose colour scheme:",
list("Grey", "Blue", "Blue & Orange", "Earth", "Rainbow"),
selected = "Rainbow"
),
# Select chromosomes
selectizeInput("chr", "Choose the chromosomes you want to plot:",
choices = 1:22,
multiple = TRUE
),
# Select point size
sliderInput(
inputId = "point",
label = "Select the point size",
min = 1,
max = 10,
step = 0.05,
value = 5
),
# Option to make suggestive/significance lines visible or not
checkboxInput(
inputId = "suggest",
label = "Suggestive line",
value = TRUE
),
checkboxInput(
inputId = "geno",
label = "Genome-wide significance line",
value = TRUE
),
),
# Main Panel -----------------------------------------------
mainPanel(
# Text before the graph
p("Hover the mouse over a point in the plot to inspect its annotation information, such as the SNP identified and GENE name.
A menu will appear in the upper-right corner of the graph, this allows to zoom in on a region of interest and export the image as a .png file"),
# Graph output
plotlyOutput("interactive_manhattan")
)
)
),
# 2nd Tab - CIRCULAR MANHATAN PLOT --------------------------------------------------
tabPanel(
"Circular Manhattan plot",
sidebarLayout(
# Side bar -----------------------------------------------
sidebarPanel(
# Color scheme
selectInput("colour_scheme", "Colour scheme:",
list("Grey", "Blue", "Blue & Orange", "Earth", "Rainbow"),
selected = "Rainbow"
),
# Options for circular Manhattan plot
radioButtons("circ_type", "Type", c("Inward plot" = "inw", "Outward plot" = "outw"), selected = "inw")
),
# Main Panel -----------------------------------------------
mainPanel(
# A caption will be displayed above the chart
h3(textOutput(outputId = "caption", container = span)),
# Plot Output
plotOutput("manhattan_plot",
height = "800px",
width = "800px"
),
)
)
),
# 3rd Tab - QQ PLOT --------------------------------------------------
tabPanel(
"QQ Plot",
# Side bar --------------------------------------------
sidebarLayout(
sidebarPanel(
"QQ Plot",
# Option to include confidence interval
checkboxInput(
inputId = "qqplot_conf",
label = "Include confidence interval",
value = FALSE
),
),
# Main panel ----------------------------------------
mainPanel(
# Plot output
plotOutput("qq_plot")
)
)
),
# 4th Tab - SNP DENSITY --------------------------------------------------
tabPanel(
"SNP Density",
sidebarLayout(
sidebarPanel(),
# Main panel -----------------------------------------------
mainPanel(
plotOutput("snp_density")
)
)
),
# 5th Tab - HELP --------------------------------------------------
tabPanel(
"Help",
# Function with the help tab
documentation_tab(),
)
)