-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathui.R
182 lines (150 loc) · 8.79 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
library(shiny)
library(shinyFiles)
library(colourpicker)
#library(gdata)
options(shiny.maxRequestSize=500*1024^3)
# Define UI for slider demo application
shinyUI(pageWithSidebar(
# Application title
headerPanel("Wave-Crest"),
# Sidebar with sliders that demonstrate various available options
sidebarPanel(width=12,height=250,
# file
fileInput("filename", label = "Data file input (support .csv, .txt, .tab)"),
# grouping vector
fileInput("ConditionVector", label = "Condition vector \n file name (e.g. collection time. support .csv, .txt, .tab)"),
# List of key markers
fileInput("Markers", label = "List of marker genes \n file name (support .csv, .txt, .tab)"),
column(4,
# Num permutation
numericInput("Permu",
label = "The number of iteration for 2-opt",
value = 20000),
# Normalization
radioButtons("Norm_buttons",
label = "Do you need to normalize data?",
choices = list("Yes" = 1,
"No" = 2),
selected = 1),
#Log data for input
radioButtons("Log_InData",
label = "Use log data for input into WaveCrest?",
choices = list("Yes" = 1,
"No" = 2),
selected = 1),
# Mean Cutoff
numericInput("Meancut",
label = "Only analyze genes with a mean larger than:",
value = 10),
# Identify additional genes
radioButtons("Iden_buttons",
label = "Identify additional dynamic genes based on the recovered order ('fishing')?",
choices = list("Yes" = 1,
"No" = 2),
selected = 1),
# Identify additional genes
radioButtons("DF_buttons",
label = "What type of trend do you expect?",
choices = list("Linear" = 1,
"Quadratic" = 2,
"Cubic"=3,
"Quartic"=4),
selected = 3),
# set seed
numericInput("Seed",
label = "Set seed (for random number generator)",
value = 1),
# plot log-exp or not
radioButtons("log_whether",
label = "Plot in log scale?",
choices = list("No" = 1,
"log2(expression + 1)" = 2),
selected = 1),
radioButtons("MarkerPlot_buttons",
label = "Plot marker genes following recovered cell order?",
choices = list("Yes" = 1,
"No" = 2),
selected = 1)
),
column(width=4,
radioButtons("AddPlot_buttons",
label = "Plot additional dynamic genes following recovered cell order?",
choices = list("Yes" = 1,
"No" = 2),
selected = 1),
radioButtons("AddTrend_buttons",
label = "Add trendline to dynamic gene plots?",
choices = list("Yes" = 1,
"No" = 2),
selected = 1),
# num genes to plot
textInput("PlotNum",
label = "Number of additional genes to plot (if not specified, top 10 genes will be plotted)",
value = ""),
radioButtons("FlipOrder_buttons",
label = "Reverse the recovered cell order?",
choices = list("Yes" = 1,
"No" = 2),
selected = 2),
radioButtons("AddHeatMap_buttons",
label = "Plot heatmap of marker genes following recovered cell order?",
choices = list("Yes" = 1,
"No" = 2),
selected = 1),
tags$div(tags$b("Select colors for the heatmap :")),
checkboxInput("UseCols", "Use default green to red heatmap ? ", TRUE),
fluidPage(colourInput("col1", "Low values: ", "green")),
fluidPage(colourInput("col2", "Middle values:", "black")),
fluidPage(colourInput("col3", "High values:", "red")),
radioButtons("clusterRow",
label = "Cluster marker genes in heatmap (otherwise use original order) ? ",
choices = list("Yes" = 1,
"No" = 2),
selected = 1)
),
column(4,
# output dir
tags$div(tags$b("Please select a folder for output :")),
shinyDirButton('Outdir', label ='Select Output Folder', title = 'Please select a folder'),
tags$br(),
tags$br(),
# plot name
textInput("InfoFileName",
label = "Export file name - input parameters and version info",
value = "WaveCrest_info"),
# export normalzied matrix (original order)
textInput("exNormFileName",
label = "Export file name - normalized expression matrix (following original cell order)",
value = "normalized"),
# export normalzied matrix (recovered order)
textInput("exENINormFileName",
label = "Export file name - normalized expression matrix (following recovered cell order)",
value = "normalized_ENI"),
# export gene list with p-value (IdenRes)
textInput("exGListFileName",
label = "Export file name - genes sorted by fishing MSE",
value = "genes_by_dynamic"),
# plot name
textInput("exMarkerPlotFileName",
label = "Export file name for the plots? (marker genes following recovered order)",
value = "PlotMarkers"),
# plot name
textInput("exDynamicPlotFileName",
label = "Export file name for the plots? (additional genes following recovered order)",
value = "PlotDynamic"),
# plot name
textInput("exHeatMapPlotFileName",
label = "Export file name for the plots? (heatmap of key markers in recovered order)",
value = "PlotHeatMap")
),
br(),
br(),
actionButton("Submit","Submit for processing")
),
# Show a table summarizing the values entered
mainPanel(
h4(textOutput("print0")),
#tableOutput("values")
dataTableOutput("tab")
)
))