Browse code

new css changes in dashboard

pablo-rodr-bio2 authored on 17/05/2021 17:29:04
Showing 10 changed files

... ...
@@ -1,9 +1,13 @@
1 1
 Package: GSVA
2 2
 <<<<<<< HEAD
3
+<<<<<<< HEAD
3 4
 Version: 1.39.31
4 5
 =======
5 6
 Version: 1.39.30
6 7
 >>>>>>> beautifying UI
8
+=======
9
+Version: 1.39.32
10
+>>>>>>> new css changes in dashboard
7 11
 Title: Gene Set Variation Analysis for microarray and RNA-seq data
8 12
 Authors@R: c(person("Justin", "Guinney", role=c("aut", "cre"), email="justin.guinney@sagebase.org"),
9 13
              person("Robert", "Castelo", role="aut", email="robert.castelo@upf.edu"),
... ...
@@ -9,30 +9,28 @@ argumentsDataUI <- function(id) {
9 9
       column(
10 10
         width = 12,
11 11
         align = "center",
12
-        h4("Parameters", style="font-weight: bold")
12
+        h4("PARAMETERS", style="font-weight: bold")
13 13
       )
14 14
     ),
15
-    wellPanel(
16
-      
17
-      selectInput(ns("method"), "Choose method:",
15
+    wellPanel( id= "args-well",
16
+      selectInput(ns("method"), "Method",
18 17
                   choices = methodChoices),
19
-      selectInput(ns("kcdf"), "Choose kcdf:",
18
+      selectInput(ns("kcdf"), "kcdf",
20 19
                   c("Gaussian","Poisson","none")),
21 20
       radioButtons(ns("absRanking"), "abs.ranking:",
22 21
                    c("False" = FALSE,
23 22
                      "True" = TRUE)),
24
-      numericInput(ns("minSz"),"min.sz:", value = 1),
25
-      numericInput(ns("maxSz"),"max.sz (Write 0 for infinite):", value = 0),
26
-      radioButtons(ns("mxDiff"), "mx.diff:",
23
+      numericInput(ns("minSz"),"min.sz", value = 1),
24
+      numericInput(ns("maxSz"),"max.sz (Write 0 for infinite)", value = 0),
25
+      radioButtons(ns("mxDiff"), "mx.diff",
27 26
                    c("True" = TRUE,
28 27
                      "False" = FALSE)),
29
-      numericInput(ns("tau"),"tau:", value = 1),
28
+      numericInput(ns("tau"),"tau", value = 1),
30 29
       radioButtons(ns("ssgseaNorm"), "ssgsea.norm:",
31 30
                    c("True" = TRUE,
32 31
                      "False" = FALSE))
33 32
     )
34 33
   )
35
-  
36 34
 }
37 35
 
38 36
 argumentsDataServer <- function(id){
... ...
@@ -1,15 +1,8 @@
1 1
 closeBtnUI <- function(id){
2 2
   ns <- NS(id)
3
-  hidden(actionButton(ns("closeSave"), "Save & Close", 
3
+  hidden(actionButton(ns("closeSave"), "SAVE & CLOSE", 
4 4
                       icon = icon("window-close"),
5
-                      width = "10vw",
6
-                      style = "color: #fff; 
7
-                      background-color: red;
8
-                      font-weight: bold;
9
-                      border-color: #fff;
10
-                      padding: 5px 5px 5px 5px;
11
-                      margin: 6px 5px 6px 15px;"
12
-                      ))
5
+                      width = "10vw"))
13 6
 }
14 7
 
15 8
 closeBtnServer <- function(id, gs){
... ...
@@ -1,14 +1,7 @@
1 1
 downloadUI <- function(id) {
2 2
   ns <- NS(id)
3 3
   hidden(
4
-    downloadButton(ns('downloadData'), 'Download',
5
-                   style = "color: #fff;
6
-                   background-color: #27ae60;
7
-                   font-weight: bold;
8
-                   border-color: #fff;
9
-                   padding: 5px 14px 5px 14px;
10
-                   margin: 6px 5px 6px 15px;
11
-                   width: 10vw;")) 
4
+    downloadButton(ns('downloadData'), 'DOWNLOAD')) 
12 5
 }
13 6
 
14 7
 downloadServer <- function(id, gs){
... ...
@@ -1,8 +1,9 @@
1 1
 geneSetsUI <- function(id){
2 2
   ns <- NS(id)
3 3
   div( id = ns("genesets-input"),
4
-    radioButtons(ns("genesetSourceType"), "Select Gene Sets:",
5
-                 c("From file" = "fileGeneset",
4
+    radioButtons(ns("genesetSourceType"), 
5
+                 label = h5("GENE SETS", style="font-weight: bold"),
6
+                 choices = c("From file" = "fileGeneset",
6 7
                    "From workspace" = "varGeneset")),
7 8
     conditionalPanel(
8 9
       condition = "input.genesetSourceType == 'fileGeneset'", ns = ns,
... ...
@@ -1,3 +1,4 @@
1
+### LOADING LIBRARIES
1 2
 library(shiny)
2 3
 library(shinythemes)
3 4
 library(plotly)
... ...
@@ -11,7 +12,17 @@ library(promises)
11 12
 library(shinyjs)
12 13
 library(shinybusy)
13 14
 library(shinydashboard)
15
+
16
+### there seems to be a problem with the DT package colliding with plotly
17
+### so first check if the package is loaded and if it is, unload it
18
+if("DT" %in% (.packages())) {
19
+  detach("package:DT", unload=TRUE)
20
+}
21
+
22
+### setting plan for futures
14 23
 plan(multisession)
24
+
25
+### sourcing all modules
15 26
 source("argumentsDataModule.R")
16 27
 source("modalGSVAModule.R")
17 28
 source("downloadModule.R")
... ...
@@ -23,6 +34,7 @@ source("geneSetsModule.R")
23 34
 source("argumentsDataModule.R")
24 35
 source("closeModule.R")
25 36
 
37
+### setting a global in "method" choices for gsva()
26 38
 methodChoices <- c( "GSVA" = "gsva",
27 39
                     "ssGSEA" = "ssgsea",
28 40
                     "zscore" = "zscore",
... ...
@@ -1,8 +1,9 @@
1 1
 matrixUI <- function(id){
2 2
   ns <- NS(id)
3 3
   div(id = ns("matrix-input"),
4
-    radioButtons(ns("matrixSourceType"), "Select Expression Data Matrix:",
5
-                 c("From file" = "fileMatrix",
4
+    radioButtons(ns("matrixSourceType"),
5
+                 label = h5("EXPRESSION DATA MATRIX", style="font-weight: bold"),
6
+                 choices = c("From file" = "fileMatrix",
6 7
                    "From workspace" = "varMatrix")),
7 8
     conditionalPanel(
8 9
       condition = "input.matrixSourceType == 'fileMatrix'", ns = ns,
... ...
@@ -200,7 +200,7 @@ function(input, output, session) {
200 200
     resultInformation <- data.frame("Nr of gene sets" = nrow(rv$gs),
201 201
                                     "Nr of samples" = ncol(rv$gs))
202 202
     resultInformation
203
-  })
203
+  }, bordered = TRUE)
204 204
   
205 205
   # TEXT2
206 206
   output$text2 <- renderUI({
... ...
@@ -12,26 +12,21 @@ dashboardPage(
12 12
     tags$head(
13 13
       tags$link(rel = "stylesheet", type = "text/css", href = "style.css")
14 14
     ),
15
-    fluidRow(
16
-      column(
17
-        width = 12,
18
-        align = "center",
19
-        h3("Data Input", style="font-weight: bold")
20
-      )
21
-    ),
22
-    # h3("Data input"),
15
+    div(h3("DATA INPUT", style="font-weight: bold"), align = "center"),
16
+    br(),
23 17
     matrixUI("matrix1"),
24 18
     br(),
25 19
     geneSetsUI("genes1"),
26 20
     br(),
27
-    radioButtons("arg", "Change default settings?",
21
+    radioButtons(inputId = "arg",
22
+                 label = h5("CHANGE DEFAULT SETTINGS?", style="font-weight: bold"),
28 23
                  c("No" = "no",
29 24
                    "Yes" = "yes")),
30 25
     br(),
31 26
     fluidRow(
32 27
       column(
33 28
         width = 12, align = "left",
34
-        actionButton("button", "Run", class = "run-btn", icon = icon("play-circle"),
29
+        actionButton("button", "RUN", class = "run-btn", icon = icon("play-circle"),
35 30
                      width = "10vw"),
36 31
         downloadUI("download"),
37 32
         closeBtnUI("close")
... ...
@@ -1,6 +1,7 @@
1
-#errorsGsva{color: red;
2
-font-size: 20px;
3
-font-weight: bold;
1
+#errorsGsva {
2
+  color: red;
3
+  font-size: 20px;
4
+  font-weight: bold;
4 5
 }
5 6
 
6 7
 #title_gsva {
... ...
@@ -17,10 +18,46 @@ font-weight: bold;
17 18
 
18 19
 #matrix1-matrix-input, #genes1-genesets-input {
19 20
   background-color: #708090;
21
+  border-radius: 15px;
22
+  padding-bottom: 5px;
23
+}
24
+
25
+#matrix1-matrixSourceType-label, #genes1-genesetSourceType-label {
26
+  background-color: #6495ED;
27
+  display: inline-block;
28
+  text-align: center;
29
+  width: 100%;
30
+  border-radius: 15px;
20 31
 }
21 32
 
22 33
 #arg {
23
-  background-color: #BC8F8F;
34
+  background-color: #708090;
35
+  border-radius: 15px;
36
+	padding: 12px 15px 12px 15px;
37
+}
38
+
39
+#args-well {
40
+  background: #708090;
41
+  color: white;
42
+}
43
+
44
+#download-downloadData {
45
+  color: #fff;
46
+  background-color: #27ae60;
47
+  font-weight: bold;
48
+  border-color: #fff;
49
+  padding: 5px 14px 5px 14px;
50
+  margin: 6px 5px 6px 15px;
51
+  width: 10vw;
52
+}
53
+
54
+#close-closeSave{
55
+  color: #fff;
56
+  background-color: red;
57
+  font-weight: bold;
58
+  border-color: #fff;
59
+  padding: 5px 5px 5px 5px;
60
+  margin: 6px 5px 6px 15px;
24 61
 }
25 62
 
26 63
 .left-side, .main-sidebar {