mirror of
https://github.com/johrpan/geposanui.git
synced 2025-10-26 11:17:24 +01:00
Reindent code to use just two spaces
This commit is contained in:
parent
47b8d7a1f0
commit
13b5efc1e3
10 changed files with 1000 additions and 999 deletions
240
R/ui.R
240
R/ui.R
|
|
@ -4,136 +4,136 @@
|
|||
#'
|
||||
#' @noRd
|
||||
ui <- function(options) {
|
||||
div(
|
||||
shinyjs::useShinyjs(),
|
||||
rclipboard::rclipboardSetup(),
|
||||
navbarPage(
|
||||
id = "main_page",
|
||||
theme = bslib::bs_theme(
|
||||
version = 5,
|
||||
bootswatch = "united",
|
||||
primary = "#1964bf"
|
||||
),
|
||||
title = options$title,
|
||||
selected = "Results",
|
||||
tabPanel(
|
||||
"Input data",
|
||||
input_page_ui("input_page", options)
|
||||
),
|
||||
tabPanel(
|
||||
"Results",
|
||||
sidebarLayout(
|
||||
sidebarPanel(
|
||||
width = 3,
|
||||
methods_ui("methods"),
|
||||
filters_ui("filters")
|
||||
),
|
||||
mainPanel(
|
||||
width = 9,
|
||||
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",
|
||||
htmlOutput("comparison_text"),
|
||||
plotly::plotlyOutput(
|
||||
"boxplot",
|
||||
width = "100%",
|
||||
height = "600px"
|
||||
)
|
||||
)
|
||||
),
|
||||
tabPanel(
|
||||
title = "Scores by position",
|
||||
div(
|
||||
style = "margin-top: 16px",
|
||||
selectInput(
|
||||
"positions_plot_chromosome_name",
|
||||
label = NULL,
|
||||
choices = c(
|
||||
list("All chromosomes" = "all"),
|
||||
chromosome_choices()
|
||||
)
|
||||
),
|
||||
plotly::plotlyOutput(
|
||||
"positions_plot",
|
||||
width = "100%",
|
||||
height = "600px"
|
||||
)
|
||||
)
|
||||
),
|
||||
tabPanel(
|
||||
title = "Detailed results",
|
||||
results_ui("results")
|
||||
),
|
||||
tabPanel(
|
||||
title = "g:Profiler",
|
||||
div(
|
||||
style = "margin-top: 16px",
|
||||
plotly::plotlyOutput("gost_plot"),
|
||||
),
|
||||
div(
|
||||
style = "margin-top: 16px",
|
||||
DT::DTOutput("gost_details")
|
||||
)
|
||||
),
|
||||
tabPanel(
|
||||
title = "DisGeNET",
|
||||
div(
|
||||
style = "margin-top: 16px",
|
||||
DT::DTOutput("disgenet")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
div(
|
||||
shinyjs::useShinyjs(),
|
||||
rclipboard::rclipboardSetup(),
|
||||
navbarPage(
|
||||
id = "main_page",
|
||||
theme = bslib::bs_theme(
|
||||
version = 5,
|
||||
bootswatch = "united",
|
||||
primary = "#1964bf"
|
||||
),
|
||||
title = options$title,
|
||||
selected = "Results",
|
||||
tabPanel(
|
||||
"Input data",
|
||||
input_page_ui("input_page", options)
|
||||
),
|
||||
tabPanel(
|
||||
"Results",
|
||||
sidebarLayout(
|
||||
sidebarPanel(
|
||||
width = 3,
|
||||
methods_ui("methods"),
|
||||
filters_ui("filters")
|
||||
),
|
||||
mainPanel(
|
||||
width = 9,
|
||||
tabsetPanel(
|
||||
type = "pills",
|
||||
tabPanel(
|
||||
title = "Overview",
|
||||
div(
|
||||
style = "margin-top: 16px",
|
||||
plotly::plotlyOutput(
|
||||
"rank_plot",
|
||||
width = "100%",
|
||||
height = "600px"
|
||||
)
|
||||
)
|
||||
),
|
||||
tabPanel(
|
||||
title = "Publication"
|
||||
),
|
||||
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",
|
||||
htmlOutput("comparison_text"),
|
||||
plotly::plotlyOutput(
|
||||
"boxplot",
|
||||
width = "100%",
|
||||
height = "600px"
|
||||
)
|
||||
)
|
||||
),
|
||||
tabPanel(
|
||||
title = "Scores by position",
|
||||
div(
|
||||
style = "margin-top: 16px",
|
||||
selectInput(
|
||||
"positions_plot_chromosome_name",
|
||||
label = NULL,
|
||||
choices = c(
|
||||
list("All chromosomes" = "all"),
|
||||
chromosome_choices()
|
||||
)
|
||||
),
|
||||
plotly::plotlyOutput(
|
||||
"positions_plot",
|
||||
width = "100%",
|
||||
height = "600px"
|
||||
)
|
||||
)
|
||||
),
|
||||
tabPanel(
|
||||
title = "Detailed results",
|
||||
results_ui("results")
|
||||
),
|
||||
tabPanel(
|
||||
title = "g:Profiler",
|
||||
div(
|
||||
style = "margin-top: 16px",
|
||||
plotly::plotlyOutput("gost_plot"),
|
||||
),
|
||||
div(
|
||||
style = "margin-top: 16px",
|
||||
DT::DTOutput("gost_details")
|
||||
)
|
||||
),
|
||||
tabPanel(
|
||||
title = "DisGeNET",
|
||||
div(
|
||||
style = "margin-top: 16px",
|
||||
DT::DTOutput("disgenet")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
tabPanel(
|
||||
title = "Publication"
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
#' Generate a named list for choosing chromosomes.
|
||||
#' @noRd
|
||||
chromosome_choices <- function() {
|
||||
choices <- purrr::lmap(
|
||||
unique(geposan::genes$chromosome),
|
||||
function(name) {
|
||||
choice <- list(name)
|
||||
choices <- purrr::lmap(
|
||||
unique(geposan::genes$chromosome),
|
||||
function(name) {
|
||||
choice <- list(name)
|
||||
|
||||
names(choice) <- paste0(
|
||||
"Chromosome ",
|
||||
name
|
||||
)
|
||||
names(choice) <- paste0(
|
||||
"Chromosome ",
|
||||
name
|
||||
)
|
||||
|
||||
choice
|
||||
}
|
||||
)
|
||||
choice
|
||||
}
|
||||
)
|
||||
|
||||
choices[order(suppressWarnings(sapply(choices, as.integer)))]
|
||||
choices[order(suppressWarnings(sapply(choices, as.integer)))]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue