From 0ac9b23f1d8029f57fffe71a986cb93f211d05e5 Mon Sep 17 00:00:00 2001 From: pfgherardini Date: Wed, 5 Dec 2018 11:26:02 -0800 Subject: [PATCH] fixed problem with shiny 1.2, closes #4 --- DESCRIPTION | 4 ++-- R/plot_data.R | 4 ++-- inst/shinyGUI/server/tab_graph.R | 4 +++- man/plot_clusters.Rd | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e53eaf7..1076d61 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: panorama Title: Visualize and compare flow cytometry data Description: This package is an interactive GUI for visualizing and anlyzing graphs representing single-cell data -Version: 0.1.0 +Version: 0.1.1 Authors@R: "Pier Federico Gherardini [aut, cre]" Depends: License: GPL v3 @@ -20,4 +20,4 @@ Imports: stringr, gplots LazyData: true -RoxygenNote: 6.0.1 +RoxygenNote: 6.1.0 diff --git a/R/plot_data.R b/R/plot_data.R index b9312f4..7e0df58 100644 --- a/R/plot_data.R +++ b/R/plot_data.R @@ -93,7 +93,7 @@ load_clusters_data <- function(clusters, samples, dir.prefix, skip.missing = FAL ret$sample <- x$samples[1] return(ret) }) - + return(do.call(rbind, ret)) @@ -133,7 +133,7 @@ plot_clusters <- function(G, clusters, col.names, working.dir, plot.type, pool.c cl.labels <- V(G)$Label[clusters] clusters.data <- NULL - + if(is.null(V(G)$sample) && is.null(samples.to.plot)) { # Load the pooled data pooled.data.dir <- tools::file_path_sans_ext(igraph::get.graph.attribute(G, "fname")) clusters.data <- load_rds_data(cl.labels, file.path(working.dir, "clusters_data", "pooled", pooled.data.dir)) diff --git a/inst/shinyGUI/server/tab_graph.R b/inst/shinyGUI/server/tab_graph.R index 47f490c..28a7fff 100644 --- a/inst/shinyGUI/server/tab_graph.R +++ b/inst/shinyGUI/server/tab_graph.R @@ -312,7 +312,9 @@ output$graphui_viscontrol <- reactive({ observe({ - updateSliderInput(session, "graphui_color_scale_lim", min = input$graphui_color_scale_min, + if(!is.null(input$graphui_color_scale_min) && + !is.null(input$graphui_color_scale_max)) + updateSliderInput(session, "graphui_color_scale_lim", min = input$graphui_color_scale_min, max = input$graphui_color_scale_max) }) diff --git a/man/plot_clusters.Rd b/man/plot_clusters.Rd index b51308a..ca3b743 100644 --- a/man/plot_clusters.Rd +++ b/man/plot_clusters.Rd @@ -5,8 +5,8 @@ \title{Plot clusters data} \usage{ plot_clusters(G, clusters, col.names, working.dir, plot.type, - pool.clusters = FALSE, pool.samples = FALSE, samples.to.plot = NULL, - facet.by = "Sample") + pool.clusters = FALSE, pool.samples = FALSE, + samples.to.plot = NULL, facet.by = "Sample") } \arguments{ \item{G}{An \code{igraph} graph object}