From 36122d861ae2117aa19fe8f5404656e42e583e8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Barrero=20Rodr=C3=ADguez?= Date: Tue, 22 Mar 2022 18:01:27 +0100 Subject: [PATCH] Fix openRes bug in \\network --- Launcher/launch.R | 3 ++- ShinyApp/app.R | 9 +++++---- ShinyApp/public/index.html | 4 ++-- release.py | 5 ++++- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Launcher/launch.R b/Launcher/launch.R index 5620682..a7e24dc 100644 --- a/Launcher/launch.R +++ b/Launcher/launch.R @@ -12,4 +12,5 @@ launch.browser = function(appUrl, browser.path=chrome.portable) { shell(sprintf('"%s" --app=%s', browser.path, appUrl), wait=FALSE) } -runApp("ShinyApp", launch.browser = launch.browser) \ No newline at end of file +runApp("ShinyApp", launch.browser = launch.browser) +#runApp("ShinyApp", launch.browser = TRUE) \ No newline at end of file diff --git a/ShinyApp/app.R b/ShinyApp/app.R index 2df8b24..c2c0b87 100644 --- a/ShinyApp/app.R +++ b/ShinyApp/app.R @@ -212,9 +212,10 @@ calculatePvalues <- function(obj) { reportData <- cbind(reportData, pvalues_df) reportData <- data.frame(mapply('c', header, reportData)) - outDir <- dirname(obj$filePath) + outDir <- dirname(obj$filePath) # dirname changes \\ --> /, yielding error in \\tierra... + outDir <- gsub("/", "\\\\", outDir) # fix it //tierra... outFile <- paste("LIMMA", basename(obj$filePath), sep="_") - outPath <- paste(outDir, outFile, sep="/") + outPath <- paste(outDir, outFile, sep="\\") write.table(reportData, file = outPath, quote = F, sep = "\t", row.names = F, col.names = F, na="") @@ -279,11 +280,11 @@ server <- function (input, output, session) { }) observeEvent(input$openRes, { - shell.exec(dirname(input$openRes)) + shell.exec(gsub('/', '\\\\', dirname(input$openRes))) }) observeEvent(input$viewLogs, { - shell.exec(paste(getwd(), "log", paste(input$viewLogs, ".log", sep=""), sep="/")) + shell.exec(paste(getwd(), "log", paste(input$viewLogs, ".log", sep=""), sep="\\")) }) observeEvent(input$areYouAlive, { diff --git a/ShinyApp/public/index.html b/ShinyApp/public/index.html index 5d2946c..d42c529 100644 --- a/ShinyApp/public/index.html +++ b/ShinyApp/public/index.html @@ -4,7 +4,7 @@ - ReportStats-iSanXoT v0.2.1 + ReportStats-iSanXoT v0.2.2