-
Notifications
You must be signed in to change notification settings - Fork 6
/
ui.R
257 lines (236 loc) · 11.3 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
library(shiny)
library(DT)
library(Biobase)
library(shinyjs)
library(rglwidget)
library(plotly)
options(shiny.maxRequestSize = 500*1024^2)
shinyUI(
fluidPage(
tags$head(
tags$style(
HTML(".shiny-notification {
height: 100px;
width: 800px;
position:fixed;
font-weight: 500;
font-size: 20px;
background-color: #c1cdcd;
top: calc(40% - 50px);;
left: calc(50% - 400px);;
}"
)
)
),
useShinyjs(),
titlePanel("CCBR Microarray analysis workflow", windowTitle="CCBR Microarray analysis workflow"),
h5("(For Affymetrix human and mouse data)"),
column(2,
textInput("ProjectID", label=h6("Enter Project ID (with no spaces):"), value="", width="150px"),
actionButton(inputId='GObutton', label='Go')
),
shinyjs::hidden(
div(id='hideEverything',
sidebarPanel(
selectInput('analysisType', "Choose type of analysis",
c('Upload CEL files' = "CEL", 'Analyze GEO data' = 'GEO', ""),
selected = ''
)))
),
conditionalPanel(
condition = "input.analysisType == 'CEL'",
fluidRow(),
# column(2,
# textInput("ProjectID", label=h6("Project ID:"), value="CCBR", width="150px")
# ),
column(3,
fileInput("Indir", label=h6("Select CEL files"),multiple =T),
h5("Choose short descriptive file names with no spaces (eg Ctl1.CEL, KO1.CEL)")
),
br(),
br(),
actionButton(inputId="CELbutton", label="Display"),
br(),
br()
),
br(),
br(),
conditionalPanel(
condition = "input.analysisType == 'GEO'",
fluidRow(),
# column(2,
# textInput("ProjectID", label=h6("Project ID:"), value="CCBR", width="150px")
# ),
column(2,
textInput("gseid", label= h6("Accession Code"), value="8 digit GSE code", width="150px")
),
br(),
br(),
actionButton(inputId="button", label="Display")
),
br(),
br(),
br(),
br(),
shinyjs::hidden(
div(id= "hide1",
# fluidRow(
# column(3,
# selectInput("number", "Number of groups:",
# c("1"="1", "2"="2", "3"="3", "4"="4", "5"="5", "6"="6", "7"="7", "8"="8", "9"="9", "10"="10", ""),
# selected=""
# )
# #actionButton("button3", "Enter")
# )),
column(3,
uiOutput("ui"),
h6("(Name may be changed for compatibility with R)"),
br(),
h5("Select samples below and click \"Define\" to add to group"),
actionButton("button2", "Define")
))
),
br(),
br(),
shinyjs::hidden(
div(id= "hide2",
br(),
br(),
fluidRow(column(10, wellPanel(DT:: dataTableOutput("mytable"))))
)),
shinyjs::hidden(
div(id="hideCEL",
br(),
br(),
fluidRow(column(10, wellPanel(DT:: dataTableOutput("mytableCEL"))))
)),
# shinyjs:: hidden(
# div(id= "hide3",
# mainPanel(
# actionButton("test","Contrast"))
# )),
shinyjs:: hidden(
div(id= "hide3",
mainPanel(
h4("Contrasts: "),
uiOutput("choice1"),
uiOutput("choice2"),
mainPanel(
fluidRow(align='Top',
column(2,
actionButton("addrow","Add Contrast")
)),
mainPanel(
tableOutput("contrastTable"))
))),
# div(id= "hide3",
# # conditionalPanel(
# # condition = "input.number == '1'",
# mainPanel(
# h4("Contrasts: "),
# selectizeInput("selectIn1", "Select",
# choices = c("Group_1" = "Group_1",
# "Group_2" = "Group_2",
# "Group_3" = "Group_3",
# "Group_4" = "Group_4",
# "Group_5" = "Group_5",
# "Group_6" = "Group_6",
# "Group_7" = "Group_7",
# "Group_8" = "Group_8",
# "Group_9" = "Group_9",
# "Group_10" = "Group_10")),
# selectizeInput("selectIn2", "Versus",
# choices = c("Group_1" = "Group_1",
# "Group_2" = "Group_2",
# "Group_3" = "Group_3",
# "Group_4" = "Group_4",
# "Group_5" = "Group_5",
# "Group_6" = "Group_6",
# "Group_7" = "Group_7",
# "Group_8" = "Group_8",
# "Group_9" = "Group_9",
# "Group_10" = "Group_10"))),
# mainPanel(
# fluidRow(align='Top',
# column(2,
# actionButton("addrow","Add Contrast")
# )),
#
# mainPanel(
# tableOutput("contrastTable"))
# )),
shinyjs::hidden(
div(id='hideAnalysis',
sidebarLayout(position = 'left',
sidebarPanel(
width=12,
fluidRow(align='Top',
# column(3,
# numericInput("NumContrasts", label=h6("Choose contrast to show"),value="1", width="150px")),
column(3,
uiOutput("displayContrast")),
column(3,
numericInput("pval", label=h6("P-value threshold for DEGs"),value=0.05, width="200px")),
column(3,
numericInput("fc", label=h6("Fold Change threshold for DEGs"),value=1.5, width="150px")),
column(3,
numericInput("pathPval", label=h6("P-value threshold for pathways"),value=0.05, width="200px"))
),
fluidRow(align='Top',
column(3,
selectInput('geneSet', label=h6("Choose Gene Set for ssGSEA"),
list(`Human` = c("","H: Hallmark Gene Sets"="h.all.v6.2.symbols.gmt", "C1: Positional Gene Sets"="c1.all.v6.2.symbols.gmt", "C2: Curated Gene Sets"="c2.all.v6.2.symbols.gmt",
"C3: Motif Gene Sets"="c3.all.v6.2.symbols.gmt", "C4: Computational Gene Sets"="c4.all.v6.2.symbols.gmt","C5: GO gene sets"="c5.all.v6.2.symbols.gmt",
"C6: Oncogenic Signatures"="c6.all.v6.2.symbols.gmt", "C7: Immunologic Signatures"="c7.all.v6.2.symbols.gmt"),
`Mouse` = c("Co-expression"="MousePath_Co-expression_entrez.gmt", "Gene Ontology"="MousePath_GO_entrez.gmt", "Curated Pathway"="MousePath_Pathway_entrez.gmt", "Metabolic"="MousePath_Metabolic_entrez.gmt",
"TF targets"="MousePath_TF_entrez.gmt", "miRNA targets"="MousePath_miRNA_entrez.gmt", "Location"="MousePath_Location_entrez.gmt")))),
column(3,
numericInput("pvalSS", label=h6("P-value threshold for ssGSEA"), value=1)),
column(3,
numericInput("fcSS", label=h6("Fold Change threshold for ssGSEA"), value=0))
),
actionButton(inputId="analyze",label="Start")),
mainPanel(
br(),br(),br(),br(),br(),br(),
navbarPage(title = "Results",
navbarMenu (title="Pre-normalization QC plots",
tabPanel("Histogram",plotOutput("rawhist")),
tabPanel("Maplots", uiOutput("rawmaplot")),
tabPanel("Boxplots", plotOutput("rawbox")),
tabPanel("RLE",plotOutput("rle")),
tabPanel("NUSE",plotOutput("nuse"))
),
navbarMenu (title="Post-normalization plots",
tabPanel("Histogram",plotOutput("rmahist")),
tabPanel("Maplots",uiOutput("normaplot")),
tabPanel("Boxplots",plotOutput("rmabox")),
tabPanel("3D-PCA",plotlyOutput("pca3d")),
tabPanel("Interactive Heatmap",plotlyOutput("heatmap"))
),
navbarMenu (title="DEG-Enrichments-tables",
tabPanel("Differentially Expressed Genes",DT::dataTableOutput("deg")),
tabPanel("Pathways for Upregulated Genes",DT::dataTableOutput("topUp"),br(),br(),plotOutput('geneHeatmapUp', width='100%', height='800px')),
tabPanel("Pathways for Downregulated Genes",DT::dataTableOutput("topDown"),br(),br(),plotOutput('geneHeatmapDw', width='100%', height='800px')),
tabPanel("Interactive Volcano Plot",plotly::plotlyOutput('volcano'))
),
navbarMenu (title='Single Sample GSEA',
tabPanel("Enriched Pathways",DT::dataTableOutput('ssgsea')),
tabPanel("Pathway Heatmap",plotOutput("ssHeatmap", width='100%', height='800px'))
)
),br(),br(),br(),br()
)
)
)
),
shinyjs::hidden(
div(id='hideDownloads',
mainPanel(
#actionButton(inputId="rep",label="Generate Report"),
downloadButton('downloadReport', label = 'Download Report'),
downloadButton('downloadTables', label = 'Download Tables')
)
)
)
)
)
)