forked from liuzan-info/PhosMap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
1882 lines (1845 loc) · 83.6 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
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
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(shinyjs)
library(shinyBS)
library(ggplot2)
library(ggrepel)
library(PhosMap)
library(plotly)
library(colourpicker)
library(ggseqlogo)
library(pheatmap)
library(survminer)
library(survival)
library(zip)
library(stringr)
library(dplyr)
library(DT)
library(png)
library(svglite)
library(ggplotify)
library(shinyWidgets)
library(bslib)
library(PhosMap)
library(qpdf)
library(uwot)
ui <- renderUI(
fluidPage(
shinyjs::useShinyjs(),
useSweetAlert(),
tags$head(
HTML("<title>PhosMap</title>"),
HTML('
<script type="text/javascript" src="popper.js"></script>
<script> window.start.init({Palette:"palette1"})</script>
'),
tags$style(type = "text/css", "
body {padding-top: 70px;}
#loadmessage {
position: fixed;
top: -20px;
left: 0px;
width: 100%;
height:100%;
padding: 300px 0px 5px 0px;
text-align: center;
font-weight: bold;
font-size: 40px;
color: #000000;
background-color: #D6D9E4;
opacity:0.7;
z-index: 1050;
}
",
HTML("
.navbar-nav {float: right; font-size: 16px}
.warning {border-left: 8px solid;}
.tooltitle {text-align:center;}
.toolsubtitle {text-align:center;}
.downloadbutton {}
.viewbutton {}
.runbutton {color: #fff; background-color: #5DA61E; border-color: #ffacae;}
.loadfiledescription {text-align:left;margin-top:15px;margin-left:10px;margin-right:300px;font-size:190%;}
.analysisbutton {color: #fff; background-color: #7650E6; border-color: #ffacae; width:200px; height:40px; }
.plotbutton{color: #fff; background-color:#da5151; border-color: #ffacae; width:150px; height:40px; }
.warningbutton {color: #fff; background-color: #F01616; border-color: #ffacae;}
.runbuttondiv {text-align: right;}
#limmastatic{height:70vh !important;}
#limmainter{height:70vh !important;}
#samstatic{height:70vh !important;}
#saminter{height:70vh !important;}
#anovastatic{height:70vh !important;}
#anovainter{height:70vh !important;}
#timecourse{height:70vh !important;}
#kaptimecourseplot{height:70vh !important;}
#kapstep2plot{height:70vh !important;}
#kseastep2plot{height:70vh !important;}
#kseastep2plotmid{height:110vh !important;}
#kseastep2plotmini{height:140vh !important;}
#kseastep2plotxs{height:200vh !important;}
#resultnav {float: left;}
#resultnavdroppro {float: left;}
#mascotdemodropproresultnav {float: left;}
#usermascotnoproresultnav {float: left;}
#usermascotresultnav {float: left;}
#usermascotdropproresultnav {float: left;}
#demomaxresultnav {float: left;}
#demomaxdropproresultnav {float: left;}
#usermaxnoproresultnav {float: left;}
#usermaxresultnav {float: left;}
#usermaxdropproresultnav {float: left;}
#kapresultnav {float: left;}
")
)
),
conditionalPanel(
condition = "$('html').hasClass('shiny-busy')",
div(h2(strong("PhosMap Calculating..."), img(src = "rmd_loader.gif"), id = "loadmessage"))
),
navbarPage(
div("",img(src = "logo.svg", height = "60px", width = "115px", style = "padding-bottom:10px; padding-right:10px; margin-top: -12px")),
inverse = T,
id = "navbarpage",
position = "fixed-top",
tabPanel(
"Home",
# icon = icon("house"),
column(
3,
panel(
"",
heading = "Update Log",
status = "warning",
h5("PhosMap 1.0.0 was released in April 2023.")
),
panel(
"",
heading = "Notice",
status = "info",
h5("We provide a demo server at https://bio-inf.shinyapps.io/phosmap/. \
This server is single-thread and of low-level hardware, we do recommend\
users to analyze the data using the demo server with small data sets. \
An upgraded hardware is necessary, according to the possible computational\
cost of the data, to reach the potential of PhosMap.")
),
panel(
"",
heading = "Introduction",
status = "success",
h5("PhosMap supports multiple function modules for full landscape of \
phosphoproteomics data analyses including quality control, phosphosite \
mapping, dimension reduction analysis, time course analysis, kinase \
activity analysis and survival analysis. Various of publication ready \
figures and tables could be generated via PhosMap. We provided a downloadable\
R package for local customized analysis of massive data in the R shiny environment\
deploying on the Docker upon the Windows, Linux, and Mac system."),
h5("PhosMap enables researchers and clinicians to process their own \
phosphoproteomics data expediently and efficiently, and whereby \
facilitate better data exploration and interpretation to obtain \
valuable biological insights.")
)
),
column(
9,
# h1(style = "text-align: center;", "PhosMap"),
h3(style = "text-align: center;", "PhosMap: a docker image-based tool to \
accomplish one-stop interactive analysis of quantitative phosphoproteomics"),
div(style = "text-align:center;", img(src = "newmain.jpg", height = "700px", width = "900px", style = "")),
),
column(
12,
br(),
hr(),
h5(style = "text-align: center;","This website is free and open to all users and there is no login requirement.")
)
),
tabPanel(
"Import Data",
# icon = icon("upload", class = "fa-solid fa-upload"),
sidebarLayout(
sidebarPanel(
width = 3,
h3("Import Data"),
div(
id = "pcadatatypediv",
radioGroupButtons(
inputId = "analysisdatatype",
label = NULL,
# choices = list("your data" = 1, "pipeline data" = 2, "example data" = 3),
choices = list("your data" = 1, "example data" = 2),
individual = TRUE,
selected = 1,
checkIcon = list(
yes = tags$i(class = "fa fa-circle",
style = "color: steelblue"),
no = tags$i(class = "fa fa-circle-o",
style = "color: steelblue")),
),
actionButton("pre2analysis", "Go to preprocessing", icon = icon("paper-plane")),
),
# bsTooltip(
# "pcadatatypediv", "1. pipeline data: data obtained through the above preprocessing process; 2. example data: data we provide; 3. your data: formated phosphoomics data",
# placement = "right",
# options = list(container = "body")
# ),
hr(style = "border-color: grey;"),
conditionalPanel(
condition = "input.analysisdatatype == 2",
h4("1. Experimental design file: "),
actionButton("viewanalysisexamdesign", "view", icon("eye")),
hr(style = "border-style: dashed;border-color: grey;"),
h4("2. Phosphorylation data frame: "),
actionButton("viewanalysisexamdf", "view", icon("eye")),
hr(style = "border-style: dashed;border-color: grey;"),
h4("3. Clinical data file[optional]: "),
actionButton("viewanalysisexamclin", "view", icon("eye"))
),
conditionalPanel(
# any
condition = "input.analysisdatatype == 1",
h4("1. Experimental design file: "),
fileInput(
inputId = "analysisupload11",
label = NULL,
accept = ".txt"
),
uiOutput("viewanalysisyourdesign"),
hr(style = "border-style: dashed;border-color: grey;"),
h4("2. Phosphorylation data frame: "),
fileInput(
inputId = "analysisupload12",
label = NULL,
accept = ".csv"
),
uiOutput("viewanalysisyourexpre"),
hr(style = "border-style: dashed;border-color: grey;"),
h4("3. Clinical data file[optional]: "),
fileInput(
inputId = "analysisupload14",
label = NULL,
accept = ".csv"
),
uiOutput("viewanalysisyourclin")
)
),
# 注意: mainpanel 需要根据数据处理情况改变,这里先不变
# 用于已经处理过的mainpanel
mainPanel(
width = 9,
hr(),
htmlOutput("htmlanalysis"),
# wellPanel("Data Overview", class = "warning"),
conditionalPanel(
condition = "input.analysisdatatype == 2",
uiOutput("viewedfileanalysisui"),
dataTableOutput("viewedfileanalysis")
),
conditionalPanel(
condition = "input.analysisdatatype == 1",
uiOutput("viewedfileanalysisuiuser"),
dataTableOutput("viewedfileanalysisuser")
)
)
)
),
tabPanel(
# "Dimension Reduction Analysis",
"DRA",
h2("Dimension Reduction Analysis", class = "tooltitle"),
h4("This module is used to reduce the dimension of phosphosites and visualize samples.", class = "toolsubtitle"),
fluidRow(
column(
4,
panel(
"",
heading = "Parameters Setting",
status = "info",
column(12, h4("PCA:")),
column(6, textInput("pcamain", "main", "PCA")),
column(6, prettyToggle(
inputId = "pcamean",
label_on = "group mean",
icon_on = icon("check"),
status_on = "info",
status_off = "warning",
label_off = "group mean",
icon_off = icon("xmark"),
value = TRUE
)),
column(12, h4("t-SNE:")),
column(6, textInput("tsnemain", "main", "t-SNE")),
column(6,numericInput("tsneseed", "random seed", 42)),
column(6, numericInput('tsneperplexity','perplexity',2,min = 1,step = 1)),
column(12, h4("UMAP:")),
column(6, textInput("umapmain", "main", "UMAP")),
column(6, numericInput('umapneighbors','neighbors',5,min = 1,step = 1)),
column(12, div(actionButton("drbt", "Analysis", icon("magnifying-glass-chart"), class='analysisbutton'), style = "display:flex; justify-content:center; align-item:center;"))
)
),
column(
8,
column(5, plotOutput("pca2")),
column(1, NULL),
column(5, plotOutput("pca1")),
column(1, downloadBttn(
outputId = "pcaplotdl",
label = "",
style = "material-flat",
color = "default",
size = "sm"
)),
column(5, plotOutput("tsne")),
column(1, downloadBttn(
outputId = "tsneplotdl",
label = "",
style = "material-flat",
color = "default",
size = "sm"
)),
column(5, plotOutput("umap")),
column(1, downloadBttn(
outputId = "umapplotdl",
label = "",
style = "material-flat",
color = "default",
size = "sm"
)),
)
)
),
tabPanel(
# "Differential phosphorylation Analysis",
"DPA",
h2("Differential Phosphorylation Analysis", class = "tooltitle"),
h4("This module is used to identify differential phosphorylation sites.", class = "toolsubtitle"),
radioGroupButtons(
inputId = "detools",
label = "",
choices = c("limma",
"SAM", "ANOVA"),
justified = TRUE,
checkIcon = list(
yes = icon("ok",
lib = "glyphicon"))
),
conditionalPanel(
condition = "input.detools == 'limma'",
column(
4,
panel(
"",
heading = "Limma Parameters Setting",
status = "info",
column(6,uiOutput('limmaselect1')),
column(6,uiOutput('limmaselect2')),
column(6, numericInput("limmapvalue", h5("pvalue threshold:"), 0.05, max = 0.05, min = 0.0000001, step = 0.0000001)),
column(
6,
selectInput("limmaadjust", h5("pvalue adjust method:"), choices = c("none", "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr"),selected = 'none')
),
column(6, numericInput("limmafc", h5("FC threshold:"), 2, min = 1, step = 0.5)),
column(6, textAreaInput("limmamain", h5("title:"), "Differential phosphosites with limma")),
column(6, textAreaInput("limmaxaxis", h5("x axis label:"), "log2FC")),
column(6, textAreaInput("limmayaxis", h5("y axis label:"), "-log10(pvalue)")),
column(4, colourInput("limmaupcolor", h5('"UP" colour'), "#FC5C00")),
column(4, colourInput("limmadowncolor", h5('"DOWN" colour'), "#31BDE0")),
column(4, colourInput("limmanotcolor", h5('"NOT" colour'), "#858080")),
conditionalPanel(
condition = "input.deadisplaymode == true",
column(6, numericInput("limmalabelfc", h5("FC threshold for labeling:"), 2, max = 10, min = 1, step = 0.5)),
column(6, numericInput("limmalabelpvalue", h5("pvalue threshold for labeling:"), 0.05, max = 0.05, min = 0.0000001, step = 0.0000001)),
column(12, textAreaInput("limmalabelspec", h5("specified points:"), "NUP35_S279\nPCNP_T139\nSEPTIN9_S30\n"))
),
column(12, div(actionButton("limmabt", "Analysis", icon("magnifying-glass-chart"), class='analysisbutton'), style = "display:flex; justify-content:center; align-item:center;"))
)
),
column(
5,
column(3,actionButton("viewlimmafile", "view result file", icon("eye"))),
column(3, NULL),
column(4, switchInput(
inputId = "deadisplaymode",
label = "mode",
labelWidth = "50px",
size = "mini",
onLabel = "static",
offLabel = "interactive",
value = TRUE,
)),
column(
1,
conditionalPanel(
condition = "input.deadisplaymode == true",
downloadBttn(
outputId = "limmaplotdl",
label = "",
style = "material-flat",
color = "default",
size = "sm"
)
)
),
column(1, NULL),
column(
12,
conditionalPanel(
condition = "input.deadisplaymode == true",
plotOutput("limmastatic", width = "100%"),
),
conditionalPanel(
condition = "input.deadisplaymode == false",
plotlyOutput("limmainter", width = "100%")
)
)
),
column(
3,
panel(
"",
heading = "Heatmap Parameters Setting",
status = "warning",
column(12, selectInput("limmaphscale", h5("scale:"), choices = c("none", "row", "column"), selected = "row")),
column(6, prettyToggle(
inputId = "limmaphcluster",
label_on = "cluster by row",
icon_on = icon("check"),
status_on = "info",
status_off = "warning",
label_off = "no cluster",
icon_off = icon("xmark"),
value = TRUE
)),
column(6, prettyToggle(
inputId = "limmaphrowname",
label_on = "display row name",
icon_on = icon("check"),
status_on = "info",
status_off = "warning",
label_off = "miss row name",
icon_off = icon("xmark"),
value = TRUE
)),
conditionalPanel(
condition = "input.limmaphcluster == 1",
column(6, selectInput("limmaphdistance", h5("clustering distance rows:"), choices = c("euclidean", "correlation"), selected = "euclidean")),
column(6, selectInput("limmaphclusmethod", h5("clustering method:"), choices = c("ward.D2", "ward.D", "single", "complete", "average", "mcquitty", "median", "centroid"), selected = "ward.D2")),
),
column(12, div(actionButton("limmaphbt", "Plot Heatmap", icon("palette"), class="plotbutton")), style = "display:flex; justify-content:center; align-item:center;")
)
)
),
conditionalPanel(
condition = "input.detools == 'SAM'",
column(
4,
panel(
"",
heading = "SAM Parameters Setting",
status = "info",
column(6,uiOutput('samselect1')),
column(6,uiOutput('samselect2')),
column(
6,
numericInput("samnperms",
label = h5("nperms:"),
value = 100,
min = 0,
max = 10000,
step = 10)
),
column(
6,
numericInput("samfdr",
label = h5("minimum FDR:"),
value = 0.05,
min = 0,
max = 0.05,
step = 0.0000001)
),
column(12,div(actionButton('sambt','Analysis', icon("magnifying-glass-chart"), class="analysisbutton")), style = "display:flex; justify-content:center; align-item:center;")
)
),
column(
5,
column(3,actionButton("viewsamfile", "view result file", icon("eye"))),
column(8, NULL),
column(
1,
downloadBttn(
outputId = "samplotdl",
label = "",
style = "material-flat",
color = "default",
size = "sm"
)
),
column(
12,
plotOutput("samstatic", width = "100%")
)
),
column(
3,
panel(
"",
heading = "Heatmap Parameters Setting",
status = "warning",
column(12, selectInput("samphscale", h5("scale:"), choices = c("none", "row", "column"), selected = "row")),
column(6, prettyToggle(
inputId = "samphcluster",
label_on = "cluster by row",
icon_on = icon("check"),
status_on = "info",
status_off = "warning",
label_off = "no cluster",
icon_off = icon("xmark"),
value = TRUE
)),
column(6, prettyToggle(
inputId = "samphrowname",
label_on = "display row name",
icon_on = icon("check"),
status_on = "info",
status_off = "warning",
label_off = "miss row name",
icon_off = icon("xmark"),
value = TRUE
)),
conditionalPanel(
condition = "input.samphcluster == 1",
column(6, selectInput("samphdistance", h5("clustering distance rows:"), choices = c("euclidean", "correlation"), selected = "euclidean")),
column(6, selectInput("samphclusmethod", h5("clustering method:"), choices = c("ward.D2", "ward.D", "single", "complete", "average", "mcquitty", "median", "centroid"), selected = "ward.D2")),
),
column(12,div(actionButton('samphbt','Plot Heatmap', icon("palette"), class="plotbutton")), style = "display:flex; justify-content:center; align-item:center;")
)
)
),
conditionalPanel(
condition = "input.detools == 'ANOVA'",
column(
4,
panel(
"",
heading = "ANOVA Parameters Setting",
status = "info",
column(6, numericInput("anovafc", h5("FC threshold:"), 2, min = 1, step = 0.5)),
column(
6,
selectInput("anovaadjust", h5("p-values adjust method:"), choices = c("none", "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr"), selected = "BH")
),
column(12, numericInput("anovapvalue", h5("pvalue threshold:"), 0.1, max = 0.05, min = 0.0000001, step = 0.0000001)),
column(12, div(actionButton("anovabt", "Analysis", icon("magnifying-glass-chart"), class="analysisbutton")), style = "display:flex; justify-content:center; align-item:center;"),
)
),
column(
5,
dataTableOutput("anovaresult")
),
column(
3,
panel(
"",
heading = "Heatmap Parameters Setting",
status = "warning",
column(12, selectInput("anovaphscale", h5("scale:"), choices = c("none", "row", "column"), selected = "row")),
column(6, prettyToggle(
inputId = "anovaphcluster",
label_on = "cluster by row",
icon_on = icon("check"),
status_on = "info",
status_off = "warning",
label_off = "no cluster",
icon_off = icon("xmark"),
value = TRUE
)),
column(6, prettyToggle(
inputId = "anovaphrowname",
label_on = "display row name",
icon_on = icon("check"),
status_on = "info",
status_off = "warning",
label_off = "miss row name",
icon_off = icon("xmark"),
value = TRUE
)),
conditionalPanel(
condition = "input.anovaphcluster == 1",
column(6, selectInput("anovaphdistance", h5("clustering distance rows:"), choices = c("euclidean", "correlation"), selected = "euclidean")),
column(6, selectInput("anovaphclusmethod", h5("clustering method:"), choices = c("ward.D2", "ward.D", "single", "complete", "average", "mcquitty", "median", "centroid"), selected = "ward.D2")),
),
column(12,div(actionButton('anovaphbt','Plot Heatmap', icon("palette"), class="plotbutton")), style = "display:flex; justify-content:center; align-item:center;")
)
)
)
),
tabPanel(
# "Time Course Analysis(fuzzy clustering)",
"TCA",
h2("Time Course Analysis(fuzzy clustering)", class = "tooltitle"),
h4("Fuzzy clustering is applied to time course analysis for discovering patterns associated with time points in PhosMap.", class = "toolsubtitle"),
fluidRow(
column(
4,
panel(
"",
heading = "Parameters Setting",
status = "info",
column(6, numericInput("tcpvalue", h5("pvalue threshold:"), 0.1, max = 0.05, min = 0.0000001, step = 0.0000001)),
column(6, selectInput("tcadjust", h5("pvalue adjust method:"), choices = c("none", "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr"), selected = "BH")),
column(6, numericInput("tcfc", h5("FC threshold:"), 2, min = 1, step = 0.5)),
column(6, numericInput("tcminmem", h5("minimun membership value:"), 0.1, max = 1, min = 0.0000001, step = 0.0000001)),
column(6, numericInput("tciteration", h5("iteration:"), 100, max = 1000, min = 10, step = 10)),
column(6, numericInput("tckcluster", h5("number of clusters:"), 9, max = 20, min = 2, step = 1)),
column(12, div(actionButton("tcanalysis", "Analysis", icon("magnifying-glass-chart"), class="analysisbutton")), style = "display:flex; justify-content:center; align-item:center;"),
)
),
column(
8,
column(
3,
actionButton("viewtcfile", "view result file", icon("eye"))
),
column(8, NULL),
column(
1,
downloadBttn(
outputId = "tcplotdl",
label = "",
style = "material-flat",
color = "default",
size = "sm"
)
),
column(12, plotOutput("timecourse"))
)
)
),
tabPanel(
# "Kinase-Substrate Enrichment Analysis",
"KSEA",
h2("Kinase-Substrate Enrichment Analysis", class = "tooltitle"),
h4("This module is used to predict kinase activity.", class = "toolsubtitle"),
fluidRow(
column(
4,
radioGroupButtons(
inputId = "kseamode",
label = "",
choices = c("Multiple groups",
"Two groups"),
justified = TRUE,
checkIcon = list(
yes = icon("ok",
lib = "glyphicon"))
),
conditionalPanel(
condition = "input.kseamode == 'Multiple groups'",
panel(
"",
heading = "Parameters Setting [Step 1]",
status = "info",
column(6, numericInput("kappvalue", h5("pvalue threshold:"), 0.1, max = 0.05, min = 0.0000001, step = 0.0000001)),
column(6, selectInput("kapadjust", h5("pvalue adjust method:"), choices = c("none", "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr"), selected = "BH")),
column(6, numericInput("kapfc", h5("FC threshold:"), 2, min = 1, step = 0.5)),
column(6, numericInput("kapminmem", h5("minimun membership value:"), 0.1, max = 1, min = 0.0000001, step = 0.0000001)),
column(6, numericInput("kapiteration", h5("iteration:"), 100, max = 1000, min = 10, step = 10)),
column(6, numericInput("kapkcluster", h5("number of clusters:"), 9, max = 20, min = 2, step = 1)),
column(12, div(actionButton("kapanalysisbt1", "Analysis", icon("magnifying-glass-chart"), class="analysisbutton")), style = "display:flex; justify-content:center; align-item:center;"),
),
panel(
"",
heading = "Parameters Setting [Step 2]",
status = "warning",
column(6, uiOutput("kapstep2cluster")),
column(6, selectInput("kapspecies", h5("species:"), choices = c("human", "mouse", "rattus"))),
column(6, selectInput("kapscale", h5("scale:"), choices = c("none", "row", "column"), selected = "none")),
column(6, selectInput("kapdistance", h5("clustering distance rows:"), choices = c("euclidean", "correlation"), selected = "euclidean")),
column(6, selectInput("kapclusmethod", h5("clustering method:"), choices = c("ward.D2", "ward.D", "single", "complete", "average", "mcquitty", "median", "centroid"), selected = "ward.D2")),
column(6, uiOutput("kapmainui")),
column(12, div(actionButton("kapanalysisbt2", "Analysis", icon("magnifying-glass-chart"), class="analysisbutton")), style = "display:flex; justify-content:center; align-item:center;"),
)
),
conditionalPanel(
condition = "input.kseamode == 'Two groups'",
panel(
"",
heading = "Parameters Setting [Step 1]",
status = "info",
column(6,uiOutput('kseaselect1')),
column(6,uiOutput('kseaselect2')),
column(6, numericInput("kseafc", h5("FC threshold:"), 4, min = 1, step = 0.5)),
column(12, div(actionButton("kseaanalysisbt1", "Analysis", icon("magnifying-glass-chart"), class="analysisbutton")), style = "display:flex; justify-content:center; align-item:center;"),
),
panel(
"",
heading = "Parameters Setting [Step 2]",
status = "warning",
column(12, selectInput("kseaspecies", h5("species:"), choices = c("human", "mouse", "rattus"))),
column(6, selectInput("kseascale", h5("scale:"), choices = c("none", "row", "column"), selected = "none")),
column(6, selectInput("kseadistance", h5("clustering distance rows:"), choices = c("euclidean", "correlation"), selected = "euclidean")),
column(6, selectInput("kseaclusmethod", h5("clustering method:"), choices = c("ward.D2", "ward.D", "single", "complete", "average", "mcquitty", "median", "centroid"), selected = "ward.D2")),
column(6, textAreaInput("kseamain", h5("title:"), value = "Kinase-Substrate Enrichment Analysis")),
column(12, div(actionButton("kseaanalysisbt2", "Analysis", icon("magnifying-glass-chart"), class="analysisbutton")), style = "display:flex; justify-content:center; align-item:center;"),
)
)
),
column(
8,
navbarPage(
title = "Result",
id = "kapresultnav",
tabPanel(
"Step 1",
value = "kapstep1val",
conditionalPanel(
condition = "input.kseamode == 'Multiple groups'",
column(
3,
actionButton("viewkaptimecoursefile", "view result file", icon("eye"))
),
column(8, NULL),
column(
1,
downloadBttn(
outputId = "kaptcplotdl",
label = "",
style = "material-flat",
color = "default",
size = "sm"
)
),
column(12, plotOutput("kaptimecourseplot"))
),
conditionalPanel(
condition = "input.kseamode == 'Two groups'",
dataTableOutput("kseastep1df")
)
),
tabPanel(
"Step 2",
value = "kapstep2val",
conditionalPanel(
condition = "input.kseamode == 'Multiple groups'",
column(11, NULL),
column(
1,
downloadBttn(
outputId = "kapplotdl",
label = "",
style = "material-flat",
color = "default",
size = "sm"
)
),
column(12, plotOutput("kapstep2plot")),
column(12, dataTableOutput("kapstep2df"))
),
conditionalPanel(
condition = "input.kseamode == 'Two groups'",
uiOutput("kseastep2plotui"),
dataTableOutput("kseastep2df")
)
)
)
)
)
),
tabPanel(
# "Motif Enrichment Analysis",
"MEA",
h2("Motif Enrichment Analysis", class = "tooltitle"),
column(3, NULL),
column(6, h4("This module is used to find and visualize enriched motifs.", class = "toolsubtitle")),
column(3, actionLink("infoLink", "Motif-Kinase Relation", class = "btn-info")),
fluidRow(
column(
4,
panel(
"",
heading = "Parameters Setting",
status = "info",
column(6, selectInput("motifspecies", h5("species:"), choices = c("human", "mouse", "rattus"))),
column(6, selectInput("motiffastatype", h5("fasta type:"), choices = c("refseq", "uniprot"))),
column(6, numericInput("motifpvalue", h5("pvalue threshold:"), 0.01, max = 0.05, min = 0.0000001, step = 0.0000001)),
column(12, div(
dropdownButton(
h5("使用motifx算法"),
actionButton("motifanalysisbt", "Analysis", icon("magnifying-glass-chart"), class="analysisbutton"),
h5("有很多motif分析的算法,如streme,根据您的需求和数据特点,\
您可以选择其他算法。为了满足这一需求,我们提供当前的匹配到的以motif为中心的suqence"),
downloadButton("motifseqdownload", label = "download sequence file"),
circle = F, status = "danger",
icon = icon("magnifying-glass-chart"), width = "400px",
label = "Analysis",
# tooltip = tooltipOptions(title = "Click to see inputs !")
tooltip = F
)
), style = "display:flex; justify-content:center; align-item:center;")
),
panel(
"",
heading = "Motif Selection",
status = "warning",
uiOutput("motifenrichrank"),
column(6,div(actionButton('motifplotbt','Plot', icon("palette"), class="plotbutton")), style = "display:flex; justify-content:center; align-item:center;"),
column(6,div(actionButton('motifviewbt','View matched sites')), style = "display:flex; justify-content:center; align-item:center;")
),
panel(
"",
heading = "Heatmap Parameters Setting",
status = "danger",
h5("Assign quantitative values of peptides to their motif", style = "color: grey;"),
column(12, numericInput("minseqs", h5("matched seqs threshold"), 50, min = 1, step = 1)),
column(6, selectInput("motifscale", h5("scale:"), choices = c("none", "row", "column"), selected = "none")),
column(6, selectInput("motifdistance", h5("distance metric:"), choices = c("euclidean", "correlation"), selected = "euclidean")),
column(6, selectInput("motifclusmethod", h5("clustering method:"), choices = c("ward.D2", "ward.D", "single", "complete", "average", "mcquitty", "median", "centroid"), selected = "ward.D2")),
column(12, textAreaInput("motifmain", h5("title:"), "Heatmap of Motif Quantification")),
column(12,div(actionButton('motifplotbt2','Plot', icon("palette"), class="plotbutton")), style = "display:flex; justify-content:center; align-item:center;")
)
),
column(
8,
hr(),
column(
11,
hidden(div(
id = "motifenrichhidden1",
h4("Motif enrichment analysis result:"),
dataTableOutput("motifdfresult")
))
),
column(
1,
downloadBttn(
outputId = "motifenrichdl",
label = "",
style = "material-flat",
color = "default",
size = "sm"
)
)
)
)
),
tabPanel(
# "Survival Analysis",
"SA",
h2("Survival Analysis", class = "tooltitle"),
h4("This module is used to identify phosphorylation sites or kinases associated with clinical outcomes of patients.", class = "toolsubtitle"),
fluidRow(
column(
4,
panel(
"",
heading = "Parameters Setting",
status = "info",
column(6, selectInput("survivalpajust", h5("pvalue adjust method:"), choices = c("none", "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr"), selected = "BH")),
column(6, numericInput("survivalpthreshold", h5("pvalue threshold:"), 0.01, max = 1, min = 0.0000001, step = 0.0000001)),
column(12, div(actionButton("survivalanalysis", "Analysis", icon("magnifying-glass-chart"), class="analysisbutton")), style = "display:flex; justify-content:center; align-item:center;"),
),
panel(
"",
heading = "Feature Selection",
status = "warning",
column(12, uiOutput("survivalui")),
column(6, colourInput("survivalhighcol", h5('"high" colour'), "#3300CC")),
column(6, colourInput("survivallowcol", h5('"low" colour'), "#CC3300")),
column(12,div(actionButton('survivalplotbt1','Plot', icon("palette"), class="plotbutton")), style = "display:flex; justify-content:center; align-item:center;")
)
),
column(
8,
column(
12, dataTableOutput("survivaltable")
),
column(
5, plotOutput("survivalplot1")
),
column(1, downloadBttn(
outputId = "surv1dl",
label = "",
style = "material-flat",
color = "default",
size = "sm"
)),
column(
5, plotOutput("survivalplot2"),
),
column(1, downloadBttn(
outputId = "surv2dl",
label = "",
style = "material-flat",
color = "default",
size = "sm"
))
)
)
),
tabPanel(
"Preprocessing",
sidebarLayout(
sidebarPanel(
width = 3,
h3("Import Data",),
wellPanel(
materialSwitch(
inputId = "loaddatatype",
label = "Load example data",
value = FALSE,
status = "success",
right = TRUE
),
radioGroupButtons(
inputId = "softwaretype",
label = NULL,
choices = list("MaxQuant" = 1, "Firmiana" = 2),
# direction = "vertical",
individual = TRUE,
selected = 1,
checkIcon = list(
yes = tags$i(class = "fa fa-circle",
style = "color: steelblue"),
no = tags$i(class = "fa fa-circle-o",
style = "color: steelblue")),
)
),
conditionalPanel(
condition = "input.loaddatatype == true",
h4("1. Experimental design file: "),
actionButton("viewbt1", "view", icon("eye"), class = "viewbutton"),
hr(style = "border-style: dashed;border-color: grey;")
),
conditionalPanel(
condition = "input.loaddatatype == true & input.softwaretype == 2",
h4("2. Mascot xml file: "),
selectInput("mascotdemoxmlid", NULL, choices = c("Exp027015_F1_R1", "Exp027016_F1_R1", "Exp027017_F1_R1", "Exp027031_F1_R1", "Exp027032_F1_R1", "Exp027033_F1_R1", "Exp027046_F1_R1", "Exp027047_F1_R1", "Exp027048_F1_R1")),
hr(style = "border-style: dashed;border-color: grey;"),
# hr(),
h4("3. Phosphoproteomics peptide file: "),
selectInput("mascotdemopeptidefileid", NULL, choices = c("Exp027015_peptide", "Exp027016_peptide", "Exp027017_peptide", "Exp027031_peptide", "Exp027032_peptide", "Exp027033_peptide", "Exp027046_peptide", "Exp027047_peptide", "Exp027048_peptide")),
hr(style = "border-style: dashed;border-color: grey;"),
h4("4. Proteomics data[optional]"),
br(style = "line-height:1px;"),
h4("4.1 Proteomics experimental design file: "),
actionButton("viewbt5", "view", icon("eye"), class = "viewbutton"),
h4("4.2 Profiling file: "),
selectInput("mascotdemoproid", NULL, choices = c("Exp026982_gene", "Exp026983_gene", "Exp026995_gene", "Exp026996_gene", "Exp027008_gene", "Exp027009_gene"))
),
#Maxquant
conditionalPanel(
condition = "input.loaddatatype == true & input.softwaretype == 1",
h4("2. Phospho (STY)Sites.txt: "),
actionButton("viewdemomaxphosbt", "view", icon("eye"), class = "viewbutton"),
hr(style = "border-style: dashed;border-color: grey;"),
# hr(),
h4("3. Proteomics data[optional]"),
br(),
h4("3.1 Proteomics experimental design file: "),
actionButton("viewdemomaxprodesignbt", "view", icon("eye"), class = "viewbutton"),
h4("3.2 proteinGroups.txt: "),
actionButton("viewdemomaxprobt", "view", icon("eye"), class = "viewbutton"),
),
## user data
# shared phosphoproteomics design file
conditionalPanel(
condition = "input.loaddatatype == false",
h4("1. Experimental design file: "),
fileInput("updesign", NULL, accept = ".txt"),
hidden(
div(
id = "hiddenview1",
actionButton("viewbt4", "view", icon("eye"))
)
),
hr(style = "border-style: dashed;border-color: grey;")
),
# mascot
conditionalPanel(
condition = "input.loaddatatype == false & input.softwaretype == 2",
h4("2. Mascot xml file: "),
fileInput("upmascot", NULL, accept = "application/zip"),
uiOutput("masui"),
hr(style = "border-style: dashed;border-color: grey;"),
h4("3. Phosphoproteomics peptide file: "),
fileInput("uppeptide", NULL, accept = "application/zip"),
uiOutput("pepui"),
hr(style = "border-style: dashed;border-color: grey;"),
h4("4. Proteomics data[optional]"),