-
Notifications
You must be signed in to change notification settings - Fork 1
/
ui.r
267 lines (205 loc) · 8.32 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
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
library(shiny)
library(plotly)
library(shinyjs)
library(ggplot2)
shinyUI(navbarPage("shinyHTM",
# Initialize shinyjs
shinyjs::useShinyjs(),
shinyalert::useShinyalert(),
tabPanel("1. Upload data",
h2("Upload data"),
helpText("Upload an image table (must be a comma-separated, tab-sepatated or Excel file)."),
fluidRow(
column(8,
fileInput('file1', 'Choose File', accept=c('.csv', '.txt', 'tsv', '.xlsx'), width = "90%")
),
column(4,
radioButtons("loadFileType", label = h4("File format"),
choices = list("Auto detect" = "Auto", "Comma separated (csv)" = "csv", "Tab separated (txt)" = "tsv", "Excel (xlsx)" = "xlsx"),
selected = "Auto"),
br(),
radioButtons("loadDecimalSeparator", label = "Decimal separator",
choices = list("Auto detect" = "Auto", "Dot (.)" = ".", "Comma (,)" = ","),
selected = "Auto")
)
)
),
tabPanel("2. Configure settings",
h2("Settings"),
h3("Load and save settings..."),
downloadButton('saveSettings', 'Save Settings'),
fileInput("settings_file", "Load settings:",
multiple = FALSE,
accept = c('.json')),
h3("Select column names containing..."),
uiOutput("UIcolNameTreatment"),
uiOutput("UIcolNameBatch"),
uiOutput("UIcolNameWell"),
uiOutput("UIcolNamePos"),
hr(),
h3("Click & view settings"),
uiOutput("UIfiji_path"),
hr(),
uiOutput("UIavailableimages"),
hr(),
uiOutput("UIpathInTable"),
uiOutput("UIpathInComputer"),
uiOutput("UIprefixPath"),
uiOutput("UIprefixFile"),
hr(),
uiOutput("UIcolNameObjectPosX"),
uiOutput("UIcolNameObjectPosY"),
uiOutput("UIcolNameObjectPosZ"),
hr(),
h3("Heatmap settings"),
uiOutput("UIwells_Y"),
uiOutput("UIwells_X"),
uiOutput("UInpos_Y"),
uiOutput("UInpos_X"),
uiOutput("UIsquaredodge"),
uiOutput("UIsquaresize")
),
tabPanel("3. Plot",
h2("Plotting"),
p("Use this plotting tool to explore your data and inspect the images which produced each data point."),
plotlyOutput("plot"),
br(),
actionButton("plotScatterBoxOrHeatmap", "Update plot", icon = icon("refresh"), width = "100%", style="color: #fff; background-color: #337ab7; border-color: #2e6da4"),
hr(),
fluidRow(
column(2,
selectInput("plotType", label = "Plot Type", choices = c("Scatter plot", "Boxplot", "Heatmap")),
uiOutput("UIXContinuousCategorical")
),
column(7,
uiOutput("UIselectXaxis"),
uiOutput("UIselectYaxis"),
uiOutput("UILUTminmax"),
uiOutput("UILUTcolors"),
br(),br(),
uiOutput("UIhighlightQCfailed"),
# Scatter plot customization options
uiOutput("UIPointplotsBeeswarm"),
uiOutput("UIPointplotsplitBy"),
br(),
uiOutput("UIPointplotSubsample"),
uiOutput("UIPointplotSubsampleN"),
uiOutput("UIPointplotSubsampleM"),
br(),
fluidRow(
column(6, uiOutput("UIPointplotfilterColumn")),
column(6, uiOutput("UIPointplotfilterValues"))
),
# Boxplot customziation options
uiOutput("UIBoxplothighlightCenter"),
uiOutput("UIBoxplotsplitBy")
# Heatmap customziation options
),
column(3,
uiOutput("UIselectBatch")
)
),
verbatimTextOutput("selection")
),
tabPanel("4. Quality Control",
h2("Quality Control"),
p("Use this tool to exclude some images from analysis."),
uiOutput("UIQCfailedExperiments"),
uiOutput("UIQCnumeric"),
uiOutput("UIQCtext"),
hr(),
fluidRow(
column(5,
uiOutput("QCtable")
),
column(2,
uiOutput("UIQCactive")
)
),
hr(),
actionButton("applyQC", "Apply QCs now", icon = icon("paper-plane-o")),
p(""),
verbatimTextOutput("echo_QC")
),
tabPanel("5. Normalization",
h2("Normalization"),
p("Normalize your data, on a plate-by-plate basis."),
uiOutput("UINormFeatures"),
uiOutput("UINormDataTransform"),
uiOutput("UINormGradientCorr"),
uiOutput("UINormMethod"),
uiOutput("UINormFormula"),
uiOutput("UINormNegCtrl"),
# checkboxInput("NormCombinedVecror", "[DISABLED] Compute combined vector for all selected measurements?"),
# selectInput("NormMultiply", "[DISABLED] Multiply with cos(tetha)^N along average treatment effect; N=", choices = list(0,1,2,4,8,16,32)),
hr(),
actionButton("applyNorm", "Normalize", icon = icon("paper-plane-o")),
hr(),
verbatimTextOutput("echo_Normalization")
),
tabPanel("6. Treatment summary",
h2("Treatment Summary"),
p("Average all measurements coming from the same treatment, regardless of the number of measurements (i.e. images)"),
uiOutput("UISummaryMeasurements"),
uiOutput("UISummaryNegCtrl"),
uiOutput("UISummaryPosCtrl"),
uiOutput("UISummaryNumObjects"),
actionButton("applySummary", "Analyze", icon = icon("paper-plane-o")),
br(),
br(),
verbatimTextOutput("echo_TreatmentSummary"),
br(),
br(),
dataTableOutput("TreatmentSummaryTable")
),
tabPanel("R Console",
h2("R Console"),
p("Use this text area to write R commands. Resuts will be shown in the R console, outside this website."),
p("Click the \"run\" button to run the code"),
p("You may need to use the print() function for your results to show up."),
br(),
runcodeUI(code = "print(\"Inside shinyHTM your image table is called 'htm'\")\nprint(\"This is a summary of of it:\")\nprint(\"==============================================================\")\nstr(htm)",
type = "textarea",
width = "800",
height = "100")
),
navbarMenu("More",
tabPanel("View table",
actionButton("saveHTMtable", "Save this table", icon = icon("save")),
br(),br(),
uiOutput("UIValuesTable")
),
# tabPanel("Save & Load settings",
# h2("Save & Load settings"),
# br()
# # Some widgets
# ),
tabPanel("About",
h3("Developers"),
fluidRow(
column(width = 2, h4("Name")),
column(width = 2, h4("e-mail")),
column(width = 2, h4("Webpage"))
),
fluidRow(
column(width = 2, p("Hugo Botelho")),
column(width = 2, a(href="mailto:[email protected]", "[email protected]")),
column(width = 2, a(href="http://webpages.fc.ul.pt/~hmbotelho", "http://webpages.fc.ul.pt/~hmbotelho"))
),
fluidRow(
column(width = 2, p("Christian Tischer")),
column(width = 2, a(href="", "")),
column(width = 2, a(href="", ""))
),
fluidRow(
column(width = 2, p("Aliaksandr Halavatyi")),
column(width = 2, a(href="", "")),
column(width = 2, a(href="", ""))
),
hr(),
p("Original release by Hugo Botelho, March 2017"),
p("Check for updates on GitHub:"),
a(href="https://github.com/hmbotelho/shinyHTM", "https://github.com/hmbotelho/shinyHTM")
)
)
))