From 47b8d7a1f03f88df3924a87411994d5d199ede2e Mon Sep 17 00:00:00 2001 From: Elias Projahn Date: Mon, 23 May 2022 11:39:30 +0200 Subject: [PATCH] Show all chromosomes in position plot by default --- R/server.R | 8 +++++++- R/ui.R | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/R/server.R b/R/server.R index 41da59a..19fc351 100644 --- a/R/server.R +++ b/R/server.R @@ -189,9 +189,15 @@ server <- function(options) { ) } + chromosome <- if (input$positions_plot_chromosome_name == "all") { + NULL + } else { + input$positions_plot_chromosome_name + } + geposan::plot_scores_by_position( ranking(), - input$positions_plot_chromosome_name, + chromosome_name = chromosome, gene_sets = gene_sets ) }) diff --git a/R/ui.R b/R/ui.R index 587dc94..70dc0e1 100644 --- a/R/ui.R +++ b/R/ui.R @@ -73,7 +73,10 @@ ui <- function(options) { selectInput( "positions_plot_chromosome_name", label = NULL, - choices = chromosome_choices() + choices = c( + list("All chromosomes" = "all"), + chromosome_choices() + ) ), plotly::plotlyOutput( "positions_plot",