From aaff5878ecddeaeff4fc306170cc22c4bce59abf Mon Sep 17 00:00:00 2001 From: Elias Projahn Date: Fri, 15 Oct 2021 13:59:00 +0200 Subject: [PATCH] Organize output in tabs --- server.R | 8 +++--- ui.R | 83 +++++++++++++++++++++++++++++++------------------------- 2 files changed, 50 insertions(+), 41 deletions(-) diff --git a/server.R b/server.R index c6ba4f9..91ed9e8 100644 --- a/server.R +++ b/server.R @@ -100,6 +100,7 @@ server <- function(input, output) { rownames = FALSE, colnames = column_names, style = "bootstrap", + fillContainer = TRUE, extensions = "Scroller", options = list( rowCallback = js_link, @@ -137,19 +138,18 @@ server <- function(input, output) { names_text <- paste(names, collapse = "\n") splitLayout( + cellWidths = "auto", rclipButton( "copy_ids_button", "Copy gene IDs", genes_text, - icon = icon("clipboard"), - width = "100%" + icon = icon("clipboard") ), rclipButton( "copy_names_button", "Copy gene names", names_text, - icon = icon("clipboard"), - width = "100%" + icon = icon("clipboard") ) ) }) diff --git a/ui.R b/ui.R index 147f048..a728617 100644 --- a/ui.R +++ b/ui.R @@ -48,43 +48,52 @@ ui <- fluidPage( ), ), mainPanel( - h3("Gene ranks"), - plotlyOutput( - "rank_plot", - width = "100%", - height = "600px" - ), - h3("Results"), - textOutput("synposis"), - div( - style = "margin-top: 16px", - uiOutput("copy") - ), - div( - style = "margin-top: 16px", - DTOutput("genes") - ), - h3("Gene positions"), - p("This plot shows the selected genes' distance to the telomeres \ - across species. It visualizes how certain genes have \ - evolutionary conserved positions."), - plotlyOutput( - "scatter", - width = "100%", - height = "600px" - ), - h3("Gene set enrichment analysis"), - 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" + tabsetPanel( + type = "pills", + header = div(style = "margin-top: 16px"), + tabPanel( + "Results", + textOutput("synposis"), + div( + style = "margin-top: 16px", + uiOutput("copy") + ), + div( + style = "margin-top: 16px", + DTOutput("genes", height = "1000px") + ) + ), + tabPanel( + "Positions", + plotlyOutput( + "scatter", + width = "100%", + height = "600px" + ) + ), + tabPanel( + "Ranks", + plotlyOutput( + "rank_plot", + width = "100%", + height = "600px" + ) + ), + tabPanel( + "Analysis", + 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" + ) + ) ) ) )