-
Notifications
You must be signed in to change notification settings - Fork 1
/
ui.R
162 lines (140 loc) · 4.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
#
# SHINY UI
# ***********************************************
# Define user interface for application
ui <- navbarPage(
# Title on NavBar Header
title = "ShinyLib - interactive gene fitness analysis",
# Use one of different shiny themes
theme = shinytheme("cosmo"),
#shinythemes::themeSelector(),
tabPanel("App",
# Sidebar
sidebarLayout(
# HERE COME ALL CONTROLS FOR THE SIDEBAR PANEL
sidebarPanel(width = 5,
# SELECT DATA
# -------------------
# select data file
h4("DATA OPTIONS"),
fluidRow(
column(width = 6,
selectInput("UserDataChoice",
"Choose data:", data_list,
selected = data_list[1])
),
column(width = 6,
uiOutput("UserFilters")
)
),
# SELECT PLOT OPTIONS
# -------------------
hr(),
h4("PLOT OPTIONS"),
fluidRow(
# FACTORIZATION AND ORDERING OPTIONS
column(width = 4,
uiOutput("UserXVariable")
),
column(width = 4,
uiOutput("UserYVariable")
),
column(width = 4,
uiOutput("UserCondVariable")
)
),
fluidRow(
# DATA GROUPING OPTIONS
column(width = 3,
uiOutput("UserTheme")
),
column(width = 3,
uiOutput("UserGrouping")
),
column(width = 3,
uiOutput("UserPlotType")
),
column(width = 3,
uiOutput("UserLogY")
)
),
# OTHER GRAPHICAL PLOT OPTIONS
fluidRow(
# PANEL LAYOUT AND PLOT DIMESNIONS
column(width = 4,
selectInput("UserPanelLayout",
"Panel layout:", choices = list("automatic", "manual"),
selected = "automatic")
),
column(width = 2,
conditionalPanel(condition = "input.UserPanelLayout == 'manual'",
numericInput("UserPanelLayoutCols",
"Columns:", value = 4)
)
),
column(width = 2,
conditionalPanel(condition = "input.UserPanelLayout == 'manual'",
numericInput("UserPanelLayoutRows",
"Rows:", value = 4)
)
),
column(width = 2,
selectInput("UserPrintHeight",
"Plot height:", choices = c(1:10*100), selected = 700)
),
column(width = 2,
selectInput("UserPrintWidth",
"Plot width:", choices = c("auto", 1:10*100), selected = "auto")
)
),
hr(),
fluidRow(
# SELECT GENES OR PROTEINS FROM TREE
column(width = 6,
h4("GENE SELECTION"),
shinyTree("tree", search = TRUE, checkbox = TRUE)
),
# INFO BOX WITH CONTACT AND REFERENCES (EXTERNAL)
helpbox(width = 6)
)
),
# MAIN PANEL WITH OUTPUT PLOTS
# Each tab has individual Download buttons
column(width = 7,
wellPanel(
tabsetPanel(
tabPanel("DEPLETION / ENRICHMENT", uiOutput("dotplot.ui"),
downloadButton("UserDownloadDotplot", "Download svg"),
help_dotplot()
),
tabPanel("HEAT MAP", uiOutput("heatmap.ui"),
downloadButton("UserDownloadHeat", "Download svg"),
help_heatmap()
),
tabPanel("FITNESS COMPARISON", uiOutput("fitness.ui"),
downloadButton("UserDownloadFitness", "Download svg"),
help_fitness()
),
#tabPanel("CLUSTERING", uiOutput("clustering.ui"),
# numericInput("UserNClust", label = "N cluster", value = 4, step = 1)
#),
tabPanel("TABLE", uiOutput("table.ui"),
downloadButton("UserDownloadTable", "Download table")
)
)
)
)
)
),
# THE ABOUT PAGE
tabPanel("About",
# THE SAME OR A BIT EXTENDED HELP BOX AS IN SIDEBAR
column(width = 4,
helpbox(width = 12),
fundbox(width = 12),
),
column(width = 8,
methbox(width = 12)
)
)
)