From 686af3f44bb3090ab5089fc49eeaefd7f6852024 Mon Sep 17 00:00:00 2001 From: Elias Projahn Date: Thu, 7 Oct 2021 12:42:36 +0200 Subject: [PATCH] Disable gost by default --- server.R | 8 ++++++-- ui.R | 16 ++++++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/server.R b/server.R index c350986..8948c35 100644 --- a/server.R +++ b/server.R @@ -116,7 +116,11 @@ server <- function(input, output) { }) output$gost <- renderPlotly({ - result <- gost(results()[, gene], ordered_query = TRUE) - gostplot(result, capped = FALSE, interactive = TRUE) + if (input$enable_gost) { + result <- gost(results()[, gene], ordered_query = TRUE) + gostplot(result, capped = FALSE, interactive = TRUE) + } else { + NULL + } }) } \ No newline at end of file diff --git a/ui.R b/ui.R index bb48778..a162974 100644 --- a/ui.R +++ b/ui.R @@ -86,10 +86,18 @@ ui <- fluidPage( ), wellPanel( h3("Gene set enrichment analysis"), - plotlyOutput( - "gost", - width = "100%", - height = "600px" + checkboxInput( + "enable_gost", + "Perform a gene set enrichment analysis on the filtered result \ + genes." + ), + conditionalPanel( + "input.enable_gost == true", + plotlyOutput( + "gost", + width = "100%", + height = "600px" + ) ) ) )