results: Add new chromosome overview plot

This commit is contained in:
Elias Projahn 2023-11-11 09:51:31 +01:00
parent e2ba8586c4
commit 1dc6315e78

View file

@ -125,14 +125,16 @@ results_ui <- function(id, options) {
NS(id, "positions_plot_chromosome_name"),
label = NULL,
choices = c(
list("All chromosomes" = "all"),
list(
"Chromosome overview" = "overview",
"All chromosomes" = "all"
),
chromosome_choices()
)
),
plotly::plotlyOutput(
htmlOutput(
NS(id, "positions_plot"),
width = "100%",
height = "600px"
container = \(...) div(style = "width: 100%; height: 600px", ...)
)
)
),
@ -410,8 +412,12 @@ results_server <- function(id, options, analysis) {
)
})
output$positions_plot <- plotly::renderPlotly({
output$positions_plot <- renderUI({
preset <- preset()
if (input$positions_plot_chromosome_name == "overview") {
geposan::plot_chromosomes(ranking())
} else {
gene_sets <- list("Reference genes" = preset$reference_gene_ids)
comparison_gene_ids <- comparison_gene_ids()
@ -433,6 +439,7 @@ results_server <- function(id, options, analysis) {
chromosome_name = chromosome,
gene_sets = gene_sets
)
}
})
gsea_server("gsea", results)