-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
1324 lines (1126 loc) · 76 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
### Author: Franck Soubès
### Bioinformatics Master Degree - University of Bordeaux, France
### Link: https://github.com/GeT-TRiX/MA_Trix_App/
### Where: GET-TRiX's facility
### Application: MATRiX is a shiny application for Mining and functional Analysis of TRanscriptomics data
### Licence: GPL-3.0
###############################
######## dashboardsidebar #
###############################
dbHeader <- dashboardHeader(title = "MATRiX")
dbHeader$children[[2]]$children <- tags$a(tags$img(src='matrix.png',height='40',width='40',style="margin:5px 0 5px 0;",align='left'),
tags$h3("MATRiX",style="font-family:Purisa; margin:15px 25px 5px 0;color:white; "))
sidebar <- dashboardSidebar(
## init and load shinyjs functions
useShinyjs(),
tags$style(type="text/css", inactivity),
shinyjs::extendShinyjs(script = "www/shinyjs_gif_functions.js"),
shinyjs::extendShinyjs(script = "www/shinyjs_enrichr.js"),
tags$head(
tags$script(src = "custom.js")),
div(id = "loading-content-bar",p()),
div(id = "matrixapp",
sidebarMenu(id = "side",
menuItem("Home", tabName = "Home", icon = icon("home")),
menuItem("Upload Data", tabName = "Upload", icon = icon("upload")),
hidden(tags$div(id = "menuitemsum", class= "menuitempca", menuItem("Data summary", tabName = "Datasummary", icon = icon("line-chart")))) ,
hidden(tags$div(id = "menuitempca", class= "menuitempca", menuItem("PCA", tabName = "PCA", icon = icon("line-chart")))) ,
hidden(tags$div(id = "menuitemvenn", class= "menuitempca", menuItem("Venn diagram", tabName = "Venn", icon = icon("line-chart")))),
hidden(tags$div(id = "menuitemhm", class= "menuitempca",menuItem("Heatmap", tabName = "Heatmap", icon = icon("line-chart")))),
menuItemOutput("dymMenu"),
collapsed = TRUE,
tags$a(img(
src = "GeT_logo-RVB.png",
height = 50,
style = "position:absolute;bottom:120px;margin:0 0 10px 15px;"
) , href="https://get.genotoul.fr", target="_blank"),
tags$a(img(
src = "Logo-INRAE_Blanc_Transparent.png",
height = 35,
style = "position:absolute;bottom:70px;margin:0 0 10px 15px;"
) , href="https://www6.toulouse.inrae.fr/toxalim", target="_blank")
),
tags$footer("Copyright © 2018-2020 INRAE | Designed by GenoToul GeT-TRiX team", align = "center", style = "
position:absolute;
bottom:20px;
width:100%;
height:40px; /* Height of the footer */
color: white;
padding: 3px;
z-index: 100")
)
)
###############################,
######## dashboardbody #
###############################
###############################
######## Upload Page #
###############################
body <- dashboardBody(
#tags$head(includeScript("google-analytics.js")),
tags$style(type="text/css", inactivity),
useShinyjs(),
extendShinyjs(text = 'shinyjs.hideSidebar = function(params) { $("body").addClass("sidebar-collapse");
$(window).trigger("resize"); }'),
extendShinyjs(text='shinyjs.showSidebar = function(params) { $("body").removeClass("sidebar-collapse");
$(window).trigger("resize"); }'),
tags$style(HTML("
.tabbable > .nav > li > a[data-value='hmpan'] {background-color: red; color:white}
.tabbable > .nav > li > a[data-value='cutpan'] {background-color: blue; color:white}
")),
includeCSS("./css/style.css"),
div(
id = "loading-content",
br(),br(),
br(),
h2("Please wait while MATRiX is loading...")),
div(
id = "matrixapp",
tabItems(
tabItem(tabName = "Home",
fluidRow(
column(width=9,
div(style="width:100% ;max-width: 1500px; height: 1500px max-height: 2200px;",id = "homepage",
tabBox(title="Welcome to MATRiX", width=NULL,id = "homepage",
tabPanel("About", style = "background-color: #ffffff;",
tags$h3("MATRiX is a shiny application for Mining and functional Analysis of TRanscriptomics data."),
p("This project initiated by Yannick Lippi aims to facilitate access to biologist in order to publish graphs such as heatmap, PCA or Venn diagram related to specifics data produced by TRiX's facility.", tags$br(),"
MATRiX is an application dedicated to transcriptomic analysis (DNA chip, RNA-seq, ChIP-Seq), this application incorporates quality control with Principal components analysis to summarizes Transcriptomic data and differential analysis with various methods such as Venn diagram, Heatmap clustering and GO Enrichment analysis by querying the DWS (DAVID WEB SERVICES).",tags$br(),"
MATRiX app is working with data produced by the limma, DESeq2 and edgeR packages, resulting p-values are adjusted according to the Benjamini and Hochberg procedure [Benjamini and Hochberg 1995]. PCA is computed with the FactoMineR package and the plot is produced with the factoextra package, for the Heatmap and Venn diagram the graphs are obtained respectively with the gplots and VennDiagram package, those packages are available on CRAN. This application works with specific data produced by transcriptomic facilities, you can refer to the download example file (sampleData.zip) and the MATRiX's menu (upload data)."),
p("Below is represented the global workflow passing by the statistical analysis to the visualization:"),tags$br(),
div(id="workflow",
tags$p(tags$img(src = "whatmaen.png",style="width: 100%; height: 100%")))
),
tabPanel("Authors", h3("The main providers to MATRiX:"),
p(a("Yannick Lippi",href="mailto:yannick.lippi@inrae.fr"), "(Initiator, beta-testing, feature suggestions)"),
p(a("Franck Soubès", href="mailto:franck.soubes@inra.fr"), "(Coding, Unit testing, documentation, packaging, feature suggestions)",tags$a(href = "https://github.com/fsoubes",target="_blank",
"See github")),
h3("Acknowledgements"),
p("Thanks to the Toxalim's team BioToMyc & TIM and especially to the following people for their helps reporting errors, proposing new features and beta testing of MATRiX:"),
p("Laura Costes,", "Anne Fougerat,","Claire Naylies,", "Philippe Pinton,","Arnaud Polizzi," ,"Marion Regnier," , "Sandrine Ellero-Simatos,","Sarra Smati."),
p("Special Thanks to Didier Laborie for installing the virtual machine with Ubuntu and for answering my questions")
),
tabPanel("Packages",
tags$h3("If you are using MATRiX in your work, you can cite some of the packages by clicking on the link down below."),
actionLink("session",
"Print version information about R, the OS and attached or loaded packages."),
br(), br(), br(),
renderoutputTable("sessinfo")
),
tabPanel("Support",
tags$head(
tags$style(
"#entry {width: 100%;position: relative;left: 4%;}
#users ul li {font-family: 'Inconsolata', cursive;font-weight: 500;line-height: 1.5;color: white;position: static;font-size: 18px;}
#users a{color: red;} #users p{color:white;}")),
includeCSS("www/shinychat.css"),
# And custom JavaScript -- just to send a message when a user hits "enter"
# and automatically scroll the chat window for us. Totally optional.
includeScript("www/sendOnEnter.js"),
fluidRow(
column(width=9,
div( style = "width:100% ; max-width: 1200px; height: 500px",
div(
class = "row-fluid",
# Create a spot for a dynamic UI containing the chat contents.
uiOutput("chat"),
# Create the bottom bar to allow users to chat.
fluidRow(
div(class="span8",
textInput("entry", "")
),
div(class="span2 center",
actionButton("send", "Send")
)
)
)))
)),
tabPanel("Video",
div( id="video",
fluidRow(
column(8, align="center", offset = 2,
tags$iframe(src = "https://www.youtube.com/embed/lfI0zRYzeJs?vq=hd1080", width="960", height="540", align= "middle", frameborder="0",allowfullscreen ="1" )
))))
))),
column(width=3,
div(id="pass",style = "word-wrap: break-word;",
box(id="boxpass",title = strong("Session information", style="font-size:25px;"), width = NULL, background = "light-blue",
# The right sidebar
# Let the user define his/her own ID
textInput("user", "Your User ID:", value=""),
tags$hr(),
h5("Connected Users"),
# Create a spot for a dynamic UI containing the list of users.
div(id ="users",
uiOutput("userList"),
tags$hr(),
p("Built using R and" ,tags$a(href = "http://rstudio.com/shiny/",target="_blank",
"Shiny")),
p("Chat source code is available ",
tags$a(href = "https://github.com/trestletech/ShinyChat",target="_blank",
"here"))
)
)
),
box(
title = "What's new in MATRiX", width = NULL, status = "primary",
div(style = 'overflow-y: scroll; height: 500px',
addNews("May 07th 2019", "Fix", "In volcano plot the FC cutoff is now correctly applied. Previously the value were filtered according to log2FC."),
addNews("Mar 12th 2019", "Front-end", "Add data summary page, hides menu pages and redirect users after data loading."),
addNews("Feb 14th 2019", "Functional results", "It is now possible to sort the categorie terms based on both pvalue and Fold enrichment."),
addNews("Feb 14th 2019", "Jvenn results", "Duplicated genes are now highlited as orange in the output table"),
addNews("Feb 14th 2019", "Upload", "Users can now import csv data with semicolon or comma separatos by precising the decimal"),
addNews("Jan 25th 2019", "Bug", "Correct david$getSpecieNames (Specieshm and Speciesvenn)"),
addNews("Jan 25th 2019", "Data", "Users can now register as a team and load their data directly from the server (only for 2019 projects and logs are provided in report)"),
addNews("Jan 25th 2019", "MATRiX", "MATRiX is now running with Shinyproxy (Spring + Docker)"),
addNews("Jan 21th 2019", "Increased exploration", "Add features to filter the top n based on the FDR/RAW and logFC, Generate strip chart for specific genes and barplot for Volcano plot"),
addNews("Jan 11th 2019", "Data", "MATRiX is now compatible with Microarray, ChIP-seq and RNA-seq data"),
addNews("Nov 30th 2018", "MATRiX", "Add tootlip for distance, its now possible to export acyclic graphs in pdf and eps, correct bugs for classification enrichment with 0 nodes by inactivating donwload button"),
addNews("Nov 29th 2018", "Venn Diagram/HTML", "Correct bugs now venn diagram table is based on genes and not probes."),
addNews("Nov 5th 2018", "Venn Diagram", "Remove non annotated genes."),
addNews("Oct 19th 2018", "Volcano plot", "Search group of genes based on regular expression."),
addNews("Oct 15th 2018", "Venn Diagram", "Change the library to Jvenn."),
addNews("Aug 15th 2018", "Presentation/Video", "Added a video to present MATRiX and add modules to import files."),
addNews("Aug 10th 2018", "Upload/Volcano", "You can explore your different comparisons with a volcano plot."),
addNews("Aug 6th 2018", "Venn Diagram/Enrichment", "Add acyclic graph if download."),
addNews("Aug 4th 2018", "Heatmap/Bubble graph", "You can display or not the labels within the bubbles."),
addNews("Aug 3th 2018", "Heatmap/Go(Analysis)", "You can now plot a bubble graph (Highcharts) that summarizes the top categories from the resulting datatable."),
addNews("Jul 28th 2018", "Home/Support", "You can asks your questions directly in the Support."),
addNews("Jul 25th 2018", "Tutorial/Video", "Soon will be added a video to summarise the application."),
addNews("Jul 20th 2018", "New page", "Add a Home page regrouping informatios about the app."),
addNews("Jul 16th 2018", "Venn" ,"You can now choose your color for the venn diagram."),
addNews("Jul 16th 2018","Bug fixes","Venn diagram display erros when filtering."),
addNews("Jul 5th 2018","Venn/DAVID","Add Gene functionnal classification for selected intersection(s)."),
addNews("Jun 26th 2018","Add features","It's now possible to interact with the rendering table to filter the table in the aim of plotting the top n genes.
For the GO enrichment it is now possible to select the rows in order to display the gene symbol according to the entrez ids."),
addNews("Jun 22th 2018","Bug fixes","For two contrasts the venn.draw function was not ordering the contrast names in the right order."),
addNews("Jun 20th 2018","MATRiX","First public release of MATRiX.
Enhancement of the gui with the use of dashboard package."),
addNews("Jun 18th 2018","GO enrichment","It is now possible to query the DWS for the Heatmap and save the result in xlsx format for the different clusters"),
addNews("Jun 15th 2018","DNS ","Adding DNS for the MATRiX application (matrix.toulouse.inra.fr)"),
addNews("Jun 10th 2018","Venn diagram","The venn diagram FC and display of the top n genes
have been added to compare the results of 2 or more contrasts."),
addNews("Jun 5th 2018","PCA/Heatmap","Display color groups side by side in the gui."),
addNews("May 29th 2018","beta-test","The service will be made available once the beta test phase is officially completed.")
)
)
)
)
),
tabItem(tabName = "Upload", style = "background-color: #ffffff;",
bsAlert("alert"),
tags$style(type='text/css', ".well { max-width: 2em; }"),
fluidRow(
tags$head(
tags$style(type="text/css", ".myslidermain .irs-grid-text {bottom: 5px;color: #333;}
.myslidermain .irs-min{color: #333;font-size: 10px;line-height: 1.333;text-shadow: none;top: 0;padding: 1px 3px;
background: rgba(0,0,0,0.1);border-radius: 3px;-moz-border-radius: 3px}
.myslidermain .irs-max{color: #333;font-size: 10px;line-height: 1.333;text-shadow: none;top: 0;padding: 1px 3px;
background: rgba(0,0,0,0.1);border-radius: 3px;-moz-border-radius: 3px}")),
column(width = 9, div( style = "width:100% ;
max-width: 1500px; height: 1500px max-height: 2200px;" ,id = "upload",
tags$h1("How to import ?"),
tags$ul(
tags$li("First click on the browse button to load the data"),
tags$li("After the pop up has appeared, you will have to select the data files."),
tags$li("It is also possible to directly drag and drop your data files in the browse button"),
tags$li("You need three distinct csv files, these files are respectively named xxx_pData, xxx_WorkingSet and xxx_ResTable."),
tags$li("pData : The experimental design in a 2 column table that associates samples to their respective biological conditions"),
tags$li("WorkingSet : The table of the normalised expression values (log2, cpm, ...) with genes in rows and samples in columns. The first column must contain the unique gene identifier (or transcript, probe, ...)."),
tags$li("ResTable : The table containing the results of differential analysis (fold change, p-value and FDR) next to a first column with unique gene identifier and a second column with the gene symbol."),
tags$li("The final step consist to select all the data at once and then confirm the selection by clicking on the open button."),
tags$li("A green message will then appear to confirm the data loading with a summary table.")
),
tags$p(
tags$img(src = "pData.png"),
tags$img(src = "restable.png"),
tags$img(src = "workingset.png")
),
tags$h1("Tips"),
tags$ul(
tags$li("Unique IDs and GeneName columns must appear in the statistical data and unique IDs columns for Workingset in order to import the data (RNA-seq, DNA-chips, ChIP-Seq)."),
tags$li("You can select a region by handling the left click button if the files are stacked together, if it's not the case you can select the different files by maintening the Ctrl button and clicked on the files.")
),
tags$h1("Warning"),
tags$ul(
tags$li("It is highly recommanded to not modify these files (removed columns, change column names ...) in the aim of not disturbing the well functionning of the application.")
)
)), div(id="pass",style = "word-wrap: break-word;",
column(width = 3,
box(id="boxpass",title = strong("Upload data", style="font-size:25px;"), width = NULL, background = "light-blue",
inlineCSS(list(.pwdGREEN = "background-color: #DDF0B3",.pwdRED = "background-color: #F0B2AD")),
downloadLink("downloadData", label = "Download example data files", style="color:orange; float:right;"),
br(),br(),
fluidRow(column(12,p("Files configurations:",style="color:white; font-weight: 1000; font-size: 16px;"))),
fluidRow(column(6,csvIdentifier("datafile", "Feature Identifier")),
column(6, csvDecimal("datafile"))),
br(),
fluidRow(column(12,p("Upload project .csv files from:",style="color:white; font-weight: 1000; font-size: 16px;"))),
csvFileInput("datafile", "1. your local machine"),
fluidRow(column(12, p("2. your team's project on the server location",style="color:white; font-weight: 700; font-size: 14px;"))),
dirModuleUI("datafile"),
br()
))))),
tabItem(tabName = "Datasummary", style = "background-color: #ffffff;",
tags$div(id ="statussum",class ="gif"),
fluidRow(
column(width = 9,
div(
style = "width:100% ; max-width: 1500px; height: 1500px max-height: 2200px;" ,
id = "sumardata",
tabBox(
title = "Data summary",
width = NULL,
id = "sumardata",
tabPanel(
"Summary tables",
style = "background-color: #ffffff;",
textOutput("myFileName"),
column(
12,
h3(
"Summary table of significant genes regarding FC and p-value treshold"
),
helpText("Adjust p-value treshold to update the summary table"),
div(
class = "myslidermain",
sliderInput(
"pval1",
"",
min = 0.01,
max = 0.05,
value = 0.05,
step = 0.01,
width = "500"
),
renderoutputTable("rendersummary")# render a renderTable or renderDataTable within an application page
)
),
column(
12,
h3("Sample-Groups table"),
renderoutputTable("renderpdata")
),
column(
12,
h3("Statistical results table"),
renderoutputTable("renderestab")
)
),
tabPanel(
"Volcano plot",
style = "background-color: #ffffff;",
div(style = "display:inline-block;",
fluidRow(
column(5, style = "width:30%", downloadFiles("savevolc", "Save Volcano plot")),
column(3, style = "width:20%;", selFormat("savevolc"))
)),
plotOutput(outputId = "volcanoplot", height = 900) ,
div(style = "display:inline-block;",
fluidRow(
column(
3,
style = "width:34.0%;",
downloadFiles("savebarvolc", "Save Barplot")
),
column(3, style = "width:20%;", selFormat("savebarvolc"))
)),
plotOutput(outputId = "barplotvolc", height = 500)
),
tabPanel(
"Stripchart genes",
value = "stripgenes",
column(width = 12,
div(
id = "stripbox",
box(
title = "Filter the table",
width = 10,
status = "primary",
solidHeader = TRUE,
collapsible = TRUE,
collapsed = TRUE,
icon = icon("arrow-down"),
column(
width = 4,
radioButtons(
"decidemethodstrip",
label = "Choose your statistical method",
choices = c("adj.p.val (FDR)" = "FDR", "p.value (raw)" = "None"),
inline = TRUE
)
),
div(class = "myslidermain", cutoffElements("degstrip", 3, 3)),
column(width = 12, textOutput("selected_stripgene"))
)
)),
column(
12,
h3("This table shows the normalized values"),
renderoutputTable("orderedwk")
),
div(style = "display:inline-block;",
fluidRow(
column(3, style = "width:27.0%;", downloadFiles("savestrip", "Save Stripchart")),
column(3, selFormat("savestrip"))
)),
plotOutput(
outputId = "renderstripgenes",
height = "500px",
width = "100%"
)
)
)
)
),
div(id = "pass", style = "word-wrap: break-word;",
column(
width = 3,
box(
id = "boxpass",
title = strong("Data summary", style = "font-size:25px;"),
width = NULL,
background = "light-blue",
inlineCSS(
list(.pwdGREEN = "background-color: #DDF0B3", .pwdRED = "background-color: #F0B2AD")
),
br(),
selectInput(
"method",
"Statistical method",
choices = c("adj.p.val (FDR)" = "FDR", "p.value (raw)" = "None")
)
),
box(
id = "boxpass2",
title = strong("VOLCANO plot", style = "font-size:25px;"),
width = NULL,
background = "light-blue",
fluidRow(column(6,
uiOutput("compvolc")),
column(
6,
selectInput(
"regulationvolc", # Create a select list that can be used to choose a single or multiple items from a list of values.
"Choose regulation",
choices = c("both", "up", "down")
)
)),
fluidRow(column(
6,
sliderInput(
'volcfc',
"Fold-Change cutoff",
min = 1,
max = 10,
step = 1,
value = 1
)
),
column(
6,
sliderInput(
'volcpval',
"P-value cutoff",
min = 0.01,
max = 0.05,
step = 0.01,
value = 0.05
)
)),
##----------
shiny::actionButton(
"toggleAdvancedVolc",
"Advanced Graphical Options",
href = "#",
style = "color: #fff; background-color: #337ab7; border-color: #2e6da4"
),
br(),
shinyjs::hidden(div(
id = "advancedvolc",
fluidRow(column(
4,
sliderInput(
'volclab',
"Label size",
min = 1,
max = 6,
step = 0.5,
value = 3.0
)
),
column(
4,
sliderInput(
'volcpt',
"Point size",
min = 0.5,
max = 3,
step = 0.1,
value = 1
)
),
column(
4,
sliderInput(
'volcalpha',
"Pt transparency",
min = 0.1,
max = 1,
step = 0.1,
value = 1
)
))
))
,br(),
###-----------
div(
id = "mytextvolc",
p(
" Highlight gene(s): fill comma-separated GeneNames"
)
),
fluidRow(column(12,
textInput(
inputId = "fillvolc",
label = NULL,
value = NULL,
placeholder = "FOXP2,OT,AVPR1a",
width = "100%")
)),
fluidRow(column(
6,
textInput(
inputId = "findfamily",
label = "Highlight a gene family",
value = NULL,
placeholder = "Cyp",
width = "100%"
)
),
column(
6,
numericInput(
'topvolc',
'Highlight top X genes',
NULL,
min = 0,
max = 5000
)
)),
uiOutput("addcompvolc")
)
))
)),
###############################
######## PCA page #
###############################
tabItem(tabName = "PCA",
tags$style(type='text/css', ".well { max-width: 20em; }"),
tags$style(type='text/css', ".well { max-height: 50em; }"),
# singleton(
# tags$head(tags$script(src = "gif.js"))
# ),
fluidRow(column(width = 9,
div(style = "width:100% ; max-width: 1500px; height: 1500px max-height: 2200px;",
tabsetPanel(
tabPanel(
strong("Scree plot"),
div(style="display:inline-block;",
fluidRow(column(1, style="width:9.666%;",
downloadFiles("downloadplots", "Save Scree plot")),
column(2),
column( 3, selFormat("downloadplots")))),
br(),
tags$div(id ="statuspca", class ="gif"),
plotOutput(outputId = "eigpca", height = 700)
),
tabPanel(
strong("PCA plot"),
tags$style(type = "text/css",".shiny-output-error:before { visibility: hidden; }"),
div(style="display:inline-block;",
fluidRow(column(1,downloadFiles("savepca", "Save PCA plot")),
column(2),
column( 3, selFormat("savepca")))),
plotOutput(outputId = "PCA", height = 700) #,plotOutput(outputId = "PCAvarender", height = 700)
)
)
)
),
div(id="pass",style = "word-wrap: break-word;",
column(width=3,
box(id="boxpasspca",title = strong("PCA settings",style="font-size:25px;"), width = NULL, background = "light-blue",
inlineCSS(list(.pwdGREEN = "background-color: #DDF0B3",.pwdRED = "background-color: #F0B2AD")),
checkboxElements("selgrouppca"),
fluidRow(column(6,
selectInput("dim1",
label = h6(gettext("x axis")),
choices = list(
"Dim 1" = 1,
"Dim 2" = 2,
"Dim 3" = 3,
"Dim 4" = 4,
"Dim 5" = 5
),
selected = firstdim
)
),
column(6,
selectInput("dim2",
label = h6(gettext("y axis")),
choices = list(
"Dim 1" = 1,
"Dim 2" = 2,
"Dim 3" = 3,
"Dim 4" = 4,
"Dim 5" = 5
),
selected = secdim
)
)),
fluidRow(
column(4,
checkboxInput("label", "Add labbels names", TRUE)),
column(4,
checkboxInput("meanpoint", "Add mean points", TRUE)),
column(4,
checkboxInput("ellipse", "Add ellipses", FALSE))#,
),
fluidRow(column(3),
column(8,checkboxInput("jitter", "Avoid overlap between points", FALSE))),
verbatimTextOutput("valued"),
sliderInput(
"labelsiize","Label size",min = 2,max = 6,value = 4,step = 1
),
sliderInput("pointsiize","Point size",min = 2,max = 6,value = 2,step = 1
),
renderncolour("myPanelcolpca"),
br()
))))),
###############################
######## Venn Page #
###############################
tabItem(tabName = "Venn",
div(id ="statusvenn",class ="gif"),
tags$style(type='text/css', ".well { max-width: 25em; }"),
tags$style(type='text/css', ".well { max-height: 70em; }"),
fluidRow(column(
width = 9,
div(
style = "width:100% ; max-width: 1500px; height: 1850px; max-height: 2800px;",
tabsetPanel(
id = "Vennd",
tabPanel(
value= "vennset",
strong("Venn Diagram"),
column(6,offset = 0, style='padding:0px;',
div(style="display:inline-block",
fluidRow(
column(3, style="width:43%",
downloadFilestab("savevennlist", "Download the data")),
column(3,
downloadFilestab("saveallset", "Download venn set"))
))),
column(width=6, offset = 0, style='padding:0px;',
div(id = "vennbox",
box(title="Filter the datatable",width = 12, status = "primary", solidHeader = TRUE,collapsible = TRUE,collapsed = TRUE,icon = icon("arrow-down"),
column(3,
numericInput("filtertopjvenn", "Top n genes", value = 50, min=5 , max = 150)),
column(5,
selectInput("filtermethjvenn", "Based on", choices = c("adj.p.val (FDR)"= "FDR", "p.value (raw)" = "None"))),
column(5,
uiOutput("filtercompjvenn"))
))),
tags$script(src="libraries/prettify.js") ,
tags$script(src="libraries/jvenn.min.js") ,
tags$script(src="libraries/canvas2svg.js") ,
tags$script(src="tooltip.js"),
fluidRow(
column(6,
tags$script(src="jvenn.js"),
tags$div(id="jvenn-container", style = "background-color: white; width: 100%; height:100%")
),
column(6,
div(class= "dfvenn" , style="font-size:24px; margin-top: 17px;",
htmlOutput("dfvenn")),
conditionalPanel(condition = "typeof input.jvennlist !== 'undefined' && input.jvennlist.length > 0 && input.dispvenn == 'probes'",
helpText(
"You can directly filter the table by fold change and save the output table"
)),
conditionalPanel(condition = "typeof input.jvennlist !== 'undefined' && input.jvennlist.length > 0 && input.dispvenn == 'genes'",
helpText("You can directly filter the table by fold change and save the output table, genes in orange are duplicates "
)),
renderoutputTable("renderjvenntab"),
br(),br(),br(),
conditionalPanel(condition = "input.selcontjv",
div(class= "dfvennbef" , style="font-size:24px; margin-top: -28px; "))
)),
div(style="display:inline-block;",id ="dontwanttoshow",
fluidRow(
tags$head(
tags$style(type="text/css", ".topgeness label{ display: table-cell; text-align: left; vertical-align: middle; }
.inline .form-group{display: table-row;} ")
),
column(3,br(),style= "width:25%;",
actionButton(
inputId = "topdegenes",
label = "Plot top DE genes",style ="color: #fff; background-color: #337ab7; border-color: #2e6da4"
)),
column(3,style= "width:26.0%;",br(),downloadFiles("savebarvenn", "Save Barplot")),
column( 3,br(),style= "width:11%; padding: 0%;", selFormat("savebarvenn")))),
plotOutput(outputId ="barplotvenn", height = "500px", width ="100%"),
br(),
h1("Here's a tracker for your different selections:"),
tags$head(
tags$link(rel = "stylesheet", type = "text/css", href = "style.css") # add style.css in order to add better police
),
tags$head(tags$style("#container * {
display: inline;
}")),
tags$head(tags$style("#mytext p{font-weight: 500;font-size: 17px;line-height: 1.5;color: white;
position: static;}
#mytext a{color: orange;}"
)),
div(
id = "container",
p("You have chosen the following comparisons"),
htmlOutput("contvenn"),
p("for a total of"),
htmlOutput("totalgenes"),
p("genes with a P-value and FC treshold respectively set to "),
tracketCutoff("degvenn")
),
div(
id = "container",
p("There are"),
htmlOutput("venngenes"),
p("significant genes"),
p("for this intersection"),
htmlOutput("continter"),
p("if you click on the top DE genes button you will plot the top"),
htmlOutput("topgenesdf"),
p("rows the of the previous table")
)
),
tabPanel(strong("Venn Enrichment Results"),
value = "venngopanel",
useShinyjs(),
fluidRow(column(3,style= "width:14.3%;",downloadFiles("saveclustvenn", "Export to acyclic graph")),
column( 1, selFormat("saveclustvenn"))),
plotOutput("clusterPlot", width = "100%", height = "700px"),
br(),br(),br(),
renderoutputTable("clustdavid")
)
))
),
div(id="pass",style = "word-wrap: break-word;",
column(width=3,
box(id="boxpassvenn",title = strong("Venn settings", style ="font-size:25px;"), width = NULL, background = "light-blue",height = "100%",
inlineCSS(list(.pwdGREEN = "background-color: #DDF0B3",.pwdRED = "background-color: #F0B2AD")),
checkboxElements("selcompvenn"),
fluidRow(column(6,
selectInput("methodforvenn","Statistical method",
choices = c("adj.p.val (FDR)"= "FDR", "p.value (raw)" = "None")
)),
column(6,
selectInput("regulation", # Create a select list that can be used to choose a single or multiple items from a list of values.
"Choose your regulation",
choices = c("both","up", "down")))),
div(id = "mytext",
p("A comma-separated list of ",
tags$a(href = "https://stat.columbia.edu/~tzheng/files/Rcolor.pdf",target="_blank",
"x11"),
"or",
tags$a(href = "https://en.wikipedia.org/wiki/Web_colors#Hex_triplet",target="_blank",
"hex colors."))),
textInput(inputId = "fill",label = NULL,value = c( "green,blue,red,purple,orange,brown"),
placeholder = "grey70, white, steelblue4",width = "100%"
),
fluidRow(
cutoffElements("degvenn",c1=6,c2=6)),
br(),
fluidRow(
column(12,
uiOutput("dispidvenn")),
column(6,
checkboxInput("Notanno","Remove the genes that are not annotated",FALSE)),
column(6,
checkboxInput("Allcont","Show the logFC for all comparisons",FALSE))),
br(),
shiny::actionButton(
"toggleAdvancedJvenn",
"Advanced Jvenn Options",
href = "#",
style = "color: #fff; background-color: #337ab7; border-color: #2e6da4"
),
br(),
shinyjs::hidden(div(
id = "advancedjvenn",
br(),
fluidRow(
column(6,
p("Select your Type of Venn",style="color:white; font-weight: 700; font-size: 14px;"),
includeHTML("HTML/jvenntype.html")),
column(6,
p("Display the stat",style="color:white; font-weight: 700; font-size: 14px;"),
includeHTML("HTML/displaystat.html"))),
br(),
p("Police's size", style="color:white; font-weight: 700; font-size: 14px;"),
includeHTML("HTML/fontsize.html"),
br(),
fluidRow(
column(6,
p("Find an element in list(s)",style="color:white; font-weight: 700; font-size: 14px;"),
includeHTML("HTML/seekgene.html")),
column(6,
p("Display switch",style="color:white; font-weight: 700; font-size: 14px;"),
includeHTML("HTML/dispswitch.html")))
)),
br(), br(),
conditionalPanel( "input.selcontjv" ,
strong("Functional Annotation Clustering",style = "font-family: 'times'; font-size:20px; font-style: strong; "),
br(),br(),
fluidRow(column(6, sliderInput("clusterNumber",label = "Cluster",
value = 1, min = 1,max = 5
)),
column(6, selSpecies("vennanalysis"))),
fluidRow(
column(6,
selectInput("catvenn", "Choose your category", selected ="BP", c("BP","MF","CC"))),
column(6,br(),
runAnalysis("vennanalysis"))))
))))),
###############################
######## Heatmap Page #
###############################
tabItem(tabName = "Heatmap",
tags$div(id ="statushm",class ="gif"),
tags$style(type='text/css', ".well { max-width: 25em; }"),
fluidRow(column(
width = 8,
div(
tabsetPanel(
id = "heatmapmainp",
tabPanel(
strong("Heatmap"),value = "hmmainpan",
div(style="display:inline-block;",
fluidRow(column(1,style="width:9%;",downloadFiles("savehm", "Save Heatmap")),
column(2),
column( 3, selFormat("savehm")))),
includeCSS("./css/style.css"),
conditionalPanel(condition = '!output.heatmbool', verbatimTextOutput("warningsheat")
),
conditionalPanel(
condition = "input.col1 =='blue' && input.col3 =='red' && input.submit == 0 ",
wellPanel(style = "position: absolute; width: 30%; left: 35%; top: 40%;
box-shadow: 10px 10px 15px grey;",
selectInput("text", "Choose your intermediate color:", choices = c("yellow", "white")),
actionButton("submit", "Submit"))
),
conditionalPanel(condition = 'output.heatmbool',
plotOutput("distPlot", width = "100%" , height = 1300)
),
h1("Here's a tracker of your different parameters:"),
tags$head(
tags$link(rel = "stylesheet", type = "text/css", href = "style.css") # add style.css in order to add better police
),
tags$head(tags$style("
#container * {display: inline;}")),
div(
id = "container",p('Selection of'),htmlOutput("myNUM"),
p('significant features'),
p('for the following comparison(s):'),
htmlOutput("testtt")
),
div(
id = "container",
p('Based on the '),
textOutput("myMET"),
p('method, with a P-value and FC treshold respectively set to '),
tracketCutoff("deghm")
),
conditionalPanel(condition = "input.maxgen != null",
div(
id = "container",
p('Limitation to a maximum of '),
textOutput("maxGen"),
p(' top regulated features per comparison according P-value.'))),
div(
id = "container",