mirror of
https://github.com/johrpan/geposanui.git
synced 2025-10-26 11:17:24 +01:00
Further simplify results section
This commit is contained in:
parent
f318cde5e7
commit
ffa90cd667
2 changed files with 65 additions and 101 deletions
42
R/server.R
42
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<br> \
|
||||
Mean rank of reference genes: %s<br> \
|
||||
First rank of reference genes: %s<br> \
|
||||
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(
|
||||
|
|
|
|||
124
R/ui.R
124
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"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue