diff --git a/R/server.R b/R/server.R index 33b17e1..d60ab97 100644 --- a/R/server.R +++ b/R/server.R @@ -160,7 +160,8 @@ server <- function(options) { method_names[[input$ranking_x]], method_names[[input$ranking_y]], gene_sets = gene_sets, - use_ranks = input$use_ranks + use_ranks = input$use_ranks, + use_sample = input$use_sample ) }) diff --git a/R/style.R b/R/style.R index 5eabdeb..a277fb2 100644 --- a/R/style.R +++ b/R/style.R @@ -8,7 +8,8 @@ custom_css <- function() { "display: inline-block;", "vertical-align: top;", "margin-right: 12px;", - "}" + "}", + ".shiny-input-container { width: auto !important; min-width: 200px; }" )) ) } diff --git a/R/ui.R b/R/ui.R index a84d05b..78aa37d 100644 --- a/R/ui.R +++ b/R/ui.R @@ -67,45 +67,54 @@ ui <- function(options) { tabPanel( title = "Method correlation", div( + class = "flow-layout", style = "margin-top: 16px", + selectInput( + "ranking_y", + label = NULL, + choices = ranking_choices + ), + span( + style = paste0( + "display: inline-block;", + "margin-right: 12px;", + "padding: 0.375rem 0.75rem;" + ), + "~" + ), + selectInput( + "ranking_x", + label = NULL, + choices = ranking_choices, + selected = "combined" + ), div( - class = "flow-layout", - selectInput( - "ranking_y", - label = NULL, - choices = ranking_choices + style = paste0( + "display: inline-block;", + "padding: 0.375rem 0.75rem;" ), - span( - style = paste0( - "display: inline-block;", - "margin-right: 12px;", - "padding: 0.375rem 0.75rem;" - ), - "~" - ), - selectInput( - "ranking_x", - label = NULL, - choices = ranking_choices, - selected = "combined" - ), - div( - style = paste0( - "display: inline-block;", - "padding: 0.375rem 0.75rem;" - ), - checkboxInput( - "use_ranks", - "Use ranks instead of scores", - value = TRUE - ) + checkboxInput( + "use_ranks", + "Use ranks instead of scores", + value = TRUE ) ), - plotly::plotlyOutput( - "ranking_correlation_plot", - width = "100%", - height = "600px" + div( + style = paste0( + "display: inline-block;", + "padding: 0.375rem 0.75rem;" + ), + checkboxInput( + "use_sample", + "Take random sample of genes", + value = TRUE + ) ) + ), + plotly::plotlyOutput( + "ranking_correlation_plot", + width = "100%", + height = "600px" ) ), tabPanel( @@ -134,6 +143,7 @@ ui <- function(options) { tabPanel( title = "Scores by position", div( + class = "flow-layout", style = "margin-top: 16px", selectInput( "positions_plot_chromosome_name",