From b94e35dd1ce851151cadc3aeed6cea63aca27b0a Mon Sep 17 00:00:00 2001 From: Schultheis Date: Wed, 25 Apr 2018 08:32:42 +0200 Subject: [PATCH 1/3] geneView: do not enable plot until ALL mandatory fields are valid --- R/geneView.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/geneView.R b/R/geneView.R index 55f64c0..6061fdc 100644 --- a/R/geneView.R +++ b/R/geneView.R @@ -306,7 +306,7 @@ geneView <- function(input, output, session, data, metadata, level = NULL, plot. #enable plot button only if plot possible shiny::observe({ - if(is.null(input$genes) | length(selector$selectedColumns()) < 1){ + if(is.null(input$genes) || !shiny::isTruthy(selector$selectedColumns())){ shinyjs::disable("plot") }else if(input$plotType == "violin"){ factor1.levels <- metadata.r()[level == selector$type() & key %in% selector$selectedColumns() & factor1 != ""][, .N, keyby = factor1][["N"]] From 7e5c63c0de286b9198513ba140660a55b66b543f Mon Sep 17 00:00:00 2001 From: Schultheis Date: Wed, 25 Apr 2018 10:49:13 +0200 Subject: [PATCH 2/3] pca: fixed label & sub_label in types parameter --- R/pca.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/pca.R b/R/pca.R index 249af4f..ae49990 100644 --- a/R/pca.R +++ b/R/pca.R @@ -162,11 +162,11 @@ pca <- function(input, output, session, data, types, levels = NULL, entryLabel = shinyjs::reset("dimB") shinyjs::reset("pointsize") shinyjs::reset("labelsize") - columnSelect <<- shiny::callModule(columnSelector, "select", type.columns = shiny::reactive(types.r()[level %in% levels.r(), c("key", "level"), with = FALSE]), columnTypeLabel = "Column types to choose from") + columnSelect <<- shiny::callModule(columnSelector, "select", type.columns = shiny::reactive(types.r()[level %in% levels.r()]), columnTypeLabel = "Column types to choose from") clearPlot(TRUE) }) - columnSelect <- shiny::callModule(columnSelector, "select", type.columns = shiny::reactive(types.r()[level %in% levels.r(), c("key", "level"), with = FALSE]), columnTypeLabel = "Column types to choose from") + columnSelect <- shiny::callModule(columnSelector, "select", type.columns = shiny::reactive(types.r()[level %in% levels.r()]), columnTypeLabel = "Column types to choose from") output$datalevel <- shiny::renderUI({ shiny::selectInput(session$ns("select"), label = "select data level", choices = unique(levels.r())) From bad82bbed039ed06ac3dfc3c7f6a00fdced5d876 Mon Sep 17 00:00:00 2001 From: Schultheis Date: Wed, 25 Apr 2018 14:20:00 +0200 Subject: [PATCH 3/3] pca: fixed wrong variable name --- R/pca.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/pca.R b/R/pca.R index ae49990..8d4d166 100644 --- a/R/pca.R +++ b/R/pca.R @@ -111,7 +111,7 @@ pca <- function(input, output, session, data, types, levels = NULL, entryLabel = }) levels.r <- shiny::reactive({ if(is.null(levels)){ - metadata.r()[["level"]] + types.r()[["level"]] }else{ if(shiny::is.reactive(levels)){ levels()