-
Notifications
You must be signed in to change notification settings - Fork 2
/
ui.R
1046 lines (1037 loc) · 43.2 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
# some other code for webpage functions
jscodega <- '
$(document).on("shiny:sessioninitialized",function(){
$("#Find").on("click", function() {
ga("send", "event", "button", "Find", $("#geneID").val());
});
});
'
jscode <- '
$(function() {
var $els = $("[data-proxy-click]");
$.each(
$els,
function(idx, el) {
var $el = $(el);
var $proxy = $("#" + $el.data("proxyClick"));
$el.keydown(function (e) {
if (e.keyCode == 13) {
$proxy.click();
}
});
}
);
});
'
jscode2 <- '
$(document).on("shiny:sessioninitialized",function(){
$(document).on("click","path.BioCircosARC",function(){
var circ = document.querySelectorAll("#BioCircosARCTooltip");
var gene = circ[circ.length-1].innerHTML.split(/<br>/).pop();
Shiny.setInputValue("geneID2", gene);
});
});
'
jscode3 <- '
$(document).on("shiny:sessioninitialized",function(){
$(document).on("click","path.BioCircosHISTOGRAM",function(){
var circ = document.querySelectorAll("#BioCircosHISTOGRAMTooltip");
var gene = circ[circ.length-1].innerHTML.split(/<br>/);
Shiny.setInputValue("geneID3", gene[gene.length-2]);
});
});
'
jsResetCode <- "shinyjs.reset = function() {history.go(0)}"
# Define UI for application that draws the boxplot
ui <- fluidPage(
title = "squirrelBox",
theme = shinytheme(set_shinytheme),
tags$style("
.nav-tabs{
font-weight:bold;
font-size:13px;
}
# .btn-default, .btn-options{
# display:inline-block;
# padding:0.3em 1.2em;
# margin:0 0.1em 0.1em 0;
# border:0.16em solid rgba(255,255,255,0);
# border-radius:2em;
# box-sizing: border-box;
# text-decoration:none;
# font-family:'Roboto',sans-serif;
# font-weight:300;
# color:#FFFFFF;
# text-shadow: 0 0.04em 0.04em rgba(0,0,0,0.35);
# text-align:center;
# transition: all 0.2s;
# background-color:#4e9af1;
# }
# .btn-default:hover{
# border-color: rgba(255,255,255,1);
# }
.checkbox {
line-height: 20px;
margin-top: -15px;
margin-bottom: -15px;
}
.header {
position:fixed;
z-index:100;
width: calc(100% - 70px);
}
.BioCircosARCTooltip {
z-index:10
}
.BioCircosHISTOGRAMTooltip {
z-index:10
}
"),
tags$head(tags$style(
HTML(
"
#SIDE {
background-color: #F8F8F8;
}",
".btn-options {
background-color: #F8F8F8;
}",
".btn {
text-transform: unset !important;
}",
".shiny-notification {
position:fixed;
top: 10px;
right: 10px);
}"
)
)),
tags$head(includeHTML(("www/google-analytics.html"))),
useShinyjs(),
introjsUI(),
use_bs_tooltip(),
tags$style("
.introjs-helperLayer {
background: transparent;
}
.introjs-overlay {
opacity: 0 !important;
z-index: 99999999!important;
}
.introjs-helperLayer:before {
opacity: 0;
content: '';
position: absolute;
width: inherit;
height: inherit;
border-radius: 0.5em;
border: .2em solid rgba(255, 217, 68, 0.8);
box-shadow: 0 0 0 1000em rgba(0,0,0, .7);
opacity: 1;
}
.introjs-helperLayer:after {
content: '';
left: 0;
right: 0;
top: 0;
bottom: 0;
position: absolute;
z-index: 1000;
}
"),
tags$style(".mock {position:fixed;width:7%;margin-top: 60px;z-index:10;}"),
tags$style("
.download_this{
margin-right: 1px;
}"),
tags$script(src = "shinyBS_mod.js"),
tags$head(tags$script(HTML(jscode))),
tags$head(tags$script(HTML(jscodega))),
tags$head(tags$script(HTML(jscode2))),
tags$head(tags$script(HTML(jscode3))),
tags$head(tags$script(HTML(jsResetCode))),
tags$head(tags$style(
type = "text/css",
".shiny-output-error { visibility: hidden; }",
".shiny-output-error:before { visibility: hidden; }",
".shiny-output-warning { visibility: hidden; }",
".shiny-output-warning:before { visibility: hidden; }"
)),
tags$head(tags$style(
type = "text/css",
"#ucscPlot img {max-width: 100%; width: 100%; height: auto}"
)),
titlePanel(div(
class = "header",
a(
img(src = "logo.png", alt = "RNA Bioscience Initiative", style = "width:29px;"),
href = "https://rockyrna.org/",
target="_blank"
) %>%
bs_embed_tooltip("The RNA Bioscience Initiative at the University of Colorado Anschutz Medical Campus", placement = "bottom"),
a(
img(src = "chipmunk_1f43f.png", alt = "Ictidomys tridecemlineatus", style = "width:29px;"),
href = "https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=43179&lvl=3&lin=f&keep=1&srchmode=1&unlock",
target="_blank"
) %>%
bs_embed_tooltip("Ictidomys tridecemlineatus", placement = "bottom"),
span(a(
strong(apptitle_short),
href = url,
target="_blank"
) %>%
bs_embed_tooltip("see GitHub page for help and code", placement = "bottom"),
div(
code(apptitle),
style = "font-size:15px;margin-top:2px;display:inline"
)),
style = "font-size:30px;background-color:rgba(255,255,255,0.5);background-clip:inherit;text-align:center;margin:0px;padding:1px 1px;"
)),
fixedPanel(
style = "z-index:100;",
right = 10,
top = 22,
tags$head(
tags$style(HTML("#tutorial{background-color:gold;z-index:100;}"))
),
introBox(
actionButton("tutorial", "", icon = icon("question"),
style = "padding:4px 10px;margin:0px;") %>%
bs_embed_tooltip("Take a tour through the app!", placement = "bottom"),
data.step = 1,
data.intro = "Welcome to the squirrelBox.<br><br>
Please hover over buttons, tabs, and table columns for tips/explanations.",
data.position = "left"
)
),
fixedPanel(
style = "z-index:100;",
actionButton("back_to_top", label = " to Top ", icon = icon("angle-double-up"),
style = "padding:3px 9px;float:left;border-radius:0px;margin:0px;") %>%
bs_embed_tooltip("scroll back to the top of the page"),
bsButton("showpanel", "Sidebar", type = "toggle", value = FALSE, icon = icon("bars")) %>%
bs_embed_tooltip("turn sidebar on/off"),
tags$head(
tags$style(HTML("#showpanel{padding:3px 9px;float:left;border-radius:0px;margin:0px;}"))
),
actionButton("reset", " Reset ", icon = icon("redo"),
style = "padding:3px 9px;float:left;border-radius:0px;margin:0px;") %>%
bs_embed_tooltip("reset all settings"),
right = 10,
bottom = 10
),
sidebarLayout(
sidebarPanel(
tags$head(tags$script('
var dimension = [0, 0];
$(document).on("shiny:connected", function(e) {
dimension[0] = window.innerWidth;
dimension[1] = window.innerHeight;
Shiny.onInputChange("dimension", dimension);
});
$(window).resize(function(e) {
dimension[0] = window.innerWidth;
dimension[1] = window.innerHeight;
Shiny.onInputChange("dimension", dimension);
});
')),
id = "SIDE",
style = "position:fixed;width:23%;margin-top:60px;z-index:50;border:solid 2.3px;
border-top-color: #4e9af1;
border-left-color: #4e9af1;
border-right-color: #9BE7FF;
border-bottom-color: #9BE7FF;",
width = 3,
div(
id = "sideall",
introBox(
div(
div(
style = "display:inline-block;vertical-align:top;width:160px;",
tagAppendAttributes(selectizeInput("geneID",
label = NULL,
selected = "",
choices = ""
),
`data-proxy-click` = "Find"
)
),
div(
style = "display: inline-block;vertical-align:top; width: 10px;",
actionButton("Find", "Find", icon = icon("search")) %>%
bs_embed_tooltip("gene id/symbols accepted", placement = "right")
)
),
data.step = 2,
data.intro = "Query individual gene by id or symbol.",
data.position = "bottom"
),
div(
id = "sidediv",
tabsetPanel(
id = "side1",
tabPanel(
span(icon("link", class = NULL, lib = "font-awesome"), "Gene",
title = "additional external links for a specific query gene"
),
div(br(.noWS = "outside"),
style = "font-size:5px;"),
introBox(
fluidRow(
column(
width = 4,
strong(uiOutput("tab")),
strong(uiOutput("blastlink")),
strong(uiOutput("tab5"))
),
column(
width = 1
),
column(
width = 4,
strong(uiOutput("tab2")),
strong(uiOutput("tab3")),
strong(uiOutput("tab4"))
)
),
data.step = 6,
data.intro = "Other external links for the query gene, all open in new windows/tabs.",
data.position = "right"
),
div(br(.noWS = "outside"),
style = "font-size:5px;"),
introBox(
fluidRow(
column(
width = 4,
downloadButton(outputId = "saveTable", label = "Table", class = "download_this") %>%
bs_embed_tooltip("save output/filtered table as .csv", placement = "bottom")
),
column(
width = 1
),
column(
width = 4,
downloadButton("savePlot", label = "Plot", class = "download_this") %>%
bs_embed_tooltip("save current plot as .pdf", placement = "bottom")
)
),
data.step = 18,
data.intro = "For each section, results as table and/or plot can be saved to disk.",
data.position = "right"
),
hr()
),
tabPanel(
span(icon("cogs", class = NULL, lib = "font-awesome"), "Options", title = "additional global options"),
br(.noWS = "outside"),
div(id = "doEigendiv", checkboxInput("doEigen", "plot model clusters", value = T, width = NULL)),
checkboxInput("doUcsc", "pull track", value = T, width = NULL),
checkboxInput("doMod", "find module", value = T, width = NULL),
checkboxInput("doKegg", "GO terms", value = T, width = NULL),
checkboxInput("doTooltips", "show hover tips", value = T, width = NULL),
div(id = "doBrdiv", checkboxInput("doBr", "plot brain data", value = T, width = NULL)),
div(id = "doTisdiv", checkboxInput("doTis", "plot non-brain data", value = F, width = NULL)),
div(
id = "doLockdiv",
checkboxInput("doLock", "lock panel order", value = FALSE, width = NULL) %>%
bs_embed_tooltip("if unlocked, tabs, sections, and table columns can be dragged and reordered",
placement = "right"
)
),
tags$table(
tags$head(
tags$style(HTML("#pval{margin-top: 0px; margin-bottom: -10px; font-size:12px;}"))
),
tags$head(
tags$style(HTML("#ncol{margin-top: 0px; margin-bottom: -10px; font-size:12px;}"))
),
tags$head(
tags$style(HTML("#plotw{margin-top: 0px; margin-bottom: -10px; font-size:12px;}"))
),
tags$head(
tags$style(HTML("#ploth{margin-top: 0px; margin-bottom: -10px; font-size:12px;}"))
),
tags$tr(
width = "100%",
tags$td(width = "50%", div(style = "font-size:12px;", "p-value cutoff")),
tags$td(width = "50%", textInput("pval", NULL, value = sig_cut) %>%
bs_embed_tooltip("p-value cut off used for all plotting/analyses", placement = "right"))
),
tags$tr(
width = "100%",
tags$td(width = "50%", div(style = "font-size:12px;", "# of columns")),
tags$td(width = "50%", textInput("ncol", NULL, value = 3, width = "100px") %>%
bs_embed_tooltip("how many regions to plot side by side in each row, for box and line plots", placement = "right"))
),
tags$tr(
width = "100%",
tags$td(width = "50%", tags$div(style = "font-size:12px;", "plot height")),
tags$td(width = "50%", textInput("ploth", NULL, value = plot_height, width = "100px") %>%
bs_embed_tooltip("plot height for app (px) and saved pdf (in), halved for box and line plots", placement = "right"))
),
tags$tr(
width = "100%",
tags$td(width = "50%", tags$div(style = "font-size:12px;", "plot width")),
tags$td(width = "50%", textInput("plotw", NULL, value = plot_width, width = "100px") %>%
bs_embed_tooltip("plot width for app (px) and saved pdf (in)", placement = "right"))
),
),
fluidRow(
column(
width = 4,
downloadButton(outputId = "saveTable2", label = "Table", class = "download_this") %>%
bs_embed_tooltip("save output/filtered table as .csv", placement = "bottom")
),
column(
width = 1
),
column(
width = 4,
downloadButton("savePlot2", label = "Plot", class = "download_this") %>%
bs_embed_tooltip("save current plot as .pdf", placement = "bottom")
)
),
hr()
),
tabPanel(
span(icon("sort", class = NULL, lib = "font-awesome"), "Order", title = "Select and order box/line/heatplot by dragging"),
div(
orderInput('bsshow', 'Drag Blocks Here to Show', items = region_main,
placeholder = 'Drag items here...',
connect = 'bshide', item_class = "success"),
orderInput('bshide', 'Drag Blocks Here to Hide', items = region_main2,
placeholder = 'Drag items here...',
connect = 'bsshow', item_class = "info")
) %>%
bs_embed_tooltip("drag and order the blocks to change plots; in purple are placeholders for other tissues to come", placement = "bottom"),
tags$head(
tags$style(HTML(".btn-info{font-size:11px;margin:3px;padding:6px 6px;}"))
),
tags$head(
tags$style(HTML(".btn-success{font-size:11px;margin:3px;padding:6px 6px;}"))
),
br(.noWS = "outside"),
actionButton("bsselectconfirm", "Update", icon = icon("refresh")) %>%
bs_embed_tooltip("update with selection and order", placement = "bottom"),
actionButton("bsselectdefault", "Default", icon = icon("times")) %>%
bs_embed_tooltip("restore default selection and order", placement = "bottom"),
actionButton("bsselectflip", "Flip", icon = icon("sort")) %>%
bs_embed_tooltip("flip shown and hidden", placement = "bottom"),
hr()
)
),
tabsetPanel(
id = "side2",
tabPanel(
introBox(
span(icon("file-alt", class = NULL, lib = "font-awesome"), "Genelist",
title = "load list of genes for analysis from file or interactive table"
),
data.step = 9,
data.intro = "Genelist can be loaded from external file, or passed from the tables/cart.<br><br>
The other multi-gene analysis tabs, Lineplot/ Heatmap/ GO/ Kmer, all use genes from this list.",
data.position = "top"
),
value = "load",
div(id = "tabload",
div(id = "filediv", fileInput("file", label = NULL) %>%
bs_embed_tooltip("expects gene symbols (case-insensitive) as first column of tsv, or comma separated line")),
div(
uiOutput("listn"),
style = "display: inline-block;vertical-align:middle;"
),
div(
style = "display: inline-block;float:right;vertical-align:middle;",
disabled(actionButton("Prev1", "Prev", icon = icon("angle-up")) %>%
bs_embed_tooltip("query previous gene on loaded list", placement = "bottom")),
disabled(actionButton("Next1", "Next", icon = icon("angle-down")) %>%
bs_embed_tooltip("query next gene on loaded list", placement = "bottom"))
),
DT::dataTableOutput("tbllist"),
style = "height:309px;overflow-y:scroll;")
),
tabPanel(
value = "cart",
introBox(
span(icon("shopping-cart", class = NULL, lib = "font-awesome"), "Cart",
title = "cart list of genes to save and export"
),
data.step = 10,
data.intro = "A cart list stores query genes that were added (see '+' button), which can be exported to .txt file, or moved to the loaded Genelist.<br><br>
Interactive clicking on the GO_enrich and Venn plots also put the corresponding genes into this cart.",
data.position = "top"
),
div(id = "tabcart",
uiOutput("listn2"),
fluidRow(
column(
width = 2,
downloadButton(
outputId = "saveList",
label = ""
) %>% bs_embed_tooltip("save genes in cart as .txt", placement = "bottom")
),
column(
width = 2,
actionButton("Add", NULL, icon = icon("plus-square")) %>%
bs_embed_tooltip("add current query gene to cart", placement = "bottom")
),
column(
width = 2,
actionButton("Empty", NULL, icon = icon("broom")) %>%
bs_embed_tooltip("remove all genes from cart", placement = "bottom")
),
column(
width = 3,
actionButton("Load", "to Genelist", icon("file-alt", class = NULL, lib = "font-awesome")) %>%
bs_embed_tooltip("send genes in this Cart to loaded Genelist in side panel", placement = "bottom")
)
),
DT::dataTableOutput("tbllist2"),
style = "height:309px;overflow-y:scroll;")
),
tabPanel(
introBox(
span(icon("history", class = NULL, lib = "font-awesome"), "History", title = "history list of query genes"),
data.step = 11,
data.intro = "A list of genes previously queried is also documented for review.",
data.position = "right"
),
div(id = "tabhistory",
DT::dataTableOutput("historyl"),
style = "height:309px;overflow-y:scroll;")
)
)
)
)
),
mainPanel(
id = "MAIN",
width = 9,
style = "z-index:1;margin-top: 60px;",
tabsetPanel(
id = "tabMain",
tabPanel(
introBox(
span(icon("pencil-ruler", class = NULL, lib = "font-awesome"),
"Gene_query",
title = "Plot expression box plot and other info of query gene"
),
data.step = 3,
data.intro = "For a query gene, this tab displays the log2 count expression boxplot (note that visualization may differ from DEseq2 fold changes reported after accounting for covariates), and other annotations/analyses.",
data.position = "top"
),
value = "Gene_query",
div(
id = "sorted",
DT::dataTableOutput("results"),
tags$style(HTML("#results{margin-top:2px;margin-bottom:5px;}")),
div(
div(
style = "display:inline-block;vertical-align:top;",
introBox(
dropdownButton(
circle = FALSE, status = "options", icon = icon("gear"), width = "200px", size = "sm",
tooltip = tooltipOptions(title = "boxplot options"), margin = "20px",
br(),
div(id = "doPlotlydiv", checkboxInput("doPlotly", "interactive plots", value = F, width = NULL) %>%
bs_embed_tooltip("display interactive plot with additional info on hover", placement = "right")),
div(id = "doPadjdiv", checkboxInput("doPadj", "indicate sig", value = T, width = NULL) %>%
bs_embed_tooltip("label groups by nonsignificance", placement = "right")),
div(id = "doNamediv", checkboxInput("doName", "additional labels", value = F, width = NULL) %>%
bs_embed_tooltip("label points by sample", placement = "right")),
div(id = "doRemove71div", checkboxInput("doRemove71", "remove GROseq LT 71", value = F, width = NULL) %>%
bs_embed_tooltip("remove suspected outlier", placement = "right"))
),
data.step = 4,
data.intro = "Additional plotting options, for interactivity and labels, can be accessed here.
<br><br>Look for this button on other plotting tabs as well.",
data.position = "left"
)
),
div(
style = "vertical-align:top;",
uiOutput("boxPlotUI") %>% withLoader(proxy.height = proxy_height)
)
),
tags$style(HTML(".panel-group {margin-bottom:5px;margin-top:2px;}")),
introBox(
bsCollapse(
id = "tabs", multiple = TRUE, open = NULL, # open = "cluster_assignments",
bsCollapsePanel(
uiOutput("EigenPlot") %>% withLoader(),
title = "Cluster_assignments",
style = "primary"
) %>% bs_embed_tooltip("cluster assignment and model expression for each", placement = "top")
),
data.step = 5,
data.intro = "Additional info panels for the query gene is by default folded, click to reveal.",
data.position = "top"
),
bsCollapse(
id = "tabs2", multiple = TRUE, open = NULL, # open = "called_orfs",
bsCollapsePanel(DT::dataTableOutput("orfinfo") %>% withLoader(),
title = "Called_orfs",
style = "danger"
) %>% bs_embed_tooltip("all potential open read frames", placement = "top")
),
bsCollapse(
id = "tabs3", multiple = TRUE, open = NULL, # open = "majiq_alternative_splicing",
bsCollapsePanel(
DT::dataTableOutput("majinfo") %>% withLoader(),
title = "MAJIQ_alternative_splicing",
style = "warning"
) %>% bs_embed_tooltip("MAJIQ-reported alternative splicing event, if any", placement = "top")
),
bsCollapse(
id = "tabs4", multiple = TRUE, open = NULL, # open = "UCSC browser plot",
bsCollapsePanel(htmlOutput("ucscPlot") %>% withLoader(),
title = "UCSC browser plot",
style = "success"
) %>% bs_embed_tooltip("click on plot to reach UCSC trackhub with RNAseq data", placement = "top")
),
bsCollapse(
id = "tabs5", multiple = TRUE, open = NULL,
bsCollapsePanel(DT::dataTableOutput("gotab") %>% withLoader(),
title = "GO_terms/domains",
style = "info"
) %>% bs_embed_tooltip("GO terms from human counterpart, or Domain predictions for novel/unknown genes", placement = "top")
)
)
),
tabPanel(
introBox(
span(icon("table", class = NULL, lib = "font-awesome"),
"Gene_table",
title = "Table of expression and other info of all genes/transcripts"
),
data.step = 7,
data.intro = "Here we summarize the genes in this study.<br><br>
The table can be filtered, exported as .csv (only exports entries that pass filter), and passed to Genelist for additional on-the-fly analyses.<br><br>
Hover over column names for additional descriptions.",
data.position = "top"
),
value = "table_data",
div(
id = "doCollapsediv",
style = "display: inline-block;width: 160px;",
checkboxInput("doCollapse",
"longest transcript",
value = T,
width = NULL
) %>% bs_embed_tooltip("only show longest orf transcript for each gene", placement = "bottom")
),
actionButton("loadtab", "to Genelist", icon("file-alt", class = NULL, lib = "font-awesome")) %>%
bs_embed_tooltip("send filtered results to loaded Genelist in side panel", placement = "right"),
DT::dataTableOutput("genes"),
br(),
br()
),
tabPanel(
introBox(
span(icon("list", class = NULL, lib = "font-awesome"), "AS_table",
title = "Table of MAJIQ output for alternative splicing events"
),
data.step = 8,
data.intro = "Similarly, splicing analysis via MAJIQ is presented as a table.<br><br>
The table can be filtered, exported as .csv (only exports entries that pass filter), and passed to Genelist for additional on-the-fly analyses.<br><br>
Hover over column names for additional descriptions.",
data.position = "top"
),
value = "table_AS",
div(
id = "doJoindiv",
style = "display: inline-block;width: 160px;",
checkboxInput("doJoin",
"gene info",
value = FALSE,
width = NULL
) %>% bs_embed_tooltip("bring in gene info as last columns", placement = "bottom")
),
actionButton("loadtab2", "to Genelist", icon("file-alt", class = NULL, lib = "font-awesome")) %>%
bs_embed_tooltip("send filtered results to loaded Genelist in side panel", placement = "right"),
DT::dataTableOutput("alt"),
br(),
br()
),
tabPanel(
introBox(
span(icon("chart-line", class = NULL, lib = "font-awesome"), "Line_plot",
title = "Plot expression of loaded Genelist, each gene as a line"
),
data.step = 12,
data.intro = "Visualize loaded Genelist as line plot, also supports summarized (mean +- sem) line.",
data.position = "top"
),
value = "line_plot",
div(
style = "display: inline-block;vertical-align:top;",
dropdownButton(
circle = FALSE, status = "options", icon = icon("gear"), width = "200px", size = "sm",
tooltip = tooltipOptions(title = "plotting options"), margin = "20px",
br(),
div(id = "doName2div", checkboxInput("doName2", "additional labels", value = T, width = NULL) %>%
bs_embed_tooltip("show toggleable/interactive legend", placement = "right")),
div(id = "doNormdiv", checkboxInput("doNorm", "normalize to SA", value = F, width = NULL) %>%
bs_embed_tooltip("otherwise centered by mean expression", placement = "right")),
div(id = "doSummaryiv", checkboxInput("doSummary", "summary line", value = F, width = NULL) %>%
bs_embed_tooltip("summarize all genes as single instead of individual lines", placement = "right"))
)
),
div(
style = "display: inline-block;vertical-align:top;",
plotlyOutput("linePlot") %>% withLoader()
)
),
tabPanel(
introBox(
span(icon("th", class = NULL, lib = "font-awesome"), "Heatmap",
title = "Plot Z-Score of loaded Genelist as heat map"
),
data.step = 13,
data.intro = "Similar to the lineplot, visualize loaded Genelist as heatmap (normalized as Z-scores). Clicking on a block loads the corresponding gene into query.",
data.position = "top"
),
value = "heat_plot",
br(),
fluidRow(
column(
width = 3,
checkboxInput("doRowcluster",
"cluster rows",
value = T,
width = NULL
),
checkboxInput("doColumncluster",
"cluster columns",
value = F,
width = NULL
)
),
column(
width = 3,
checkboxInput("doSplit",
"split by region",
value = TRUE,
width = NULL
),
checkboxInput("doPivot",
"pivot plot",
value = F,
width = NULL
)
),
column(
width = 3,
checkboxInput("doLabelgene",
"label genes",
value = T,
width = NULL
),
checkboxInput("doAutoresize",
"resize on saving",
value = F,
width = NULL
)
)
),
uiOutput("heatPlotUI") %>% withLoader()
),
tabPanel(
introBox(
span(icon("chart-bar", class = NULL, lib = "font-awesome"), "GO",
title = "GO term enrichment for loaded Genelist (slow)"
),
data.step = 14,
data.intro = "GO term enrichment of loaded Genelist by Fisher's exact test.<br><br>
Top 15 results are plotted, while full table can be exported.<br><br>
Clicking on bar loads the corresponding genes into Cart.<br><br>
Direct link is provided to loading GO terms into REVIGO for further summarization, with REVIGO example from liver data at the bottom.",
data.position = "top"
),
value = "enrichment_plot",
dropdownButton(
inline = TRUE,
circle = FALSE, status = "analysis options", icon = icon("gear"), width = "200px", size = "sm",
tooltip = tooltipOptions(title = "boxplot options"), margin = "20px",
br(),
checkboxInput("doPline", "line at p-val threshold", value = TRUE) %>%
bs_embed_tooltip("whether to draw vertical line to indicate threshold p-val", placement = "right"),
div(
style = "display: inline-block;vertical-align:top;",
radioButtons("background", "background",
c("brain highly expressed", "all squirrel genes", "all human genes"),
selected = "all human genes", inline = FALSE
) %>%
bs_embed_tooltip("genes to use as statistical background", placement = "top"),
radioButtons("gocat", "GO collection",
c("Biological Process", "Cellular Component", "Molecular Function"),
selected = "Biological Process", inline = FALSE
) %>%
bs_embed_tooltip("subcollection of GO terms to test against", placement = "bottom")
)
),
div(
style = "display: inline-block;vertical-align:bottom;",
htmlOutput("revigo") %>% bs_embed_tooltip("direct link to REVIGO for GO term summary (note: REVIGO server is often offline", placement = "right")
),
plotlyOutput("richPlot") %>% withLoader(),
div(
style = "display: padding-top:200px; margin-top:300px",
hr()
),
hr(),
br(),
h5("liver_revigo_exploration") %>%
bs_embed_tooltip("example revigo results for liver RNAseq", placement = "top"),
DT::dataTableOutput("revigoTable"),
plotlyOutput("revigoPlot") %>% withLoader()
),
tabPanel(
introBox(
span(icon("kickstarter-k", class = NULL, lib = "font-awesome"), "Kmer",
title = "Kmer enrichment analysis and annotation for loaded Genelist (slow)"
),
data.step = 15,
data.intro = "Kmer analysis of loaded Genelist, with option to annotate and/or highlight (in black) known RBP motifs or mir seeds.<br><br>
Note that this process may take ~30 seconds due to statistical calculations.",
data.position = "top"
),
value = "kmer_analysis",
tags$style(HTML(".radio-inline {margin-left: 5px;margin-right: 25px;}")),
div(
style = "display: inline-block;vertical-align:top;",
radioButtons("utr", "UTR choice", c("5UTR", "3UTR", "RBP"), selected = "3UTR", inline = TRUE)
),
div(
id = "kmerdiv",
style = "display: inline-block;vertical-align:top; width:175px;",
radioButtons("km", "kmer length", c("5", "6", "7"), selected = "6", inline = TRUE) %>%
bs_embed_tooltip("longer kmer requires longer statistical calculation time.",
placement = "bottom"
)
),
div(
id = "kmlabdiv",
style = "display: inline-block;vertical-align:top; width:250px;",
tags$style(HTML(".radio-inline {margin-right: 10px;}")),
radioButtons("kmlab", "annotate kmer", c("RBP/mir", "seq", "none"), selected = "RBP/mir", inline = TRUE) %>%
bs_embed_tooltip("annotations: 5mer - Ray2013 + Encode, 6mer - Transite R, 7mer TargetScan mir seed",
placement = "bottom"
)
),
div(
style = "display: inline-block;vertical-align:top;",
selectInput("utrlen", NULL, choices = c(200, 500, 1000, "full length"), selected = "full length")
),
div(
id = "rbptermdiv",
style = "display: inline-block;vertical-align:top;width:200px;margin-bottom:-60px;padding-bottom:-60px",
tags$style(HTML("#rbpterm {margin-top: -7px;}")),
textInput("rbpterm", "highlight annotation", value = "MEX3C") %>%
bs_embed_tooltip("highlights annotation (kmer or RBP/mir) in black, case insensitive", placement = "bottom")
),
div(
id = "doPlotly2div",
style = "display: inline-block;vertical-align:bottom;width:200px;",
checkboxInput("doPlotly2", "interactive plot", value = T, width = NULL) %>%
bs_embed_tooltip("display interactive plot with additional info on hover", placement = "right"),
checkboxInput("doPline2", "line at p-val threshold", value = TRUE, width = NULL) %>%
bs_embed_tooltip("whether to draw horizontal line to indicate threshold p-val", placement = "right")
),
uiOutput("kmerPlotUI") %>% withLoader(loader = "pacman", proxy.height = paste0(plot_height * 100 / 2, "px"))
),
tabPanel(
introBox(
span(icon("circle", class = NULL, lib = "font-awesome"), "Venn",
title = "Visualize gene overlap between regions and other lists by venn diagram, and retrieve intersection/union of genes"
),
data.step = 16,
data.intro = "Use venn diagram to visualize documented and loaded Genelist/Cart.<br><br>
Clicking on numbers moves genes of that category to Cart for other analyses/export.",
data.position = "top"
),
value = "venn",
div(
style = "display: inline-block;vertical-align:top; width: 160px;",
selectizeInput("seta", "geneset_A",
choices = c(
"_none", "_Gene_list", "_Cart_list",
names(gene_list)
),
selected = "liv_sig"
)
),
div(
style = "display: inline-block;vertical-align:top; width: 160px;",
selectizeInput("setb", "geneset_B",
choices = c(
"_none", "_Gene_list", "_Cart_list",
names(gene_list)
),
selected = "liv_gro_sig"
)
),
div(
style = "display: inline-block;vertical-align:top; width: 160px;",
selectizeInput("setc", "geneset_C",
choices = c(
"_none", "_Gene_list", "_Cart_list",
names(gene_list)
),
selected = "liv_gropro_sig"
)
),
div(
id = "doUpperdiv",
checkboxInput("doUpper",
"ignore case",
value = T,
width = NULL
) %>%
bs_embed_tooltip("coerce all gene symbols to upper case", placement = "bottom"),
style = "display: inline-block; width: 100px;"
),
div(
id = "loadalldiv",
actionButton("Cart_all", "all genes to Cart", icon("shopping-cart")) %>%
bs_embed_tooltip("add all genes from all selected sets into `Cart` side panel", placement = "bottom"),
style = "display: inline-block"
),
div(
style = "margin-top:-40px",
plotlyOutput("vennPlot") %>% withLoader()
)
),
tabPanel(
introBox(
span(icon("circle-notch", class = NULL, lib = "font-awesome"),
"Genome",
title = paste0("Visualize gene list on longest ", chrlimit, " contigs (slow)")
),
data.step = 17,
data.intro = "Circos-like visualization of genes on newly assembled genome and annotation.<br><br>
Can display genes from Genelist, previously documented list, and RNA editing sites previously reported.<br><br>
Note that thousands of very short contigs are not displayed in the plot.<br><br>
Hover over gene marks for additional info. Clicking loads the gene up ready for query.<br><br>
Plot saves as .html.",
data.position = "top"
),
value = "genome",
div(
style = "display:inline-block;width: 160px;margin-top:6px",
selectizeInput("guse", NULL,
choices = c(
"_none", "_Gene_list", "_Cart_list",
names(gene_list)
),
selected = "_Gene_list"
) %>% bs_embed_tooltip("which genes to show in genome view", placement = "top")
),
div(
style = "display: inline-block;vertical-align:top;color:blue",
uiOutput("listn3", inline = TRUE) %>%
bs_embed_tooltip("short contigs 21 and above are hidden", placement = "top")
),
div(style = "height:1px;margin:-10px", ""),
div(
style = "display:inline-block;width: 160px;margin-top:6px",
selectizeInput("guse2", NULL,
choices = c(
"_none", "_Gene_list", "_Cart_list",
names(gene_list)
),
selected = "_none"
) %>% bs_embed_tooltip("which genes to show in genome view", placement = "top")
),
div(
style = "display: inline-block;vertical-align:top;color:green",
uiOutput("listn4", inline = TRUE) %>%
bs_embed_tooltip("short contigs 21 and above are hidden", placement = "top")
),
div(style = "height:1px;margin:-10px", ""),
div(
style = "display:inline-block;width: 160px;margin-top:6px",
selectizeInput("guse3", NULL,
choices = c(
"_none", "Liver", "Liver_Gro-seq", "Liver_Gro-seq(promoter)", "Forebrain", "Hypothalamus", "Medulla", "Editing_Riemondy2018"
),
selected = "Liver"
) %>% bs_embed_tooltip("displays max log2FoldChange (or max proportions edited for RNA editing sites) between states for this tissue", placement = "right")
),
div(
style = "margin-top:-50px",
uiOutput("circosUI") %>% withLoader()
)
),
tabPanel(
introBox(
span(icon("info", class = NULL, lib = "font-awesome"),
"About",
title = "View version and author info",
),
value = "about",
data.step = 19,
data.intro = "Additional information on the study and authors.<br><br>
We hope squirrelBox will be informative for your data explorations!",
data.position = "top"
),
value = "about",
h5("About squirrelBox"),
uiOutput("GitHub"),
tags$a(
href = manuscriptL,
target="_blank",
div(
img(src = 'FiPhys.png', height = "100",
alt = "Dynamic RNA regulation in the brain underlies physiological plasticity in a hibernating mammal"),
style = "text-align: left;display: inline;"
)
),