Browse code

Updated vignette, documentation and NEWS file, corrected some messages and warnings.

Robert Castelo authored on 18/05/2021 21:31:15
Showing1 changed files
... ...
@@ -7,7 +7,7 @@ matrixUI <- function(id){
7 7
                    "From workspace" = "varMatrix")),
8 8
     conditionalPanel(
9 9
       condition = "input.matrixSourceType == 'fileMatrix'", ns = ns,
10
-      fileInput(ns("matrixFile"), "Choose matrix file:",
10
+      fileInput(ns("matrixFile"), "Choose expression data matrix file:",
11 11
                 accept = c(
12 12
                   "text/csv",
13 13
                   "text/comma-separated-values,text/plain",
... ...
@@ -15,7 +15,7 @@ matrixUI <- function(id){
15 15
     ),
16 16
     conditionalPanel(
17 17
       condition = "input.matrixSourceType == 'varMatrix'", ns= ns,
18
-      selectInput(ns("matrixVar"), "Choose matrix var:",
18
+      selectInput(ns("matrixVar"), "Choose expression data matrix object:",
19 19
                   ls(envir=.GlobalEnv))
20 20
     )
21 21
   )
... ...
@@ -40,4 +40,4 @@ matrixServer <- function(id){
40 40
       }
41 41
     })
42 42
   })
43
-}
44 43
\ No newline at end of file
44
+}
Browse code

new css changes in dashboard

pablo-rodr-bio2 authored on 17/05/2021 17:29:04
Showing1 changed files
... ...
@@ -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,
Browse code

beautifying UI

pablo-rodr-bio2 authored on 14/05/2021 09:37:52
Showing1 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 matrixUI <- function(id){
2 2
   ns <- NS(id)
3
-  tagList(
4
-    radioButtons(ns("matrixSourceType"), "Select expression data matrix:",
3
+  div(id = ns("matrix-input"),
4
+    radioButtons(ns("matrixSourceType"), "Select Expression Data Matrix:",
5 5
                  c("From file" = "fileMatrix",
6 6
                    "From workspace" = "varMatrix")),
7 7
     conditionalPanel(
Browse code

modules in shinyApp

pablo-rodr-bio2 authored on 12/04/2021 19:41:34
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,42 @@
1
+matrixUI <- function(id){
2
+  ns <- NS(id)
3
+  tagList(
4
+    radioButtons(ns("matrixSourceType"), "Select expression data matrix:",
5
+                 c("From file" = "fileMatrix",
6
+                   "From workspace" = "varMatrix")),
7
+    conditionalPanel(
8
+      condition = "input.matrixSourceType == 'fileMatrix'", ns = ns,
9
+      fileInput(ns("matrixFile"), "Choose matrix file:",
10
+                accept = c(
11
+                  "text/csv",
12
+                  "text/comma-separated-values,text/plain",
13
+                  ".csv",".ods",".xls",".xlt"))
14
+    ),
15
+    conditionalPanel(
16
+      condition = "input.matrixSourceType == 'varMatrix'", ns= ns,
17
+      selectInput(ns("matrixVar"), "Choose matrix var:",
18
+                  ls(envir=.GlobalEnv))
19
+    )
20
+  )
21
+}
22
+
23
+matrixServer <- function(id){
24
+  moduleServer( id, function(input, output, session){
25
+    matrix <- reactive({
26
+      if(input$matrixSourceType=="fileMatrix"){
27
+        if(is.null(input$matrixFile)) return(NULL) #this is in order to disable "run" btn
28
+        matrix <- data.matrix(read.csv(file=input$matrixFile$datapath, row.names = 1L))
29
+      } else {
30
+        if(is.null(input$matrixVar)) return(NULL)
31
+        matrix <- get(input$matrixVar)
32
+      }
33
+      matrix
34
+    }) %>% bindCache({
35
+      if(input$matrixSourceType == "fileMatrix"){
36
+        input$matrixFile$name
37
+      } else {
38
+        input$matrixVar
39
+      }
40
+    })
41
+  })
42
+}
0 43
\ No newline at end of file