-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
148 lines (140 loc) · 5.99 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
ui <- fluidPage(
# Change color of all hyperlinks
# App title ----
titlePanel("CliqueMS Web"),
# sidebar
sidebarPanel(
# tags$head(tags$style(HTML("
# .skin-aqua .sidebar a { color: #432; }")
# )),
br(),
# column(10,align = "left",
a(href = "https://github.com/osenan/cliqueMSWeb/raw/master/data/standards.mzXML",
"Example raw data"),
fileInput("raw", "Raw spectral data",
accept = c(".mzXML,mzML")),
#column(10, align = "left",
downloadLink("rds",
"Example processed data"),
# ),
fileInput("file",
"XCMS processed spectral data",
accept = c(".rds")),
#Clique parameters
numericInput("tol", label = "Tolerance",
value = 1e-5, min = 1e-7, max = 1e-3,
step = 5e-8),
# Isotope parameters
numericInput("ppmI", label = "ppm isotopes",
value = 10, min = 1, max = 100, step = 1),
numericInput("isoM", label = "isotope mass value",
value = 1.003355, min = 1,0033,
max = 1.004),
numericInput("maxGrade", label = "maxGrade", value = 2,
min = 1, max = 6, step = 1),
numericInput("maxCharge", label = "maxCharge", value = 3,
min = 1, max = 5),
# Annotation parameters
selectInput("polarity",
label = "Select polarity:",
choices = c("positive","negative"),
selected = "positive"),
radioButtons("adinfo",
label = "Choice adduct list:",
choices = c("default positive",
"default negative",
"custom adduct list")),
conditionalPanel(
condition = "input.adinfo == 'custom adduct list'",
fileInput("adinfoFile", "Upload custom adduct list",
accept = c(".csv"))
),
downloadLink("posDlist",
"Download positive default list"),
br(),
downloadLink("negDlist",
"Download negative default list"),
numericInput("ppmA", label = "ppm adducts",
value = 10, min = 1, max = 100, step = 1),
numericInput("emptyS", label = "empty annotation score",
value = 1e-6, min = 1e-12, max = 1e-3),
# anotate spectra button
conditionalPanel(
condition = "output.fileUploaded == true",
actionButton("anspectr", "Annotate data")
)
),
# main panel
mainPanel(
conditionalPanel(
condition = 'output.welcome == 0',
a(href = "https://github.com/osenan/cliqueMSWeb/blob/master/README.md",
"See tutorial here"),
withTags({
div(class = "header", checked = NA,
p("Welcome to cliqueMS Web, please upload spectral data, set parameters and start annotation")
)
})
),
# sliderOK conditional
column(10, align = "center",
conditionalPanel(
condition = "output.sliderOK == 1",
withTags({
div(class = "header", checked = NA,
h4("Clique groups have been computed")
)
}),
tableOutput('tableCliques'),
withTags({
div(class = "header", checked = NA,
p("In the following histogram you can see the distribution of the clique group size")
)
}),
sliderInput(inputId = "breaksH",
label = "Clique size breaks:",
min = 1, max = 50, value = 10),
shinycssloaders::withSpinner(plotOutput('histCliques'), type = 5),
withTags({
div(class = "header", checked = NA,
h4("Annotation of isotopes is done")
)
})
),
shinycssloaders::withSpinner(plotOutput('plotIso'), type = 5),
conditionalPanel(
condition = 'output.plotIso',
withTags({
div(class = "header", checked = NA,
h4("Annotation of adducts is done")
)
})
),
shinycssloaders::withSpinner(plotOutput('plotAn1'), type = 5)
),
conditionalPanel(
condition = 'output.plotAn1',
numericInput(inputId = "rtmin", label = "Minimal rt",
value = 1, min = 0, max = 99.75,
step = 0.25),
numericInput(inputId = "rtmax", label = "Maximum rt",
value = 50, min = 0.25, max = 100,
step = 0.25),
numericInput(inputId = "mm", label = "Molecular mass",
value = 90, min = 0, max = 1000),
numericInput(inputId = "mmppm", label = "ppm mass range",
value = 20, min = 1, max = 200),
actionButton("tablemm", label = "Search metabolites"),
div(tableOutput('metT'),style = "font-size:85%"),
withTags({
div(class = "header", checked = NA,
p("Thanks for using CliqueMS Web, in the following link you can download the complete annotation")
)
}),
column(10, align = "center",
downloadButton("dpeaklist",
"Download Annotation"),
br())
)
)
)