Browse code

added css for title and btns

pablo-rodr-bio2 authored on 13/05/2021 11:26:15
Showing6 changed files

... ...
@@ -11,7 +11,7 @@ Imports: methods, stats, utils, graphics, S4Vectors, IRanges,
11 11
          BiocParallel, SingleCellExperiment, sparseMatrixStats, DelayedArray,
12 12
          DelayedMatrixStats, HDF5Array, BiocSingular
13 13
 Suggests: BiocGenerics, RUnit, BiocStyle, knitr, rmarkdown, limma, RColorBrewer,
14
-          org.Hs.eg.db, genefilter, edgeR, GSVAdata, shiny, shinythemes, ggplot2,
14
+          org.Hs.eg.db, genefilter, edgeR, GSVAdata, shiny, shinydashboard, ggplot2,
15 15
           data.table, plotly, future, promises, shinybusy, shinyjs
16 16
 Description: Gene Set Variation Analysis (GSVA) is a non-parametric, unsupervised method for estimating variation of gene set enrichment through the samples of a expression data set. GSVA performs a change in coordinate systems, transforming the data from a gene by sample matrix to a gene-set by sample matrix, thereby allowing the evaluation of pathway enrichment for each sample. This new matrix of GSVA enrichment scores facilitates applying standard analytical methods like functional enrichment, survival analysis, clustering, CNV-pathway analysis or cross-tissue pathway analysis, in a pathway-centric manner.
17 17
 License: GPL (>= 2)
... ...
@@ -1,48 +1,53 @@
1 1
 igsva <- function() {
2 2
 
3
-  shinydeps <- c("shiny", "shinythemes", "ggplot2",
3
+  shinydeps <- c("shiny", "shinydashboard", "ggplot2",
4 4
                  "data.table", "plotly", "future",
5
-                 "shinyjs", "shinybusy", "limma")
5
+                 "shinyjs", "shinybusy", "limma", "magrittr")
6 6
   maskshinydeps <- shinydeps %in% installed.packages()
7 7
   if (any(!maskshinydeps))
8 8
     stop(sprintf("Please install the following packages to use the GSVA WebApp:\n\n  %s\n",
9 9
                  paste(shinydeps[!maskshinydeps], collapse=", ")))
10
-  
11
-  # namespaceImportFrom(self=getNamespace("base"),
12
-  #                     ns=getNamespace("shiny"))
13
-  # 
14
-  # namespaceImportFrom(self=getNamespace("base"),
15
-  #                     ns=getNamespace("shinythemes"),
16
-  #                     vars="shinytheme")
17
-  # 
18
-  # namespaceImportFrom(self=getNamespace("base"),
19
-  #                     ns=getNamespace("ggplot2"),
20
-  #                     vars="ggplot")
21
-  # 
22
-  # namespaceImportFrom(self=getNamespace("base"),
23
-  #                     ns=getNamespace("data.table"))
24
-  # 
25
-  # namespaceImportFrom(self=getNamespace("base"),
26
-  #                     ns=getNamespace("plotly"),
27
-  #                     vars=c("ggplotly", "event_data", "style"))
28
-  # 
29
-  # namespaceImportFrom(self=getNamespace("base"),
30
-  #                     ns=getNamespace("future"))
31
-  # 
32
-  # namespaceImportFrom(self=getNamespace("base"),
33
-  #                     ns=getNamespace("shinyjs"))
34
-  # 
35
-  # namespaceImportFrom(self=getNamespace("base"),
36
-  #                     ns=getNamespace("shinybusy"))
37
-  # 
38
-  # namespaceImportFrom(self=getNamespace("base"),
39
-  #                     ns=getNamespace("limma"))
40 10
 
41 11
   appDir <- system.file("shinyApp", package="GSVA")
42 12
   if (appDir == "")
43 13
     stop("The GSVA Shiny app cannot be found within the package.")
44 14
 
45
-  # runWebApp <- get("runApp", mode="function")
46
-  # runWebApp(appDir)
15
+
47 16
   shiny::runApp(appDir)
48 17
 }
