diff --git a/R/server.R b/R/server.R
index a7488cc..e5e21b1 100644
--- a/R/server.R
+++ b/R/server.R
@@ -107,44 +107,6 @@ server <- function(input, output, session) {
geposan::plot_positions(preset$species_ids, gene_sets)
})
- output$assessment_synopsis <- renderText({
- reference_gene_ids <- preset()$reference_gene_ids
-
- included_reference_count <- results_filtered()[
- gene %chin% reference_gene_ids,
- .N
- ]
-
- reference_results <- results()[gene %chin% reference_gene_ids]
- total_reference_count <- nrow(reference_results)
-
- if (total_reference_count > 0) {
- mean_rank <- as.character(round(
- reference_results[, mean(rank)],
- digits = 1
- ))
-
- min_rank <- as.character(reference_results[, min(rank)])
- max_rank <- as.character(reference_results[, max(rank)])
- } else {
- mean_rank <- "Unknown"
- min_rank <- "Unknown"
- max_rank <- "Unknown"
- }
-
- sprintf(
- "Included reference genes: %i/%i
\
- Mean rank of reference genes: %s
\
- First rank of reference genes: %s
\
- Last rank of reference genes: %s",
- included_reference_count,
- total_reference_count,
- mean_rank,
- min_rank,
- max_rank
- )
- })
-
output$rank_plot <- plotly::renderPlotly({
preset <- preset()
gene_sets <- list("Reference genes" = preset$reference_gene_ids)
@@ -210,10 +172,6 @@ server <- function(input, output, session) {
geposan::plot_boxplot(ranking(), gene_sets)
})
- output$chromosome_plot <- plotly::renderPlotly({
- geposan::plot_chromosomes(ranking())
- })
-
output$gost <- plotly::renderPlotly({
if (input$enable_gost) {
result <- gprofiler2::gost(
diff --git a/R/ui.R b/R/ui.R
index a5c5b5c..12ef353 100644
--- a/R/ui.R
+++ b/R/ui.R
@@ -8,7 +8,7 @@ ui <- div(
primary = "#1c71d8"
),
title = "TPE-OLD candidates",
- selected = "Ranking",
+ selected = "Results",
tabPanel(
"Input data",
sidebarLayout(
@@ -28,7 +28,7 @@ ui <- div(
),
),
tabPanel(
- "Ranking",
+ "Results",
sidebarLayout(
sidebarPanel(
width = 3,
@@ -37,68 +37,74 @@ ui <- div(
),
mainPanel(
width = 9,
- div(
- style = "margin-top: 16px",
- plotly::plotlyOutput(
- "rank_plot",
- width = "100%",
- height = "600px"
+ tabsetPanel(
+ type = "pills",
+ tabPanel(
+ title = "Overview",
+ div(
+ style = "margin-top: 16px",
+ plotly::plotlyOutput(
+ "rank_plot",
+ width = "100%",
+ height = "600px"
+ )
+ )
+ ),
+ tabPanel(
+ title = "Methods & Distribution",
+ div(
+ style = "margin-top: 16px",
+ plotly::plotlyOutput(
+ "rankings_plot",
+ width = "100%",
+ height = "600px"
+ )
+ )
+ ),
+ tabPanel(
+ title = "Comparison",
+ div(
+ style = "margin-top: 16px",
+ plotly::plotlyOutput(
+ "boxplot",
+ width = "100%",
+ height = "600px"
+ )
+ )
+ ),
+ tabPanel(
+ title = "Detailed results",
+ div(
+ style = "margin-top: 16px",
+ uiOutput("copy"),
+ ),
+ div(
+ style = "margin-top: 16px",
+ DT::DTOutput("genes")
+ )
+ ),
+ tabPanel(
+ title = "g:Profiler",
+ checkboxInput(
+ "enable_gost",
+ "Perform a gene set enrichment analysis on the \
+ filtered result genes."
+ ),
+ conditionalPanel(
+ "input.enable_gost == true",
+ plotly::plotlyOutput(
+ "gost",
+ width = "100%",
+ height = "600px"
+ )
+ )
)
- ),
- div(
- style = "margin-top: 16px",
- plotly::plotlyOutput(
- "rankings_plot",
- width = "100%",
- height = "600px"
- )
- ),
+ )
)
- ),
- ),
- tabPanel(
- "Detailed results",
- uiOutput("copy"),
- div(
- style = "margin-top: 16px",
- DT::DTOutput("genes")
)
),
tabPanel(
- "Assessment",
- htmlOutput("assessment_synopsis"),
- div(
- style = "margin-top: 16px",
- plotly::plotlyOutput(
- "boxplot",
- width = "100%",
- height = "600px"
- )
- ),
- div(
- style = "margin-top: 16px",
- plotly::plotlyOutput(
- "chromosome_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",
- plotly::plotlyOutput(
- "gost",
- width = "100%",
- height = "600px"
- )
- )
+ title = "Publication"
)
)
)