-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
204 lines (198 loc) · 7.59 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
# ----- Interfaz de la Aplicación ----
ui <- dashboardPage(
# ----- Encabezado de la Dashboard -----
dashboardHeader(title = "Andera - Exploración de Microbiomas"),
# ----- Panel del Dashboard -----
dashboardSidebar(
# Código para la barra lateral
sidebarMenu(
menuItem("Carga de Datos", tabName = "data_load", icon = icon("database")),
menuItem("Filtrado", tabName = "filtering", icon = icon("yin-yang")),
menuItem("Diversidad Alfa y Beta", tabName = "diversity", icon = icon("bank")),
menuItem("Mapas de Calor", tabName = "heatmaps", icon = icon("snowflake")),
menuItem("PCoA", tabName = "pcoa", icon = icon("hurricane")),
menuItem("PERMANOVA", tabName = "permanova", icon = icon("flask-vial")),
menuItem("Grafos", tabName = "grafos", icon = icon("spider", lib = "font-awesome"))
)
),
# ----- Cuerpo del Dashboard -----
dashboardBody(
# Se añade el tema que se ha creado en fresh para la Dashboard.
use_theme(mytheme),
tabItems(
# Tab de Carga de Datos
tabItem(tabName = "data_load",
fluidRow(
box(
title = "Carga de Datos",
status = "primary",
solidHeader = TRUE,
collapsible = TRUE,
width = 12,
radioButtons(
"data_source",
"Seleccione la Fuente de Datos",
choices = c("Archivo", "Conjunto de datos de ejemplo"),
selected = "Conjunto de datos de ejemplo"
),
conditionalPanel(
condition = "input.data_source == 'Archivo'",
fileInput("file1", "Elija un archivo Phyloseq")
),
conditionalPanel(
condition = "input.data_source == 'Conjunto de datos de ejemplo'",
selectInput("dataset", "Seleccione un objeto phyloseq de muestra",
choices = c("Global Patterns", "Enterotype", "Soil"),
selected = "Global Patterns")),
actionButton("update", "Actualizar"),
downloadButton("downloadData", "Descargar objeto Phyloseq")
),
box(
title = "Resumen del Objeto Phyloseq",
status = "primary",
solidHeader = TRUE,
collapsible = TRUE,
width = 12,
verbatimTextOutput("physeq_summary")
),
box(
title = "Árbol Filogenético",
status = "primary",
solidHeader = TRUE,
collapsible = TRUE,
width = 12,
plotOutput("phylo_tree")
)
)
),
# Tab de Filtrado
tabItem(tabName = "filtering",
fluidRow(
box(
title = "Filtrado",
status = "primary",
solidHeader = TRUE,
collapsible = TRUE,
width = 12,
numericInput("min_count", "Número mínimo de conteos", value = 0, min = 0),
uiOutput("variableui"),
uiOutput("valueui"),
#numericInput("min_prevalence", "Prevalencia mínima", value = 0, min = 0, max = 1, step = 0.01),
actionButton("filter", "Filtrar")
),
box(
title = "Resumen del Objeto Phyloseq",
status = "primary",
solidHeader = TRUE,
collapsible = TRUE,
width = 12,
verbatimTextOutput("filtered_physeq_summary")
),
box(
title = "Árbol Filogenético",
status = "primary",
solidHeader = TRUE,
collapsible = TRUE,
width = 12,
plotOutput("filtered_phylo_tree")
)
)
),
# Tab de Diversidad Alfa y Beta
tabItem(tabName = "diversity",
fluidRow(
box(
title = "Estudio de la Riqueza",
status = "primary",
solidHeader = TRUE,
collapsible = TRUE,
width = 12,
selectInput("diversity", "Seleccione el tipo de diversidad",
choices = c("Chao1", "ACE", "Shannon", "Simpson", "InvSimpson", "Fisher"),
multiple = TRUE, selected = c('Shannon', 'Simpson')),
uiOutput("alpha_variableui"),
actionButton("update_diversity", "Actualizar"),
#selectInput("distance", "Seleccione el tipo de distancia", choices = c("bray", "jaccard", "unifrac", "wunifrac")),
),
box(
title = "Diversidad Alfa & Beta",
status = "primary",
solidHeader = TRUE,
collapsible = TRUE,
width = 12,
plotOutput("diversityPlot")
)
)
),
# Tab de Mapas de Calor
tabItem(tabName = "heatmaps",
fluidRow(
box(
title = "Mapas de Calor",
status = "primary",
solidHeader = TRUE,
collapsible = TRUE,
width = 12,
actionButton("update_heatmaps", "Actualizar"),
),
box(
title = "Mapa de Calor de Abundancia de OTUs",
status = "primary",
solidHeader = TRUE,
collapsible = TRUE,
width = 12,
plotOutput("heatmap_otus")
),
box(
title = "Mapa de Calor de Abundancia de Especies",
status = "primary",
solidHeader = TRUE,
collapsible = TRUE,
width = 12,
plotOutput("heatmap_species")
)
)
),
# Tab de PCoA
tabItem(tabName = "pcoa",
fluidRow(
box(
title = "PCoA",
status = "primary",
solidHeader = TRUE,
collapsible = TRUE,
width = 12,
selectInput("distance_pcoa", "Seleccione el tipo de distancia", choices = c("bray", "jaccard", "unifrac", "wunifrac")),
plotOutput("pcoaPlot")
)
)
),
# Tab de PERMANOVA
tabItem(tabName = "permanova",
fluidRow(
box(
title = "PERMANOVA",
status = "primary",
solidHeader = TRUE,
collapsible = TRUE,
width = 12,
selectInput("distance_permanova", "Seleccione el tipo de distancia", choices = c("bray", "jaccard", "unifrac", "wunifrac")),
tableOutput("permanovaResults")
)
)
),
# Tab de Grafos
tabItem(tabName = "grafos",
fluidRow(
box(
title = "Grafos",
status = "primary",
solidHeader = TRUE,
collapsible = TRUE,
width = 12,
actionButton("update_graph", "Actualizar"),
)
)
)
)
))