18
+
19
+## legacy code
20
+
21
+# runWebApp <- get("runApp", mode="function")
22
+# runWebApp(appDir)
23
+
24
+
25
+# namespaceImportFrom(self=getNamespace("base"),
26
+#                     ns=getNamespace("shiny"))
27
+# 
28
+# namespaceImportFrom(self=getNamespace("base"),
29
+#                     ns=getNamespace("shinythemes"),
30
+#                     vars="shinytheme")
31
+# 
32
+# namespaceImportFrom(self=getNamespace("base"),
33
+#                     ns=getNamespace("ggplot2"),
34
+#                     vars="ggplot")
35
+# 
36
+# namespaceImportFrom(self=getNamespace("base"),
37
+#                     ns=getNamespace("data.table"))
38
+# 
39
+# namespaceImportFrom(self=getNamespace("base"),
40
+#                     ns=getNamespace("plotly"),
41
+#                     vars=c("ggplotly", "event_data", "style"))
42
+# 
43
+# namespaceImportFrom(self=getNamespace("base"),
44
+#                     ns=getNamespace("future"))
45
+# 
46
+# namespaceImportFrom(self=getNamespace("base"),
47
+#                     ns=getNamespace("shinyjs"))
48
+# 
49
+# namespaceImportFrom(self=getNamespace("base"),
50
+#                     ns=getNamespace("shinybusy"))
51
+# 
52
+# namespaceImportFrom(self=getNamespace("base"),
53
+#                     ns=getNamespace("limma"))
49 54
\ No newline at end of file
... ...
@@ -1,12 +1,11 @@
1 1
 closeBtnUI <- function(id){
2 2
   ns <- NS(id)
3
-  hidden(actionButton(ns("closeSave"), "Save & Close", style = "color: #fff;
4
-  font-weight: bold;
5
-  background-color: red;
6
-  border-color: #fff;
7
-  width:130;
8
-  padding: 5px 5px 5px 5px;
9
-  margin: 5px 5px 5px 5px; "))
3
+  hidden(actionButton(ns("closeSave"), "Save & Close", 
4
+                      icon = icon("window-close"),
5
+                      style = "color: #fff;
6
+                      font-weight: bold;
7
+                      background-color: red;
8
+                      border-color: #fff;"))
10 9
 }
11 10
 
12 11
 closeBtnServer <- function(id, gs){
... ...
@@ -3,9 +3,7 @@ downloadUI <- function(id) {
3 3
   hidden(downloadButton(ns('downloadData'), 'Download', style = "color: #fff;
4 4
   font-weight: bold;
5 5
   background-color: #27ae60;
6
-  border-color: #fff;
7
-  padding: 5px 14px 5px 14px;
8
-  margin: 5px 5px 5px 5px;" ))
6
+  border-color: #fff;" ))
9 7
 }
10 8
 
11 9
 downloadServer <- function(id, gs){
... ...
@@ -29,9 +29,12 @@ dashboardPage(
29 29
                    "Yes" = "yes")),
30 30
     br(),
31 31
     fluidRow(
32
-      actionButton("button", "Run"),
33
-      downloadUI("download"),
34
-      closeBtnUI("close"),
32
+      column(
33
+        width = 12, align = "left",
34
+        actionButton("button", "Run"),
35
+        downloadUI("download"),
36
+        closeBtnUI("close")
37
+      )
35 38
     )
36 39
   ),
37 40
   
... ...
@@ -11,6 +11,8 @@ font-weight: bold;
11 11
   color: white;
12 12
   font-weight: bold;
13 13
   font-size: 30px;
14
+  padding: 5px 5px 5px 5px;
15
+  margin: 5px 5px 5px 5px;
14 16
 }
15 17
 
16 18
 .left-side, .main-sidebar {