-
Notifications
You must be signed in to change notification settings - Fork 10
/
app.R
729 lines (693 loc) · 49.9 KB
/
app.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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
###########################################################################################################
## Proteomics Visualization R Shiny App
##
##This software belongs to Biogen Inc. All right reserved.
##
##@file: ui.R
##@Developer : Benbo Gao ([email protected])
##@Date : 9/6/2019
##@version 3.0
###########################################################################################################
source("global.R",local = TRUE)$value
ui <- fluidPage(
theme = shinytheme("cerulean"),
windowTitle = "Quickomics",
tagList(tags$head(tags$style(type = 'text/css','.navbar-brand{display:none;}')),
useShinyjs(),
titlePanel(
fluidRow(
column(4, img(height =75 , src = "Quickomics.png")),
column(8, h2(strong(textOutput('project')), align = 'left'))
),
windowTitle = "Quickomics" ),
navbarPage(title ="", id="menu",
##########################################################################################################
## Select Dataset
##########################################################################################################
tabPanel("Dataset",
fluidRow(
column(12,
tabsetPanel(id="Tables",
#tabPanel(title="Introduction",htmlOutput('intro')),
#tabPanel(title="Project Table", DT::dataTableOutput('projecttable')),
tabPanel(title="Select Dataset",
radioButtons("select_dataset",label="Select data set", choices=c("Saved Projects","Upload RData File", "Upload Data Files (csv)"),inline = F, selected="Saved Projects"),
conditionalPanel("input.select_dataset=='Saved Projects'",
selectInput("sel_project", label="Available Dataset",
choices=c("", projects), selected=NULL)),
conditionalPanel("input.select_dataset=='Upload RData File'",
fileInput("file1", "Choose data file"),
fileInput("file2", "(Optional) Choose network file"),
uiOutput('ui.action') ),
conditionalPanel("input.select_dataset=='Upload Data Files (csv)'",
h5("Use the Upload Files tab to the right to create your own data set.") )
),
tabPanel(title="Project Overview", htmlOutput("summary"),
tableOutput('group_table'), tags$br(),
textInput("exp_unit", "Expression Data Units", value="Expression Level", width="300px"),tags$br(),
uiOutput('comp_info') ),
tabPanel(title="Sample Table", actionButton("sample", "Save to output"), dataTableOutput('sample')),
tabPanel(title="Result Table", actionButton("results", "Save to output"), dataTableOutput('results')),
tabPanel(title="Data Table", actionButton("data_wide", "Save to output"), dataTableOutput('data_wide')),
tabPanel(title="Protein Gene Names", actionButton("ProteinGeneName", "Save to output"), dataTableOutput('ProteinGeneName')),
tabPanel(title="Upload Files",
uiOutput('upload.files.ui'), #see process_uploaded_files.R for details.
tags$br(),
textOutput('upload.message')
),
tabPanel(title="Help", htmlOutput('help_input'))
)
)
)
),
##########################################################################################################
## Groups and Samples
##########################################################################################################
tabPanel("Groups and Samples",
fluidRow(
column(4,
wellPanel(
tags$style(mycss),
actionButton("reset_group", "Reset Groups and Samples"),
tags$p("Use the boxes below to remove or add groups/samples. Use the tools at right side for advanced selection and ordering."),
selectizeInput("QC_groups", label="Select Groups", choices=NULL, multiple=TRUE),
checkboxInput("QC_comp2sample", "Use Samples in Subset/Comparison?", FALSE, width="90%"),
conditionalPanel("input.QC_comp2sample==1",
uiOutput("QC_samples_from_comp") ),
selectizeInput("QC_samples", label="Select Samples", choices=NULL,multiple=TRUE),
column(width=12,textOutput("selectGroupSample")),
tags$hr()
)),
column(8,
tags$br(),
tags$hr(style="border-color: RoyalBlue;"),
uiOutput('reorder_group'),
uiOutput('sample_choose_order')),
)
),
##########################################################################################################
## QC Plots
##########################################################################################################
tabPanel("QC Plots",
fluidRow(
column(3,
wellPanel(
tags$style(mycss),
column(width=12,uiOutput("selectGroupSampleQC")),
conditionalPanel("input.groupplot_tabset=='PCA Plot' || input.groupplot_tabset=='PCA 3D Interactive' || input.groupplot_tabset=='PCA 3D Plot' || input.groupplot_tabset=='Sample-sample Distance' ",
selectInput("PCAcolorby", label="Color By", choices=NULL)),
conditionalPanel("input.groupplot_tabset=='PCA Plot' || input.groupplot_tabset=='PCA 3D Interactive'",
selectInput("PCAshapeby", label="Shape By", choices=NULL)),
conditionalPanel("input.groupplot_tabset=='PCA Plot'",
selectInput("PCAsizeby", label="Size By", choices=NULL),
selectizeInput("pcnum",label="Select Principal Components", choices=1:10, multiple=TRUE, selected=1:2, options = list(maxItems = 2)),
radioButtons("ellipsoid", label="Plot Ellipsoid (>3 per Group)", inline = TRUE, choices = c("No" = FALSE,"Yes" = TRUE)),
radioButtons("mean_point", label="Show Mean Point", inline = TRUE, choices = c("No" = FALSE,"Yes" = TRUE)),
radioButtons("rug", label="Show Marginal Rugs", inline = TRUE, choices = c("No" = FALSE,"Yes" = TRUE)),
selectInput("PCAcolpalette", label= "Select palette", choices=c("Accent"="Accent","Dark2"="Dark2","Paired"="Paired","Pastel1"="Pastel1","Pastel2"="Pastel2","Set1"="Set1","Set2"="Set2","Set3"="Set3"), selected="Dark2"),
sliderInput("PCAdotsize", "Dot Size (when size by not used):", min = 1, max = 20, step = 1, value = 4),
radioButtons("PCA_subsample", label="Label Samples:", inline = TRUE, choices = c("All","None", "Subset"), selected = "All"),
conditionalPanel("input.PCA_subsample!='None'",
sliderInput("PCAfontsize", "Label Font Size:", min = 1, max = 20, step = 1, value = 10),
radioButtons("PCA_label",label="Select Sample Label",inline = TRUE, choices="")),
conditionalPanel("input.PCA_subsample=='Subset'",
actionButton("PCA_refresh_sample", "Reload Sample IDs"),
textAreaInput("PCA_list", "List of Samples to Label", "", cols = 5, rows=6))
),
conditionalPanel("input.groupplot_tabset=='Covariates'",
selectizeInput("covar_variates", label="Select Covariates:", choices=NULL, multiple = TRUE),
numericInput("covar_PC_cutoff", label= "Principle Component (PC) Cutoff (% explained variance)", value = 5, min=0, max=100, step=1),
numericInput("covar_FDR_cutoff", label= "Choose FDR Value Cutoff", value=0.1, min=0, max=1, step=0.001),
sliderInput("covar_ncol", label= "Number of Columns for Plots", min = 1, max = 6, step = 1, value = 3)
),
conditionalPanel("input.groupplot_tabset=='PCA 3D Plot'",
radioButtons("ellipsoid3d", label="Plot Ellipsoid (>3 per Group)", inline = TRUE, choices = c("No" = "No","Yes" = "Yes")),
radioButtons("dotlabel", label="Dot Label", inline = TRUE, choices = c("No" = "No","Yes" = "Yes"))
),
conditionalPanel("input.groupplot_tabset=='Dendrograms'",
sliderInput("DendroCut", label="tree cut number:", min = 2, max = 10, step = 1, value = 4),
sliderInput("DendroFont", label= "Label Font Size:", min = 0.5, max = 4, step = 0.5, value = 1),
radioButtons("dendroformat", label="Select Plot Format", inline = TRUE, choices = c("tree" = "tree","horizontal" = "horiz", "circular" = "circular"), selected="circular")
),
conditionalPanel("input.groupplot_tabset=='AlignQC'",
tags$hr(),
conditionalPanel("input.AlignQC_tabset=='Plot Other Variables'",
selectizeInput("alignQC_var", label="Select Numerica Variable to Plot", choices=NULL,multiple=FALSE)),
conditionalPanel("input.AlignQC_tabset!='Top Gene List'",
sliderInput("alignQC_height", "Plot Height:", min = 200, max = 3000, step = 50, value = 700),
sliderInput("alignQC_width", "Plot Width:", min = 200, max = 3000, step = 50, value = 1000)),
conditionalPanel("input.AlignQC_tabset=='Top Gene List'",
sliderInput("alignQC_TG_Ngene", "Max # of Top Genes Per Sample:", min = 1, max = 100, step = 1, value = 30),
sliderInput("alignQC_TG_Ntotal", "Max # of Genes to Show", min = 10, max = 200, step = 5, value = 90),
checkboxInput("alignQC_TG_list", "Show Table Instead of Graph?", FALSE, width="90%"),
conditionalPanel("input.alignQC_TG_list==0",
sliderInput("alignQC_TG_height", "Gene Plot Height:", min = 200, max = 3000, step = 50, value = 800),
sliderInput("alignQC_TG_width", "Gene Plot Width:", min = 200, max = 3000, step = 50, value = 800))),
conditionalPanel("input.AlignQC_tabset!='Top Gene List' || input.alignQC_TG_list==0",
sliderInput("alignQC_fontsize", "Label Font Size:", min = 1, max = 18, step = 1, value = 12)),
conditionalPanel("input.AlignQC_tabset=='Top Gene Ratio' || input.AlignQC_tabset=='Top Gene List'",
radioButtons("convert_exp", label="Convert Expression Data", inline = TRUE, choices = c("None", "log to linear"), selected = "log to linear"),
conditionalPanel("input.convert_exp=='log to linear'",
column(width=6,numericInput("convert_logbase", label= "log base", value = 2, min=1, step=1)),
column(width=6,numericInput("convert_small", label= "small value", value=1, min=0, step=0.1))),
conditionalPanel("input.AlignQC_tabset!='Top Gene List' | input.alignQC_TG_list==0",
textInput("alignQC_TGR_Y", "Label for Top Gene %", value="% of Total TPM", width = "100%")))
)
)),
column(9,
tabsetPanel(id="groupplot_tabset",
tabPanel(title="PCA Plot", actionButton("pcaplot", "Save to output"),
actionButton("plot_PCA", "Plot/Refresh", style="color: #0961E3; background-color: #F6E98C ; border-color: #2e6da4"),
plotOutput("pcaplot",height = 800)),
tabPanel(title="Covariates",
tabsetPanel(id="covartiate_tabset",
tabPanel(title="Summary", actionButton("compute_PC", "Compute/Refresh", style="color: #0961E3; background-color: #F6E98C ; border-color: #2e6da4"),
textOutput("N_pairs"),tags$br(),dataTableOutput('covar_table')),
tabPanel(title="Categorical Covariates",
h5("After changing parameters, please click Refresh button in the Summary panel to generate new plots."),
actionButton("covar_cat", "Save to output"),
sliderInput("covar_cat_height", "Plot Height:", min = 200, max = 3000, step = 50, value = 800),
tags$br(), uiOutput("plot.PC_covariatesC") ),
tabPanel(title="Numerical Covariates",
h5("After changing parameters, please click Refresh button in the Summary panel to generate new plots."),
actionButton("covar_num", "Save to output"),
sliderInput("covar_num_height", "Plot Height:", min = 200, max = 3000, step = 50, value = 800),
tags$br(),uiOutput("plot.PC_covariatesN") )
)),
tabPanel(title="AlignQC",
tabsetPanel(id="AlignQC_tabset",
tabPanel(title="Top Gene Ratio",
actionButton("alignQC_TGR", "Save to output"),
uiOutput("alignQC_TGR_plot")),
tabPanel(title="Top Gene List",
actionButton("alignQC_TGL", "Save to output"),
uiOutput("alignQC_TG_plot")),
tabPanel(title="Mapped Read Allocation",
actionButton("alignQC_RA", "Save to output"),
uiOutput("alignQC_RA_plot")),
tabPanel(title="Plot Other Variables",
actionButton("alignQC_OV", "Save to output"),
uiOutput("alignQC_OV_plot"))
)),
tabPanel(title="Eigenvalues", plotOutput("Eigenvalues",height = 650)),
tabPanel(title="PCA 3D Plot", plotOutput("pca_legend",height = 100), rglwidgetOutput("plot3d", width = 1000, height = 1000)),
tabPanel(title="PCA 3D Interactive", plotlyOutput("plotly3d", width = 1000, height = 1000)),
tabPanel(title="Sample-sample Distance",actionButton("SampleDistance", "Save to output"), plotOutput("pheatmap",height = 800)),
tabPanel(title="Dendrograms",actionButton("Dendrograms", "Save to output"), plotOutput("Dendrograms",height = 800)),
tabPanel(title="Box Plot", actionButton("QCboxplot", "Save to output"), plotOutput("QCboxplot",height = 800)),
tabPanel(title="CV Distribution", actionButton("histplot", "Save to output"), plotOutput("histplot",height = 800)),
tabPanel(title="Help", htmlOutput('help_QC'))
)
)
)
),
##########################################################################################################
## Volcano Plot
##########################################################################################################
tabPanel("DEGs",
fluidRow(
column(3,
wellPanel(
conditionalPanel( "input.volcano_tabset!='DEGs in Two Comparisons' && input.volcano_tabset!='DEG Counts'",
selectInput("volcano_test", label="Select Comparison Groups for Volcano Plot", choices=NULL)),
conditionalPanel( "input.volcano_tabset=='DEGs in Two Comparisons'",
selectInput("volcano_test1", label="1st Comparison (X-axis)", choices=NULL),
selectInput("volcano_test2", label="2nd Comparison (Y-aixs)", choices=NULL)),
numericInput("volcano_FCcut", label= "Choose Fold Change Cutoff", value = 1.2, min=1, step=0.1),
numericInput("volcano_pvalcut", label= "Choose P Value Cutoff", value=0.01, min=0, step=0.001),
radioButtons("volcano_psel", label= "P value or P.adj Value?", choices= c("Pval"="Pval","Padj"="Padj"),inline = TRUE),
conditionalPanel( "input.volcano_tabset!='DEGs in Two Comparisons' && input.volcano_tabset!='DEG Counts'",
textOutput("volcano_filteredgene"),
tags$head(tags$style("#volcano_filteredgene{color: red; font-size: 17px; font-style: italic; }" )),
textOutput("volcano_filteredgene2"),
tags$head(tags$style("#volcano_filteredgene2{color: red; font-size: 15px; font-style: italic; }" ))),
conditionalPanel( "input.volcano_tabset!='Volcano Plot (Interactive)' && input.volcano_tabset!='DEG Counts'",
radioButtons("volcano_genelabel",label="Select Gene Label",inline = TRUE, choices=""),
radioButtons("volcano_label", label="Label Genes:", inline = TRUE, choices = c("DEGs","None", "Upload", "Geneset"), selected = "DEGs"),
conditionalPanel("input.volcano_label!='None'",
sliderInput("Ngenes", "# of Genes to Label", min = 10, max = 200, step = 5, value = 50)),
conditionalPanel("input.volcano_label=='Upload'",
textAreaInput("volcano_gene_list", "List of genes to label\n(UniqueID, Gene.Name or Protein.ID)", "", cols = 5, rows=6)
),
conditionalPanel("input.volcano_label=='Geneset'",
uiOutput("html_geneset") )
),
conditionalPanel("input.volcano_tabset!='DEG Counts'",
radioButtons("more_options", label="Show More Options", inline = TRUE, choices = c("Yes","No"), selected = "No"),
conditionalPanel("input.more_options=='Yes'",
numericInput("Max_logFC", label= "Max abs(log2FC) in plot (use 0 for full range)", value=0, min=0),
numericInput("Max_Pvalue", label= "Max -log10(Stat Value) in plot (use 0 for full range)", value=0, min=0),
conditionalPanel( "input.volcano_tabset!='Volcano Plot (Interactive)'",
sliderInput("lfontsize", "Label Font Size:", min = 1, max = 10, step = 1, value = 4),
sliderInput("yfontsize", "Legend Font Size:", min = 8, max = 24, step = 1, value = 14),
radioButtons("vlegendpos", label="Legend position", inline = TRUE, choices = c("bottom","right"), selected = "bottom"),
radioButtons("rasterize", label="Rasterize plot", inline = TRUE, choices = c("Yes","No"), selected = "No")
),
conditionalPanel( "input.volcano_tabset=='DEGs in Two Comparisons'",
radioButtons("DEG_comp_XY", label="Make X and Y scale the same?", inline = TRUE, choices = c("Yes","No"), selected = "Yes"),
radioButtons("DEG_comp_color", label="Color DEGs using dot color?", inline = TRUE, choices = c("Yes","No"), selected = "Yes")))
)
)
),
column(9,
tabsetPanel(id="volcano_tabset",
tabPanel(title="DEG Counts",
tags$p("Click a comparison name to view volcano plot."), tags$hr(),
DT::dataTableOutput("deg_counts")),
tabPanel(title="Volcano Plot (Static)",actionButton("volcano", "Save to output"), plotOutput("volcanoplotstatic", height=800)),
tabPanel(title="Volcano Plot (Interactive)", plotlyOutput("volcanoplot", height=800)),
tabPanel(title="DEGs in Two Comparisons",actionButton("DEG_comp", "Save to output"), plotOutput("DEG_Compare", height=800)),
tabPanel(title="Data Table", actionButton("DEG_data", "Save to output"), DT::dataTableOutput("volcanoData")),
tabPanel(title="Help", htmlOutput('help_volcano'))
)
)
)
),
##########################################################################################################
## Heatmap
##########################################################################################################
tabPanel("Heatmap",
fluidRow(
column(3,
wellPanel(
#actionButton("action_heatmaps","Generate Interactive Heatmap"),
#selectizeInput("heatmap_groups", label="Select Groups", choices=NULL, multiple=TRUE),
#checkboxInput("HM_comp2sample", "Use Samples in Subset/Comparison?", FALSE, width="90%"),
#conditionalPanel("input.HM_comp2sample==1",
# uiOutput("HM_samples_from_comp") ),
#selectizeInput("heatmap_samples", label="Select Samples", choices=NULL, multiple=TRUE),
column(width=12,uiOutput("selectGroupSampleHeatmap")),
radioButtons("heatmap_subset",label="Genes used for heatmap", choices=c("All","Subset","Upload Genes", "Geneset"),inline = TRUE, selected="All"),
conditionalPanel("input.heatmap_subset=='Upload Genes'",
radioButtons("heatmap_upload_type", label="Select upload type", inline = TRUE, choices = c("Gene List","Annotated Gene File"), selected = "Gene List"),
conditionalPanel("input.heatmap_upload_type=='Gene List'",
textAreaInput("heatmap_list", "Enter Gene List", "", cols = 5, rows=6)),
conditionalPanel("input.heatmap_upload_type=='Annotated Gene File'",
uiOutput("gene_annot_file"))),
conditionalPanel("input.heatmap_subset=='Geneset'", uiOutput("html_geneset_hm") ),
conditionalPanel("input.heatmap_subset=='All'",
radioButtons("heatmap_submethod", label= "Plot Random Genes or Variable Genes", choices= c("Random"="Random","Variable"="Variable"),inline = TRUE),
numericInput("maxgenes",label="Choose Gene Number", min=1, max= 5000, value=100, step=1)),
conditionalPanel("input.heatmap_subset=='Subset'",
selectInput("heatmap_test", label="Select Genes from Test:", choices=NULL),
column(width=6,numericInput("heatmap_fccut", label= "Fold Change Cutoff", value = 1.2, min=1, step=0.1)),
column(width=6,numericInput("heatmap_pvalcut", label= "P Value Cutoff", value=0.01, min=0, step=0.001)),
radioButtons("heatmap_psel", label= "P value or P.adj Value?", choices= c("Pval"="Pval","Padj"="Padj"),inline = TRUE),
column(width=12,textOutput("heatmapfilteredgene"),
tags$head(tags$style("#heatmapfilteredgene{color: red; font-size: 16px; font-style: italic; }"))),
uiOutput("Test_to_sample"),
tags$hr()
),
conditionalPanel( "input.heatmap_tabset=='Static Heatmap Layout 1'",
selectizeInput("heatmap_annot", label="Annotate Samples", choices=NULL, multiple = TRUE)),
column(width=5,selectInput("dendrogram", "Apply Clustering:", c("both" ,"none", "row", "column"))),
column(width=5,selectInput("scale", "Apply Scaling:", c("none","row", "column"),selected="row")),
conditionalPanel( "input.heatmap_tabset=='Static Heatmap Layout 2'",
column(width=5,selectInput("key", "Color Key:", c("TRUE", "FALSE"))),
column(width=5,selectInput("srtCol", "angle of label", c("45", "60","90"))),
column(width=5,sliderInput("hxfontsize", "Column Font Size:", min = 0, max = 3, step = 0.5, value = 1)),
column(width=5,sliderInput("hyfontsize", "Row Font Size:", min = 0, max = 3, step = 0.5, value = 1)),
column(width=5,sliderInput("right", "Set Margin Width", min = 0, max = 20, value = 5)),
column(width=5,sliderInput("bottom", "Set Margin Height", min = 0, max = 20, value = 5))
),
conditionalPanel( "input.heatmap_tabset=='Interactive Heatmap'",
column(width=5,selectInput("key", "Color Key:", c("TRUE", "FALSE"))),
column(width=5,selectInput("srtCol", "angle of label", c("45", "60","90"))),
column(width=5,sliderInput("hxfontsizei", "Column Font Size:", min = 0, max = 3, step = 0.5, value = 1)),
column(width=5,sliderInput("hyfontsizei", "Row Font Size:", min = 0, max = 3, step = 0.5, value = 1)),
column(width=5,sliderInput("l", "Set Margin Width", min = 0, max = 200, value = 120)),
column(width=5, sliderInput("b", "Set Margin Height", min = 0, max = 200, value = 120))
),
conditionalPanel( "input.heatmap_tabset=='Static Heatmap Layout 1'",
column(width=5,sliderInput("hxfontsizep", "Column Font Size:", min = 0, max = 20, step = 1, value = 10)),
column(width=5,sliderInput("hyfontsizep", "Row Font Size:", min = 0, max = 20, step = 1, value = 7)),
radioButtons("heatmap_label",label="Gene Label",inline = TRUE, choices=""),
sliderInput("heatmap_N_genes", "Max Number of Genes to Label:", min = 0, max = 500, step = 10, value = 100),
h5("After changing parameters, please click Plot/Refresh button in the plot panel to generate heatmap."),
radioButtons("heatmap_highlight", label="Highlight Subset of Genes:", inline = TRUE, choices = c("Yes","No"), selected = "No"),
conditionalPanel("input.heatmap_highlight=='Yes'",
uiOutput("gene_highlight_file"),
sliderInput("hl_font_size", "Font Size:", min = 0, max = 20, step = 1, value = 9)),
radioButtons("heatmap_more_options", label="Show More Options", inline = TRUE, choices = c("Yes","No"), selected = "No"),
conditionalPanel("input.heatmap_more_options=='Yes'",
sliderInput("heatmap_height", "Heatmap Height:", min = 200, max = 3000, step = 50, value = 800),
radioButtons("heatmap_row_dend", label="Show row dendrogram", inline = TRUE, choices = c("No" = FALSE,"Yes" = TRUE), selected = TRUE),
radioButtons("heatmap_col_dend", label="Show column dendrogram", inline = TRUE, choices = c("No" = FALSE,"Yes" = TRUE), selected = TRUE),
column(width=3,colourInput("lowColor", "Low", "blue")),
column(width=3,colourInput("midColor", "Mid", "white")),
column(width=3,colourInput("highColor", "High", "red")),
column(width=5,selectInput("distanceMethod", "Distance Metric:", c("euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski"))),
column(width=5,selectInput("agglomerationMethod", "Linkage Algorithm:", c("complete", "single", "average", "centroid", "median", "mcquitty", "ward.D", "ward.D2"))),
column(width=5,sliderInput("cutreerows", "cutree_rows:", min = 0, max = 8, step = 1, value = 0)),
column(width=5,sliderInput("cutreecols", "cutree_cols:", min = 0, max = 8, step = 1, value = 0)),
radioButtons("custom_color", label="Upload Colors for Annotations", inline = TRUE, choices = c("Yes","No"), selected = "No"),
conditionalPanel("input.custom_color=='Yes'",
uiOutput("annot_color_file")),
textInput("heatmap_row_title", "Row Title", width = "100%"),
sliderInput("heatmap_row_title_font_size", "Row Title Font Size:", min = 0, max = 30, step = 1, value = 16),
textInput("heatmap_column_title", "Column Title", width = "100%"),
sliderInput("heatmap_column_title_font_size", "Column Title Font Size:", min = 0, max = 30, step = 1, value = 16)
)
)
)
),
column(9,
tabsetPanel(id="heatmap_tabset",
tabPanel(title="Static Heatmap Layout 1",actionButton("pheatmap2", "Save to output"),
actionButton("plot_heatmap", "Plot/Refresh", style="color: #0961E3; background-color: #F6E98C ; border-color: #2e6da4"),
uiOutput("plot.heatmap")),
tabPanel(title="Static Heatmap Layout 2", actionButton("staticheatmap", "Save to output"), plotOutput("staticheatmap", height = 800)),
tabPanel(title="Interactive Heatmap",textOutput("text"), p(), plotlyOutput("interactiveheatmap", height = 800)),
tabPanel(title="Help", htmlOutput('help_heatmap'))
)
)
)
),
##########################################################################################################
## Gene/Protein Expression Plot
##########################################################################################################
tabPanel("Expression Plot",
fluidRow(
column(3,
wellPanel(
conditionalPanel("input.expression_tabset=='Searched Expression Data' | input.expression_tabset=='Browsing' ",
# selectizeInput("sel_group", label="Select Groups", choices=NULL, multiple=TRUE),
column(width=12,uiOutput("selectGroupSampleExpression"))
),
conditionalPanel("input.expression_tabset=='Searched Expression Data' || input.expression_tabset=='Rank Abundance Curve'",
radioButtons("exp_subset",label="Genes Used in Plot", choices=c("Select", "Upload Genes", "Geneset"),inline = TRUE, selected="Select"),
conditionalPanel("input.exp_subset=='Upload Genes'",
textAreaInput("exp_list", "Enter Gene List", "", cols = 5, rows=6)),
conditionalPanel("input.exp_subset=='Select'",
radioButtons("exp_label",label="Select Gene Label",inline = TRUE, choices=c("UniqueID", "Gene.Name"), selected="Gene.Name"),
selectizeInput("sel_gene", label="Gene Name (Select 1 or more)", choices = NULL, multiple=TRUE, options = list(placeholder = 'Type to search'))),
conditionalPanel("input.exp_subset=='Geneset'", uiOutput("html_geneset_exp") ) ),
conditionalPanel("input.expression_tabset=='Searched Expression Data'",
radioButtons("SeparateOnePlot", label="Separate or One Plot", inline = TRUE, choices = c("Separate" = "Separate", "OnePlot" = "OnePlot"))),
conditionalPanel("input.expression_tabset=='Browsing'",
column(width=6,numericInput("expression_fccut", label= "Choose Fold Change Threshold", value = 1.2, min=1, step=0.1)),
column(width=6,numericInput("expression_pvalcut", label= "Choose P-value Threshold", value=0.01, min=0, step=0.001)),
radioButtons("expression_psel", label= "P value or P.adj Value?",
choices= c("Pval"="Pval","Padj"="Padj"),inline = TRUE),
selectInput("expression_test", label="Select Test", choices=NULL),
textOutput("expfilteredgene"),
tags$head(tags$style("#expfilteredgene{color: red; font-size: 20px; font-style: italic;}")),
column(width=6,selectInput("sel_page", label="Select Page", choices = NULL, selected=1)),
column(width=6,selectInput("numperpage", label= "Plot Number per Page", choices= c("4"=4,"6"=6,"9"=9), selected=6)),
radioButtons("browsing_gene_order", label="Order Genes by", inline = TRUE, choices = c("abs(Fold Change)","P value"))),
conditionalPanel("input.expression_tabset=='Searched Expression Data' | input.expression_tabset=='Browsing' ",
# selectizeInput("sel_group", label="Select Groups", choices=NULL, multiple=TRUE),
# column(width=12,textOutput("selectGroupSampleExpression")),
radioButtons("sel_geneid",label="Select Gene Label",inline = TRUE, choices=""),
radioButtons("plotformat", label="Select Plot Format", inline = TRUE, choices = c("Box Plot" = "boxplot","Bar Plot" = "barplot", "violin" = "violin","line" = "line")),
conditionalPanel("input.SeparateOnePlot=='OnePlot' & input.expression_tabset=='Searched Expression Data'",
h5("OnePlot only supports Bar and Line plots")),
radioButtons("IndividualPoint", label="Show Individual Point?", inline = TRUE, choices = c("YES" = "YES","NO" = "NO")),
selectizeInput("plotx", label="X Axis", choices=NULL, multiple = FALSE),
conditionalPanel("input.SeparateOnePlot!='OnePlot' | input.expression_tabset=='Browsing'",
selectizeInput("colorby", label="Color By:", choices=NULL, multiple = FALSE)),
conditionalPanel("input.colorby=='None'",
colourInput("barcol", "Select colour", "#1E90FF", palette = "limited")),
conditionalPanel("input.colorby!='None'",
selectInput("colpalette", label= "Select palette", choices=c("Accent"="Accent","Dark2"="Dark2","Paired"="Paired","Pastel1"="Pastel1","Pastel2"="Pastel2","Set1"="Set1","Set2"="Set2","Set3"="Set3"), selected="Dark2")),
#radioButtons("ColPattern", label="Bar Colors", inline = TRUE, choices = c("Palette" = "Palette", "Single" = "Single")),
sliderInput("expression_axisfontsize", "Axis Font Size:", min = 10, max = 28, step = 1, value = 16),
sliderInput("expression_titlefontsize", "Title Font Size:", min = 12, max = 28, step = 1, value = 16),
sliderInput("exp_plot_ncol", label= "Column Number", min = 1, max = 6, step = 1, value = 3),
textInput("Ylab", "Y label", width = "100%"),
textInput("Xlab", "X label", width = "100%"),
sliderInput("Xangle", label= "X Angle", min = 0, max = 90, step = 5, value = 90),
radioButtons("exp_plot_Y_scale", label="Y Axis Scale", inline = TRUE, choices = c("Log","Linear"), selected = "Log"),
conditionalPanel("input.exp_plot_Y_scale=='Linear'",
tags$p("Linear values are computed using the log base and samll value from the log based expression unit, e.g. log2(TPM+0.25). Please update the values below and the Y Label above as needed."),
column(width=6,numericInput("linear_base", label= "log Base", value = 2)),
column(width=6,numericInput("linear_small_value", label= "Small Value", value=0.25))),
radioButtons("exp_plot_Y_range", label="Y Axis Range", inline = TRUE, choices = c("Auto","Manual"), selected = "Auto"),
conditionalPanel("input.exp_plot_Y_range=='Manual'",
column(width=6,numericInput("exp_plot_Ymin", label= "Y Min", value = 0, step=0.1)),
column(width=6,numericInput("exp_plot_Ymax", label= "Y Max", value=5, step=0.1))),
h5("After changing parameters, please click Plot/Refresh button in the plot panel to generate expression plot.")),
conditionalPanel("input.expression_tabset=='Rank Abundance Curve'",
sliderInput("scurve_axisfontsize", "Axis Font Size:", min = 12, max = 28, step = 4, value = 16),
sliderInput("scurve_labelfontsize", "Label Font Size:", min = 2, max = 12, step = 1, value = 6),
textInput("scurveYlab", "Y label", value="Abundance", width = "100%"),
textInput("scurveXlab", "X label", value="Rank", width = "100%"),
sliderInput("scurveXangle", label= "X Angle", min = 0, max = 90, step = 15, value = 45),
radioButtons("scurveright", label="Density or histogram on Right:", inline = TRUE, choices = c("densigram" = "densigram", "density" = "density","histogram" = "histogram","boxplot" = "boxplot", "violin"= "violin"))),
conditionalPanel("input.expression_tabset=='Data Table' || input.expression_tabset=='Result Table' ",
h5("Enter some genes in Search Expression Data tab, then come here for data table."))
)
),
column(9,
tabsetPanel(id="expression_tabset",
tabPanel(title="Browsing",actionButton("browsing", "Save to output"),
actionButton("plot_browsing", "Plot/Refresh", style="color: #0961E3; background-color: #F6E98C ; border-color: #2e6da4"),
plotOutput("browsing", height=800)),
tabPanel(title="Searched Expression Data",actionButton("boxplot", "Save to output"),
verbatimTextOutput("geneSearchInfo"),
actionButton("plot_exp", "Plot/Refresh", style="color: #0961E3; background-color: #F6E98C ; border-color: #2e6da4"),
uiOutput("plot.exp")),
tabPanel(title="Data Table", DT::dataTableOutput("dat_dotplot")),
tabPanel(title="Result Table", DT::dataTableOutput("res_dotplot")),
tabPanel(title="Rank Abundance Curve",plotOutput("SCurve", height=800)),
tabPanel(title="Help", htmlOutput('help_expression'))
)
)
)
),
##########################################################################################################
## Gene Set Enrichment
##########################################################################################################
#tabPanel("Gene Set Enrichment", geneset_ui(id = "GS")),
##########################################################################################################
## Pattern Clustering
##########################################################################################################
## 10/08/2020
## eidted by bgao, add gene upload box and more plotting options
tabPanel("Pattern Clustering",
fluidRow(
column(3,
wellPanel(
radioButtons("pattern_subset",label="Use subset genes or upload your own subset?", choices=c("subset","upload genes"),inline = TRUE, selected="subset"),
conditionalPanel("input.pattern_subset=='subset'",
column(width=6,numericInput("pattern_fccut", label= "Choose Fold Change Threshold",value = 1.2, min=1, step=0.1)),
column(width=6,numericInput("pattern_pvalcut", label= "Choose P-value Threshold", value=0.01, min=0, step=0.001)),
radioButtons("pattern_psel", label= "P value or P.adj Value?", choices= c("Pval"="Pval","Padj"="Padj"),inline = TRUE),
textOutput("patternfilteredgene")
),
conditionalPanel("input.pattern_subset=='upload genes'", textAreaInput("pattern_list", "list", "", cols = 5, rows=6)),
tags$head(tags$style("#patternfilteredgene{color: red; font-size: 20px; font-style: italic; }")),
selectizeInput("pattern_group", label="Select Groups (re-order under Groups and Samples tab)", choices=NULL, multiple=TRUE),
radioButtons("ClusterMehtod", label="Cluster Method", inline = FALSE, choices = c("Soft Clustering" = "mfuzz", "K-means" = "kmeans")),
sliderInput("k", "Cluster Number:", min = 3, max = 12, step = 1, value = 6),
conditionalPanel("input.ClusterMehtod=='kmeans'",
sliderInput("pattern_font", "Font Size:", min = 12, max = 24, step = 1, value = 14),
sliderInput("pattern_Xangle", label= "X Angle", min = 0, max = 90, step = 15, value = 45)),
sliderInput("pattern_ncol", label= "Column Number", min = 1, max = 6, step = 1, value = 3),
conditionalPanel("input.Pattern_tabset=='Data Table'",
radioButtons("DataFormat", label="Data Output Format:", inline = TRUE, choices = c("Wide Format" = "wide","Long Format" = "long"))
)
)
),
column(9,
tabsetPanel(id="Pattern_tabset",
#tabPanel(title="Optimal Number of Clusters", plotOutput("nbclust", height=800)),
tabPanel(title="Clustering of Centroid Profiles",actionButton("pattern", "Save to output"),plotOutput("pattern", height=800)),
#tabPanel(title="Data Table",actionButton("Pattern_data", "Save to output"), DT::dataTableOutput("dat_pattern")),
tabPanel(title="Data Table", DT::dataTableOutput("dat_pattern")),
tabPanel(title="Help", htmlOutput('help_pattern'))
)
)
)
),
##########################################################################################################
## Correlation Network
##########################################################################################################
tabPanel("Correlation Network",
fluidRow(
column(3,
wellPanel(
radioButtons("network_label",label="Select Gene Label",inline = TRUE, choices=c("UniqueID", "Gene.Name"), selected="Gene.Name"),
selectizeInput("sel_net_gene", label="Gene Name (Select 1 or more)", choices = NULL, multiple=TRUE, options = list(placeholder = 'Type to search')),
sliderInput("network_rcut", label= "Choose r Cutoff", min = 0, max = 1, value = 0.9, step=0.02),
selectInput("network_pcut", label= "Choose P Value Cutoff", choices= c("0.0001"=0.0001,"0.001"=0.001,"0.01"=0.01,"0.05"=0.05),selected=0.01),
textOutput("networkstat"),
uiOutput("myTabUI")
)
),
column(9,
tabsetPanel(id="Network_tabset",
tabPanel("visNetwork", visNetworkOutput("visnetwork", height="800px"), style = "background-color: #eeeeee;"),
tabPanel("networkD3", forceNetworkOutput("networkD3", height="800px"), style = "background-color: #eeeeee;"),
tabPanel(title="Data Table", DT::dataTableOutput("dat_network")),
tabPanel(title="Help", htmlOutput('help_network'))
)
)
)
),
##########################################################################################################
## Venn Diagram
##########################################################################################################
tabPanel("Venn Diagram",
fluidRow(
column(3,
wellPanel(
conditionalPanel("input.venn_combined=='Venn Diagram from Current Project'",
numericInput("venn_fccut", label= "Choose Fold Change Cutoff", value = 1.2, min=1, step=0.1),
numericInput("venn_pvalcut", label= "Choose P value Cutoff", value=0.01, min=0, step=0.001),
radioButtons("venn_psel", label= "P value or P.adj Value?", choices= c("Pval"="Pval","Padj"="Padj"),inline = TRUE),
radioButtons("venn_updown", label= "All, Up or Down?", choices= c("All"="All","Up"="Up","Down"="Down"),inline = TRUE),
selectInput("venn_test1", label="Select List 1", choices=NULL),
conditionalPanel("input.venn_tabset=='Venn Diagram'",
colourInput("col1", "Select colour", "#0000FF",palette = "limited")
),
selectInput("venn_test2", label="Select List 2", choices=NULL),
conditionalPanel("input.venn_tabset=='Venn Diagram'",
colourInput("col2", "Select colour", "#FF7F00",palette = "limited")
),
selectInput("venn_test3", label="Select List 3", choices=NULL),
conditionalPanel("input.venn_tabset=='Venn Diagram'",
colourInput("col3", "Select colour", "#00FF00",palette = "limited")
),
selectInput("venn_test4", label="Select List 4", choices=NULL),
conditionalPanel("input.venn_tabset=='Venn Diagram'",
colourInput("col4", "Select colour", "#FF00FF",palette = "limited")
),
selectInput("venn_test5", label="Select List 5", choices=NULL),
conditionalPanel("input.venn_tabset=='Venn Diagram'",
colourInput("col5", "Select colour", "#FFFF00", palette = "limited")
),
conditionalPanel("input.venn_tabset=='Intersection Output'",
radioButtons("vennlistname", label= "Label name", choices= c("Gene.Name"="Gene.Name","AC Number"="AC", "UniqueID"="UniqueID"),inline = TRUE, selected = "Gene.Name"))
),
conditionalPanel("input.venn_combined=='Venn Diagram Across Projects'",
numericInput("vennP_fccut", label= "Choose Fold Change Cutoff", value = 1.2, min=1, step=0.1),
numericInput("vennP_pvalcut", label= "Choose P value Cutoff", value=0.01, min=0, step=0.001),
radioButtons("vennP_psel", label= "P value or P.adj Value?", choices= c("Pval"="Pval","Padj"="Padj"),inline = TRUE),
checkboxInput("upperSymbols", "Upper Case Gene Symbols (e.g. mouse vs human)?", FALSE, width="90%"),
selectInput("dataset1", "Data set1", choices=NULL),
selectInput("vennP_test1", label="Select List 1", choices=NULL),
conditionalPanel("input.vennP_tabset=='Venn Diagram'",
colourInput("vennPcol1", "Select colour", "#0000FF",palette = "limited")
),
selectInput("dataset2", "Data set2", choices=NULL),
selectInput("vennP_test2", label="Select List 2", choices=NULL),
conditionalPanel("input.vennP_tabset=='Venn Diagram'",
colourInput("vennPcol2", "Select colour", "#FF7F00",palette = "limited")
),
selectInput("dataset3", "Data set3", choices=NULL),
selectInput("vennP_test3", label="Select List 3", choices=NULL),
conditionalPanel("input.vennP_tabset=='Venn Diagram'",
colourInput("vennPcol3", "Select colour", "#00FF00",palette = "limited")
),
selectInput("dataset4", "Data set4", choices=NULL),
selectInput("vennP_test4", label="Select List 4", choices=NULL),
conditionalPanel("input.vennP_tabset=='Venn Diagram'",
colourInput("vennPcol4", "Select colour", "#FF00FF",palette = "limited")
),
selectInput("dataset5", "Data set5", choices=NULL),
selectInput("vennP_test5", label="Select List 5", choices=NULL),
conditionalPanel("input.vennP_tabset=='Venn Diagram'",
colourInput("vennPcol5", "Select colour", "#FFFF00", palette = "limited")
)
)
)
),
column(9,
tabsetPanel(id="venn_combined",
tabPanel(title="Venn Diagram from Current Project",
tabsetPanel(id="venn_tabset",
tabPanel(title="Venn Diagram",
column(9,
actionButton("vennDiagram", "Save to output"),plotOutput("vennDiagram", height = 800)
),
column(3,
textInput("title", "Title", width = "100%"),
sliderInput("maincex", "Title Size", min = 0, max = 6, value = 3, width = "100%"),
sliderInput("alpha", "Opacity", min = 0, max = 1, value = 0.4, width = "100%"),
sliderInput("lwd", "Line Width", min = 1, max = 4, value = 1, width = "100%"),
sliderInput("lty", "Line Type", min = 1, max = 6, value = 1, width = "100%"),
radioButtons("fontface","Number Font face",list("plain", "bold", "italic"),selected = "plain", inline = TRUE),
sliderInput("cex", "Font size", min = 1, max = 4, value = 2, width = "100%"),
radioButtons("catfontface","Label Font face",list("plain", "bold", "italic"), selected = "plain", inline = TRUE),
sliderInput("catcex", "Font size", min = 1, max = 2, step=0.1, value = 1.8, width = "100%"),
sliderInput("margin", "Margin", min = 0, max = 1, step=0.05, value = 0.1, width = "100%")
)
),
tabPanel(title="Venn Diagram (black & white)", plotOutput("SvennDiagram",height = 800, width = 800)),
tabPanel(title="Intersection Output", htmlOutput("vennHTML")),
tabPanel(title="DEG Table", actionButton("venn_DEG_data", "Save to output"), DT::dataTableOutput("venn_DEG_Data")),
tabPanel(title="Help", htmlOutput('help_venn'))
)
),
tabPanel(title="Venn Diagram Across Projects",
tabsetPanel(id="vennP_tabset",
tabPanel(title="Venn Diagram",
column(9,
plotOutput("vennPDiagram", height = 800)
),
column(3,
textInput("vennPtitle", "Title", width = "100%"),
sliderInput("vennPmaincex", "Title Size", min = 0, max = 6, value = 3, width = "100%"),
sliderInput("vennPalpha", "Opacity", min = 0, max = 1, value = 0.4, width = "100%"),
sliderInput("vennPlwd", "Line Width", min = 1, max = 4, value = 1, width = "100%"),
sliderInput("vennPlty", "Line Type", min = 1, max = 6, value = 1, width = "100%"),
radioButtons("vennPfontface", "Number Font face", list("plain", "bold", "italic"), selected = "plain", inline = TRUE),
sliderInput("vennPcex", "Font size", min = 1, max = 4, value = 2, width = "100%"),
radioButtons("vennPcatfontface", "Label Font face", list("plain", "bold", "italic"), selected = "plain", inline = TRUE),
sliderInput("vennPcatcex", "Font size", min = 1, max = 2, step=0.1, value = 1.8, width = "100%"),
sliderInput("vennPmargin", "Margin", min = 0, max = 1, step=0.05, value = 0.2, width = "100%")
)
),
tabPanel(title="Venn Diagram (black & white)", plotOutput("SvennPDiagram",height = 800,width = 800)),
tabPanel(title="Intersection Output", htmlOutput("vennPHTML")),
tabPanel(title="Help", htmlOutput('help_vennp'))
)
)
)
)
)
),
##########################################################################################################
## Output
##########################################################################################################
tabPanel("Output",
sliderInput("pdf_width", "Plot File Page Width", min = 3, max = 30, step = 1, value = 12),
sliderInput("pdf_height", "Plot File Page Height", min = 3, max = 50, step = 1, value = 8),
actionButton("clear_saved_plots", "Clear all saved plots"),
tags$br(),
# htmlOutput("saved_plot_list"),
checkboxGroupInput("plots_checked", "Plots to Save", choices=NULL, selected=NULL),
downloadButton('downloadPDF', 'Download PDF'),
downloadButton('downloadSVG', 'Download SVG (for the first selected plot)'),
tags$br(),tags$hr(),
downloadButton('downloadXLSX', 'Download tables in .xlsx')
),
##########################################################################################################
## footer
##########################################################################################################
footer= HTML(footer_text)
)
)
) #for tagList
server <- function(input, output, session) {
source("inputdata.R",local = TRUE)
source("process_uploaded_files.R",local = TRUE)
source("qcplot.R",local=TRUE)
source("alignQC.R",local=TRUE)
source("volcano.R",local = TRUE)
source("heatmap.R",local = TRUE)
source("barboxplot.R",local = TRUE)
source("venn.R",local = TRUE)
source("genesetmodule.R",local = TRUE)
insertTab(session=session, inputId = "menu", target = "Expression Plot", position = "after",
tabPanel("Gene Set Enrichment", geneset_ui(id = "GS")) )
geneset_server(id = "GS")
source("pattern.R",local = TRUE)
source("vennprojects.R",local = TRUE)
source("network.R",local = TRUE)
source("help.R",local = TRUE)
source("output.R",local = TRUE)
source("scurve.R",local = TRUE)
}
shinyApp(ui, server)