From 9415096fa0f3e200483e19d979218ce350c6e686 Mon Sep 17 00:00:00 2001 From: pfgherardini Date: Mon, 27 Aug 2018 17:28:36 -0700 Subject: [PATCH] fixed a problem with graph metadata when using the GUI --- DESCRIPTION | 2 +- README.md | 2 +- inst/shinyGUI/server.R | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index cc73124..ec12682 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: vite Type: Package Title: Analyzing single-cell data using graphs -Version: 0.4.2 +Version: 0.4.3 Authors@R: "Pier Federico Gherardini [aut, cre]" Description: This is a package for visualization and analysis of high-dimensional single-cell data using graphs diff --git a/README.md b/README.md index 822d9d6..77fd3fd 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ vite::vite_GUI() When the GUI starts you will be prompted to select a working directory. This directory must contain all the files that you want to include in the analysis. Select any file in that directory, and the directory that contains the file will be selected as working directory. -Note that if you are running an unsupervised graph analysis and you are including a file with samples metadata, this file needs to include a column called `filename` that matches the individual rows of the metadata table with the name of the `clustered.txt` files you are using as input for the analysis. +Note that if you are running an unsupervised graph analysis and you are including a file with samples metadata, this file needs to include a column called `filename` that matches the individual rows of the metadata table with the name of the `clustered.txt` files you are using as input for the analysis. Please refer to the documentation of the R function `get_unsupervised_graph_from_files` for more information about metadata diff --git a/inst/shinyGUI/server.R b/inst/shinyGUI/server.R index 8cfe0f2..e115244 100644 --- a/inst/shinyGUI/server.R +++ b/inst/shinyGUI/server.R @@ -115,8 +115,10 @@ shinyServer(function(input, output, session) { files.list <- file.path(working.directory, input$unsupervisedui_files_list) metadata.tab <- NULL - if(!is.null(input$unsupervisedui_metadata_file) && input$unsupervisedui_metadata_file != "") - metadata.tab <- read.table(input$unsupervisedui_metadata_file, header = TRUE, sep = "\t", check.names = FALSE, stringsAsFactors = FALSE) + if(!is.null(unsupervisedui.reactive.values$metadata.file) && unsupervisedui.reactive.values$metadata.file != "") + metadata.tab <- read.table(unsupervisedui.reactive.values$metadata.file, + header = TRUE, sep = "\t", check.names = FALSE, stringsAsFactors = FALSE) + G <- vite::get_unsupervised_graph_from_files( files.list = files.list,