-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.R
3629 lines (3322 loc) · 176 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
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
# MilkyWay
# version: 0.3.9b
# Author: Hee Jong Kim, William Barshop
#library(org.Hs.eg.db)
library(httr)
library(shiny)
library(shinyTree)
library(DT)
library(shinydashboard)
library(RColorBrewer)
library(plotly)
library(ggrepel)
library(ggfortify)
library(GalaxyConnector)
library(ComplexHeatmap)
library(circlize)
library(reshape2)
library(plyr)
library(NbClust)
library(splitstackshape)
library(Hmisc)
library(DiagrammeR)
library(scales)
library(rhdf5)
library(shinylorikeet)
library(sequenceViewer)
library(featureViewer)
library(RCurl)
library(rhandsontable)
library(rPython)
library(openxlsx)
library(rsvg)
library(magrittr)
library(DiagrammeRsvg)
library(data.table)
library(UpSetR)
library(cowplot)
source("./func/gx_get2.R") # Galaxy dataset download function - wget version
source("./func/volcano_preprocess.R") # MSStats files preprocessing for volcano plot
source("./func/selected_volcano_preprocess.R")# Selected Protein's volcano plot data processing
source("./func/complex_heatmap.R") # Processing and Ploting complext heatmap
source("./func/arrange_vars.R") # arrange df vars by position
source("./func/exp_diagram.R") # Experiment Diagram Drawing Preprocessor
source("./func/feature_parser.R") # Protein sequence coverage - "Feature Viewer" Parser
source("./func/excel_report_generator.R") # Excel report generator for LFQ
source("./func/excel_report_generator_qual.R") # Excel report generator for Qual
source("./func/custom_shinytree_get_selected.R") # Custom output of get_selected function from ShinyTree
########### Shiny UI
Logged = FALSE;
ui <- dashboardPage(dashboardHeader(title = "MilkyWay"),
dashboardSidebar(width = 250,
uiOutput("sidebarpanel")),
dashboardBody(tags$head(tags$script(src = "enrichr.js")),
uiOutput("mainbodypanel")))
########### /Shiny UI
########### Shiny SERVER
server <- function(input, output, session) {
##### LOGIN coupled UI randering part
USER <- reactiveValues(Logged = Logged, api_key = "")
observe({
if (USER$Logged == FALSE) {
if (!is.null(input$Login)) {
if (input$Login > 0) {
Username <- isolate(input$userName)
Password <- isolate(input$passwd)
if (length(Username) > 0 & length(Password) > 0) {
galaxy_con <- GET("http://192.168.2.102/api/authenticate/baseauth", authenticate(Username, Password))
if (status_code(galaxy_con) == 200) {
USER$Logged <- TRUE
USER$api_key <- content(galaxy_con)$api_key
}
else{
cat(content(galaxy_con))
}
}
}
}
}
})
# Sidebar rendering only if logged in
output$sidebarpanel <- renderUI({
if(USER$Logged == TRUE){
div(
sidebarMenu( id='side1', # placeholder id <- doing nothing
menuItem("Dataset Browser",
tabName = "galaxy_history_browser",
icon = icon("th")),
conditionalPanel(
condition = "output.analysis_selector == 'lfq'",
sidebarMenu(id='lfq_side', # actual conditionalpanel purpose id
menuItem("LFQ Analysis Viewer",
tabName = "lfq_analysis_viewer",
icon = icon("bullseye")))
),
conditionalPanel(
condition = "output.analysis_selector == 'qual'",
sidebarMenu(id="qual_side",
menuItem("Qualitative Analysis Viewer",
tabName = "qual_analysis_viewer",
icon = icon("university")))
),
menuItem("Galaxy Job Submitter",
tabName = "galaxy_job_submitter",
icon = icon("dashboard"))
),
# Qual Sidebar
conditionalPanel(
condition = "input.qual_side == 'qual_analysis_viewer'",
conditionalPanel(
condition = "input.qual_analyzer_tabset == 'Experiment Overview'",
column(12,
align="center",
helpText("Experiment Overview Parameters")),
numericInput("overview_qvalue_cutoff_qual", "Percolator q Value Cutoff:",
min = 0,
max = 1,
value = 0.01,
step= 0.01,
width = '800px')
),conditionalPanel(
condition = "input.qual_analyzer_tabset == 'Protein'",
column(12,
align="center",
helpText("Peptide Level Parameters")),
numericInput("peptide_qvalue_cutoff_qual", "Percolator q Value Cutoff:",
min = 0,
max = 1,
value = 0.01,
step= 0.01,
width = '800px')
),
conditionalPanel(
condition = "input.qual_analyzer_tabset == 'PSM-ID'",
column(12,
align="center",
helpText("PSM-ID Parameters")),
numericInput("psm_id_qvalue_cutoff_qual", "Percolator q Value Cutoff:",
min = 0,
max = 1,
value = 0.01,
step= 0.01,
width = '800px'),
column(12,
align="center",
actionButton("ms2_loading_qual", "Load MS2 Data")),
column(12,
align="center",
helpText("In order to use Lorikeet viewer, you need to download MS2 dataset first")),
column(12,
align="center",
tags$style("#download_psm_table_qual { color: #444; }"),
downloadButton("download_psm_table_qual", "Download PSM table")),
column(12,
align="center",
helpText("Download PSM table based on selected columns and percolator q-value cutoff"))
)
),
# LFQ Sidebar
conditionalPanel(
condition = "input.lfq_side == 'lfq_analysis_viewer'",
conditionalPanel(
condition = "input.analyzer_tabset == 'Experiment Overview'",
column(12,
align="center",
helpText("Experiment Overview Parameters")),
numericInput("overview_qvalue_cutoff_lfq", "Percolator q Value Cutoff:",
min = 0,
max = 1,
value = 0.01,
step= 0.01,
width = '800px')
),
conditionalPanel(
condition = "input.analyzer_tabset == 'Analysis Metrics'",
column(12,
align="center",
helpText("Analysis Metrics Parameters")),
numericInput("unnorm_peptide_dist_violin_plot_mprophet_qvalue", "mProphet q Value Cutoff:",
min = 0,
max = 1,
value = 0.01,
step= 0.01,
width = '800px'),
column(12,
align="center",
helpText("For Peptide Level Violin Plot"))
),
conditionalPanel(
condition = "input.analyzer_tabset == 'Protein'",
column(12,
align="center",
helpText("Peptide Level Parameters")),
numericInput("peptide_qvalue_cutoff", "Percolator q Value Cutoff:",
min = 0,
max = 1,
value = 0.01,
step= 0.01,
width = '800px')
),
conditionalPanel(
condition = "input.analyzer_tabset == 'Volcano Plot'",
column(12,
align="center",
helpText("Volcano Plot Parameters")),
uiOutput("exp_label"),
column(12,
align="center",
helpText("Volcano Plot and Table")),
numericInput("volcano_plot_pvalue_cutoff",
"p Value Cutoff",
min = 0,
max = 1,
value = 0.01,
step= 0.01,
width = '800px'),
numericInput("log2FC_cutoff",
"log2FC Cutoff",
min = 0,
max = 50,
value = 1,
step= 1),
column(12,
align="center",
helpText("Condition Plot Parameters")),
selectInput("error_bar_value",
"Condition Plot Value",
choices = c("Confidence Interval"="CI","Standard Deviation"="SD")),
column(12,
align="center",
helpText("Enrichr Parameters")),
selectInput("enrichr_grouping",
label = "Fold Change for Enrichr",
choices = c("Both", "Positive", "Negative")),
column(12,
align="center",
actionButton("enrichr_action", "Enrichr", width='80%')),
column(12,
align="center",
helpText("pvalue, fold change, its directionality, and selected condition will be applied"))
),
conditionalPanel(
condition = "input.analyzer_tabset == 'Heatmap'",
column(12,
align="center",
helpText("Heatmap Parameters")),
numericInput("heatmap_pvalue_cutoff", "p Value Cutoff:",
min = 0,
max = 1,
value = 0.01,
step= 0.01,
width = '800px'),
selectInput("unidirectional",
label = "Directionality",
choices = c(TRUE, FALSE)),
selectInput("quantCentering",
label = "Center Intensity Values",
choices = c("CONTROL", "ALL", "NONE")),
numericInput("manual_k",
"Number of clusters (k-means)",
min = -1,
max = 50,
value = 3),
column(12,
align="center",
helpText("-1 will automatically calculate optimal number of clusters via NbClust"))
),
conditionalPanel(
condition = "input.analyzer_tabset == 'PSM-ID'",
column(12,
align="center",
helpText("PSM-ID Parameters")),
numericInput("psm_id_qvalue_cutoff", "Percolator q Value Cutoff:",
min = 0,
max = 1,
value = 0.01,
step= 0.01,
width = '800px'),
column(12,
align="center",
actionButton("ms2_loading", "Load MS2 Data")),
column(12,
align="center",
helpText("In order to use Lorikeet viewer, you need to download MS2 dataset first")),
column(12,
align="center",
tags$style("#download_psm_table { color: #444; }"),
downloadButton("download_psm_table", "Download PSM table")),
column(12,
align="center",
helpText("Download PSM table based on selected columns and percolator q-value cutoff"))
),
conditionalPanel(
condition = "input.analyzer_tabset == 'Peptide-Quant'",
column(12,
align="center",
helpText("Peptide-Quant Parameters")),
numericInput("psm_quant_qvalue_cutoff", "Percolator q Value Cutoff:",
min = 0,
max = 1,
value = 0.01,
step= 0.01,
width = '800px'),
numericInput("mprophet_qvalue_cutoff", "mProphet q Value Cutoff for Boundaries and bar plots:",
min = 0,
max = 1,
value = 0.01,
step= 0.01,
width = '800px'),
selectInput("grid_row_num",
label = "Choose the number of grid rows",
choices = c(1,2,3,4,5,6,7,8,9,10),
selected = 3),
selectInput("chrom_intensity_transform",
label = "Choose the type of intensity transformation",
choices = c("Raw", "Log2"),
selected = "Raw")
)
)
)
}
})
# Main page renderring only if logged in. Otherwise, login panel
output$mainbodypanel <- renderUI({
if(USER$Logged == TRUE){
tabItems(
####################################################################### Galaxy Upload tool server side code
tabItem(tabName = "galaxy_job_submitter",
tabBox(
title="Galaxy Job Design and Upload tool",
width=12,
id="galaxy_upload_tabbox",
tabPanel(#LFQ Comparison TabPanel
title="LFQ Intensity Comparison Analysis (DIA or DDA)",
width=12,
id="lfq_tab_panel",
fluidRow(
box(
#title="Galaxy Job Design and Upload tool",
width=12,
id="galaxy_job_submitter_box_lfq",
conditionalPanel(
condition="!output.fastafileReceived",
h2("1. Choose an Experiment Name and provide required annotations:"),
textInput("historyName","Experiment Name:"),
wellPanel(h4("Enter full PI names below:"),
splitLayout( inputPanel(textInput("pifirstName","PI First Name (Full):")),#,
#helpText("e.g. \"James\"")),
inputPanel(textInput("pilastName","PI Last Name (Full):"))#,
#helpText("e.g. \"Wohlschlegel\""))
)
),
textInput("sampleContactName","Collaboration Contact Name:"),
helpText("e.g. \"Hee Jong Kim\" or \"Buck Strickland\" - This is usually the person who generated the biological material.")
),
conditionalPanel(
condition = "input.historyName.length > 0 && input.pilastName.length > 0 && input.pifirstName.length > 0 && input.sampleContactName.length > 0 && !output.fastafileReceived",
#h3("2. Upload files:"),
h2("2. Upload protein FASTA database:"),
helpText("Target sequences only!"),
fileInput('fastafile','Select FASTA file',accept=c(".fasta",".FASTA"))
),
conditionalPanel(
condition = "output.fastafileReceived && !output.skylinefileReceived && !input.QAcheck",
h2("3. Upload empty Skyline file:"),
helpText("File should be set up for the desired analysis, modifications, and acquisition parameters."),
fileInput('skylinefile','Select Skyline file', accept=c(".sky")),
checkboxInput('QAcheck','Identification Analysis Only (No Intensity Analysis)',value=FALSE)
),
conditionalPanel(
condition = "(input.QAcheck || output.skylinefileReceived) && !output.diawindowfileReceived && !input.DDAcheck",
h2("4. If DIA, upload DIAUmpire window definitions, otherwise check DDA box:"),
helpText("Window definitions must be saved without quotes or commas, etc, in a tsv or csv file with two columns (start and end m/z values)"),
fileInput('diawindowfile','Select DIA Window file', accept=c(".csv",".tsv",".txt")),
checkboxInput('DDAcheck','DDA File Upload: SKIP',value=FALSE)
),
conditionalPanel(
condition = "!output.datafilesReceived && (input.DDAcheck || output.diawindowfileReceived)",
h2("5. Upload mass spec data:"),
helpText("mzML files should be zlib compressed and centroided"),
fileInput('files', 'Choose raw/mzML files', accept=c('.raw','.mzML','.mzml'),multiple=TRUE)
),
conditionalPanel(condition="output.datafilesReceived",
wellPanel(
h2("6. Edit the table below, and click the save button below to send\nthe experimental design to Galaxy"),
#h3("Save"),
actionButton("save", "Save table")
)
),
conditionalPanel(
condition=FALSE,
verbatimTextOutput('uploadedFASTA'),
verbatimTextOutput('uploadedSkyline'),
verbatimTextOutput('uploadedDIAwindowfile'),
verbatimTextOutput('uploaded')
)
)#end of the box
),
fluidRow(
title="rhandson_box_lfq",
id="handson_box_lfq",
width="12",
#height="600px",
box(
title="Experimental Design Table",
id="interior_handson_box_lfq",
width=12,
rHandsontableOutput("hot")
)
)
),#end of LFQ tabPanel
tabPanel(#DIA+DDA
title="LFQ Intensity Comparative Analysis (DDA-ID+DIA-Quant)",
width=12,
id="dia_dda_tab_panel",
fluidRow(
box(
#title="Galaxy Job Design and Upload tool",
width=12,
id="galaxy_job_submitter_box_dia_dda",
conditionalPanel(
condition="!output.fastafileReceivedDIADDA",
h2("1. Choose an Experiment Name and provide required annotations:"),
textInput("historyNameDIADDA","Experiment Name:",value=""),
wellPanel(h4("Enter full PI names below:"),
splitLayout( inputPanel(textInput("pifirstNameDIADDA","PI First Name (Full):")),#,
#helpText("e.g. \"James\"")),
inputPanel(textInput("pilastNameDIADDA","PI Last Name (Full):"))#,
#helpText("e.g. \"Wohlschlegel\""))
)
),
textInput("sampleContactNameDIADDA","Collaboration Contact Name:",value=""),
helpText("e.g. \"Hee Jong Kim\" or \"Buck Strickland\" - This is usually the person who generated the biological material.")
),
conditionalPanel(
condition = "input.historyNameDIADDA.length > 0 && input.pilastNameDIADDA.length > 0 && input.pifirstNameDIADDA.length > 0 && input.sampleContactNameDIADDA.length > 0 && !output.fastafileReceivedDIADDA",
#h3("2. Upload files:"),
h2("2. Upload protein FASTA database:"),
helpText("Target sequences only!"),
fileInput('fastafileDIADDA','Select FASTA file',accept=c(".fasta",".FASTA"))
),
conditionalPanel(
condition = "output.fastafileReceivedDIADDA && !output.skylinefileReceivedDIADDA",
h2("3. Upload empty Skyline file:"),
helpText("File should be set up for the desired analysis, modifications, and acquisition parameters."),
fileInput('skylinefileDIADDA','Select Skyline file', accept=c(".sky"))
),
conditionalPanel(
condition = "!output.datafilesReceivedDIADDA",
h2("4. Upload DDA (searchable) mass spec data:"),
helpText("mzML files should be zlib compressed and centroided"),
fileInput('filesDIADDA', 'Choose raw/mzML files', accept=c('.raw','.mzML','.mzml'),multiple=TRUE)
),
conditionalPanel(condition="output.datafilesReceivedDIADDA",
wellPanel(
h2("5. Edit the DDA file table below, and click the save button below to send\nthe experimental design to Galaxy"),
actionButton("saveDIADDA", "Save DDA table")
)
),
conditionalPanel(
condition = "output.datafilesReceivedDIADDA",
h2("6. Upload DIA (quantitative) mass spec data:"),
helpText("mzML files should be zlib compressed and centroided"),
fileInput('filesDIADDA_DIA', 'Choose raw/mzML files', accept=c('.raw','.mzML','.mzml'),multiple=TRUE)
),
conditionalPanel(condition="output.datafilesReceivedDIADDA",
wellPanel(
h2("7. Edit the DIA file table below, and click the save button below to send\nthe experimental design to Galaxy"),
actionButton("saveDIADDA_DIA", "Save DIA table")
)
),
conditionalPanel(
condition=FALSE,
verbatimTextOutput('uploadedFASTADIADDA'),
verbatimTextOutput('uploadedSkylineDIADDA'),
verbatimTextOutput('uploadedDIAwindowfileDIADDA'),
verbatimTextOutput('uploadedDIADDA'),
verbatimTextOutput('uploadedDIADDA_DIA')
)
)#end of the box
),
fluidRow(
title="DDA Files",
id="handson_box_dia_dda",
width="12",
#height="600px",
box(
title="DDA Experimental Design Table",
id="interior_handson_box_dia_dda",
width=12,
rHandsontableOutput("hotDIADDA")
)
),#endofHandsonFluidRow
fluidRow(
title="DIA Files",
id="handson_box_dia_dda_DIA",
width="12",
#height="600px",
box(
title="DIA Experimental Design Table",
id="interior_handson_box_dia_dda_DIA",
width=12,
rHandsontableOutput("hotDIADDA_DIA")
)
)#endofHandsonFluidRow
),#end of DIA+DDA Analysis TabPanel
tabPanel(#TMT Analysis tabPanel
title="TMT Analysis",
width=12,
id="tmt_tab_panel",
fluidRow(
box(
#title="Galaxy Job Design and Upload tool",
width=12,
id="galaxy_job_submitter_box_tmt"
), #below this goes another rhansdsontable
fluidRow(
title="rhandson_box",
id="handson_box_tmt",
width="12",
#height="600px",
box(
title="Experimental Design Table",
id="interior_handson_box_tmt",
width=12,
rHandsontableOutput("hot_tmt")
)
)#endofHandsonFluidRow
)
)#end of TMT Analysis
)#end of tab Box
),
####################################################################### /Galaxy Upload tool server side code v.0.1.5
tabItem(tabName = "galaxy_history_browser",
fluidRow(
box(title = "Collaborator",
width = 4,
status = "info",
dataTableOutput("pi_table")),
box(title = "Experiments",
width = 8,
status = "info",
dataTableOutput("history_table"))
),
fluidRow(
box(title = "History Progress",
width = 8,
status = "info",
dataTableOutput("selected_history_total_dataset")),
box(title = "Loadable Data Set",
width = 4,
status = "info",
dataTableOutput("selected_history_rdataset"))
),
fluidRow(
column(width = 8,
""),
column(width = 4,
actionButton("loading", "Load the Analysis",
icon("paper-plane"),
style="color: #fff; background-color: #337ab7; border-color: #2e6da4; padding:4px; font-size:150%",
width='100%'))
),
"Galaxy History Browser"),
# qual_analysis_viewer content
tabItem(tabName = "qual_analysis_viewer",
fluidRow(
# hide error msg from the front end
tags$style(type="text/css",
".shiny-output-error { visibility: hidden; }",
".shiny-output-error:before { visibility: hidden; }"),
tabBox(
title = "Qualitative Analysis Viewer",
width = 12,
id = "qual_analyzer_tabset",
tabPanel("Experiment Overview",
box(title = "Experimental Design Diagram",
width = 6,
status = "info",
grVizOutput('exp_diagram_qual',
width = "100%",
height = "600px")),
box(title = "Delta Mass per Run",
width = 6,
status = "warning",
plotOutput('ppm_hist_qual',
width = "100%",
height = "300px")),
box(title = "PSM Count per Run",
width = 6,
status = "warning",
plotOutput('psm_count_plot_qual',
width = "100%",
height = "300px")),
box(title = "Experimental Design Table",
width = 12,
status = "info",
dataTableOutput('experimental_design_table_qual')),
tags$hr(),
"Experimental Data Overview"
),
tabPanel("Workflow Parameters",
box(title = "Workflow Tool Tree",
width = 6,
status = "info",
shinyTree("ParameterTree_qual")),
box(title = "Selected Entry's Parameters",
width = 6,
status = "info",
htmlOutput("SelectedParameterText_qual", container = tags$p)),
tags$hr(),
"Workflow Parameters"
),
tabPanel("Analysis Metrics",
box(title = "FIDO ROC Curve",
width = 4,
status = "warning",
plotOutput("fido_roc_curve_qual")),
box(title = "PSM ROC Curve per Run",
width = 4,
status = "warning",
plotOutput("psm_roc_curve_qual",
height = "600px")),
box(title = "Protein ROC Curve per Run",
width = 4,
status = "warning",
plotOutput("protein_roc_curve_qual",
height = "600px")),
box(title = "PCA Plots and Tables",
width = 12,
status = "info",
tabBox(
title = "PCA",
id = "pca_tabset1",
width = 12,
tabPanel("SpC based", plotlyOutput("spc_pca_plot_qual"), dataTableOutput("spc_pca_table_qual")),
tabPanel("NSAF based", plotlyOutput("nsaf_pca_plot_qual"), dataTableOutput("nsaf_pca_table_qual")))),
"Analysis Metrics for Quality Control"
),
tabPanel("Protein",
box(title = "Protein Table with SAINTexpress",
solidHeader = TRUE,
width = 12,
status = "info",
dataTableOutput("protein_saint_table_qual")),
box(title = "Protein Quantitation Table",
width = 12,
status = "info",
tabBox(
title = "Protein Quantitation Measurements",
id = "protein_quant_tabset1",
width = 12,
tabPanel("SpC", dataTableOutput("spc_table_qual")),
tabPanel("NSAF", dataTableOutput("nsaf_table_qual")))),
box(title = "Selected Protein Sequence",
width = 5,
status = "info",
sequenceViewerOutput("protein_seq_qual")),
box(title = "Selected Protein Sequence Coverage and Feature Map",
solidHeader = TRUE,
width = 7,
status = "info",
featureViewerOutput("protein_feature_qual"),
style = 'display:block;width:100%;overflow-y: scroll;'),
box(title = "Unique Peptide Table Column Selection",
width=12,
status = "warning",
checkboxInput("unique_peptide_column_show_qual", "Show Column Selections"),
conditionalPanel(condition = "input.unique_peptide_column_show_qual == true",
uiOutput("unique_peptide_columns_ui_qual"))),
box(title = "Unique Peptide Table from the Selected Protein",
width = 12,
sataus = "info",
dataTableOutput("unique_peptide_table_qual")),
box(title = "Peptide SpC Quantitation Table",
width = 12,
status = "info",
dataTableOutput("pep_spc_table_qual")),
"Protein Level Data Inspection"
),
tabPanel("PSM-ID",
box(title = "PSM Table Column Selection",
width=12,
status = "warning",
checkboxInput("psm_id_column_show_qual", "Show Column Selections"),
conditionalPanel(condition = "input.psm_id_column_show_qual == true",
uiOutput("psm_id_columns_ui_qual"))),
box(title = "PSM Table",
solidHeader = TRUE,
width=12,
status = "primary",
dataTableOutput("psm_id_table_qual")),
box(title = "Selected Peptide-Spectrum-Match Table",
solidHeader = TRUE,
width=4,
status = "primary",
dataTableOutput("selected_psm_id_table_qual")),
box(title = "Identified MS2 Spectra Annotation",
solidHeader = TRUE,
width=8,
status = "primary",
shinylorikeetOutput("ms2lorikeet_qual",
height = "700px")),
"PSM Identification"
),
tabPanel("Excel Report",
box(title = "Report File Name",
status = "primary",
width = 6,
textInput("excelFilename_qual",
NULL,
value="Report"),
column(12,
align="center",
helpText(".xlsx extension will be added automatically"))
),
box(title = "UpSet Plots for peptide and protein",
status = "primary",
width = 6,
numericInput("excelPeptideQvalue_qual",
"Peptide q Value Cutoff:",
min = 0,
max = 1,
value = 0.01,
step= 0.01),
numericInput("excelProteinQvalue_qual",
"Protein q Value Cutoff:",
min = 0,
max = 10,
value = 0.01,
step= 0.01)
),
actionButton("generating_excel_report_qual", "Build the Excel Report"),
conditionalPanel(condition = "output.reportbuilt_qual",
br(),
downloadButton("excel_report_download_qual", "Download"))
)
)
)),
# lfq_analysis_viewer content
tabItem(tabName = "lfq_analysis_viewer",
fluidRow(
# hide error msg from the front end
tags$style(type="text/css",
".shiny-output-error { visibility: hidden; }",
".shiny-output-error:before { visibility: hidden; }"),
tabBox(
title = "LFQ Analysis Viewer",
width = 12,
# The id lets us use input$tabset1 on the server to find the current tab
id = "analyzer_tabset",
tabPanel("Experiment Overview",
# box(title = "Parameters",
# width = 12,
# status = "info",
# valueBoxOutput("exp_overview_tab_percolator_qvalue_lfq")),
box(title = "Experimental Design Diagram",
width = 6,
status = "info",
grVizOutput('exp_diagram_lfq',
width = "100%",
height = "600px")),
box(title = "Delta Mass per Run",
width = 6,
status = "warning",
plotOutput('ppm_hist_lfq',
width = "100%",
height = "300px")),
box(title = "PSM Count per Run",
width = 6,
status = "warning",
plotOutput('psm_count_plot_lfq',
width = "100%",
height = "300px")),
box(title = "Experimental Design Table",
width = 12,
status = "info",
dataTableOutput('experimental_design_table_lfq')),
tags$hr(),
"Experimental Data Overview"
),
tabPanel("Workflow Parameters",
box(title = "Workflow Tool Tree",
width = 6,
status = "info",
shinyTree("ParameterTree_lfq")),
box(title = "Selected Entry's Parameters",
width = 6,
status = "info",
htmlOutput("SelectedParameterText_lfq", container = tags$p)),
tags$hr(),
"Workflow Parameters"
),
tabPanel("Analysis Metrics",
box(title = "mProphet Target vs Decoy Histogram",
width = 6,
status = "warning",
plotOutput('mprophet_histogram',
width = "100%")),
box(title = "FIDO ROC Curve",
width = 6,
status = "warning",
plotOutput("fido_roc_curve_lfq")),
box(title = "PSM ROC Curve per Run",
width = 6,
status = "warning",
plotOutput("psm_roc_curve_lfq",
height = "600px")),
box(title = "Protein ROC Curve per Run",
width = 6,
status = "warning",
plotOutput("protein_roc_curve_lfq",
height = "600px")),
box(title = "Intensity Violin Plot per Run",
width = 12,
status = "warning",
tabBox(
title = "Violin Plots",
id = "violin_tabset1",
width = 12,
tabPanel("Protein Level Distributions", plotOutput("protein_intensity_violin_plot_lfq",height = "600px")),
tabPanel("Unnormalized Peptide Level Distributions", plotOutput("unnorm_peptide_dist_violin_plot_lfq"),height="600px")
)),
box(title = "PCA Plots and Tables",
width = 12,
status = "info",
tabBox(
title = "PCA",
id = "pca_tabset1",
width = 12,
tabPanel("SpC based", plotlyOutput("spc_pca_plot_lfq"), dataTableOutput("spc_pca_table_lfq")),
tabPanel("NSAF based", plotlyOutput("nsaf_pca_plot_lfq"), dataTableOutput("nsaf_pca_table_lfq")),
tabPanel("MSStats Quant based", plotlyOutput("msstats_quant_pca_plot_lfq"), dataTableOutput("msstats_quant_pca_table_lfq")))),
"Analysis Metrics for Quality Control"
),
tabPanel("Protein",
#plotlyOutput("plotly_test"),
#plotlyOutput("quant_type_ratio_plot"),
plotlyOutput("quantratio_barplot", height = "130px"),
box(title = "Protein Table with SAINTexpress",
solidHeader = TRUE,
width = 12,
status = "info",
dataTableOutput("protein_saint_table")),
box(title = "Protein Quantitation Table",
width = 12,
status = "info",
tabBox(
title = "Protein Quantitation Measurements",
id = "protein_quant_tabset1",
width = 12,
tabPanel("SpC", dataTableOutput("spc_table")),
tabPanel("NSAF", dataTableOutput("nsaf_table")))),
box(title = "Selected Protein Sequence",
width = 5,
status = "info",
sequenceViewerOutput("protein_seq")),
box(title = "Selected Protein Sequence Coverage and Feature Map",
solidHeader = TRUE,
width = 7,
status = "info",
featureViewerOutput("protein_feature"),
style = 'display:block;width:100%;overflow-y: scroll;'),
box(title = "Unique Peptide Table Column Selection",
width=12,
status = "warning",
checkboxInput("unique_peptide_column_show", "Show Column Selections"),
conditionalPanel(condition = "input.unique_peptide_column_show == true",
uiOutput("unique_peptide_columns_ui"))),
box(title = "Unique Peptide Table from the Selected Protein",
width = 12,
sataus = "info",
dataTableOutput("unique_peptide_table")),
box(title = "Peptide SpC Quantitation Table",
width = 12,
status = "info",
dataTableOutput("pep_spc_table")),
"Protein Level Data Inspection"
),
tabPanel("Volcano Plot",
box(title = "Volcano Plot",
solidHeader = TRUE,
width = 6,
status = "primary",
plotlyOutput('volcano_plot')),
box(title = "Condition Plot from Volcano Plot's Dot Selection",
width = 6,
status = "warning",
plotOutput("condition_plot_from_volcano")),
box(title = "Protein Table",
solidHeader = TRUE,
width = 12,
status = "primary",
dataTableOutput('comparison_table')),
box(title = "Selected Protein's Volcano Plot",
width = 6,
status = "primary",
plotOutput("selected_protein_volcano_plot")),
box(title = "Selected Protein's Condition Plot",
width = 6,
status = "warning",
plotOutput("condition_plot_from_table")),
box(title = "Outlier Inspector",
solidHeader = TRUE,
width = 12,
status = "danger",
dataTableOutput('comparison_outlier_table')),
box(title = "Outlier Quant Barplot",
width = 12,
plotOutput("selected_outlier_protein_quant_barplot")),
"Volcano Plot Coupled with filterable DataTable"
),
tabPanel("Heatmap",
box(title = "Heatmap for Probability and Intensity",
width = 12,
status = "primary",
plotOutput('complexHeatmapPlot',
height='800px')),
"Complex Heatmap: Enriched Probability and Intensity"
),
tabPanel("PSM-ID",
box(title = "PSM Table Column Selection",
width=12,
status = "warning",
checkboxInput("psm_id_column_show", "Show Column Selections"),
conditionalPanel(condition = "input.psm_id_column_show == true",
uiOutput("psm_id_columns_ui"))),
box(title = "PSM Table",
solidHeader = TRUE,
width=12,
status = "primary",
dataTableOutput("psm_id_table")),
box(title = "Selected Peptide-Spectrum-Match Table",
solidHeader = TRUE,
width=4,
status = "primary",
dataTableOutput("selected_psm_id_table")),
box(title = "Identified MS2 Spectra Annotation",
solidHeader = TRUE,
width=8,
status = "primary",
shinylorikeetOutput("ms2lorikeet",
height = "700px")),
"PSM Identification"
),
tabPanel("Peptide-Quant",
box(title = "Peptide Table Column Selection",
width = 12,
status = "warning",
checkboxInput("psm_quant_column_show", "Show Column Selections"),
conditionalPanel(condition = "input.psm_quant_column_show == true",
uiOutput("psm_quant_columns_ui"))),
box(title = "Peptide Table",
solidHeader = TRUE,
width=12,
status = "primary",
dataTableOutput("psm_quant_table")),
box(title = "Selected Peptide Quantitation Bar Plot",
width = 12,
status = "warning",
plotOutput("selected_peptide_quant_barplot")),
box(title = "Selected Chromatogram Plot",
solidHeader = TRUE,
width = 12,
status = "primary",
plotlyOutput('selected_chromatogram_plot',
height='800px')),
"Peptide Quantification"
),
tabPanel("Excel Report",