mirror of
https://github.com/johrpan/geposanui.git
synced 2025-10-26 19:27:24 +01:00
User interface and style improvements
This commit is contained in:
parent
447fdfab4f
commit
6938cb0d84
7 changed files with 62 additions and 44 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
#' @noRd
|
#' @noRd
|
||||||
comparison_editor_ui <- function(id, options) {
|
comparison_editor_ui <- function(id, options) {
|
||||||
verticalLayout(
|
verticalLayout(
|
||||||
h3("Comparison"),
|
h5("Comparison"),
|
||||||
selectInput(
|
selectInput(
|
||||||
NS(id, "comparison_genes"),
|
NS(id, "comparison_genes"),
|
||||||
"Comparison genes",
|
"Comparison genes",
|
||||||
|
|
|
||||||
14
R/details.R
14
R/details.R
|
|
@ -8,11 +8,15 @@ details_ui <- function(id) {
|
||||||
splitLayout(
|
splitLayout(
|
||||||
cellWidths = "auto",
|
cellWidths = "auto",
|
||||||
uiOutput(NS(id, "copy")),
|
uiOutput(NS(id, "copy")),
|
||||||
downloadButton(NS(id, "download"), "Download CSV")
|
downloadButton(
|
||||||
|
NS(id, "download"),
|
||||||
|
"Download CSV",
|
||||||
|
class = "btn-outline-primary"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
div(
|
div(
|
||||||
style = "margin-top: 16px",
|
style = "margin-top: 16px; margin-bottom: 8px;",
|
||||||
DT::DTOutput(NS(id, "genes"))
|
DT::DTOutput(NS(id, "genes"))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
@ -43,13 +47,15 @@ details_server <- function(id, options, results) {
|
||||||
"copy_ids_button",
|
"copy_ids_button",
|
||||||
"Copy gene IDs",
|
"Copy gene IDs",
|
||||||
genes_text,
|
genes_text,
|
||||||
icon = icon("clipboard")
|
icon = icon("clipboard"),
|
||||||
|
class = "btn-outline-primary"
|
||||||
),
|
),
|
||||||
rclipboard::rclipButton(
|
rclipboard::rclipButton(
|
||||||
"copy_names_button",
|
"copy_names_button",
|
||||||
"Copy gene names",
|
"Copy gene names",
|
||||||
names_text,
|
names_text,
|
||||||
icon = icon("clipboard")
|
icon = icon("clipboard"),
|
||||||
|
class = "btn-outline-primary"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,11 @@
|
||||||
filters_ui <- function(id) {
|
filters_ui <- function(id) {
|
||||||
div(
|
div(
|
||||||
class = "well",
|
class = "well",
|
||||||
style = "margin-top: 24px; margin-bottom: 16px; padding-top: 24px;",
|
style = "margin-top: 24px; margin-bottom: 16px;",
|
||||||
verticalLayout(
|
verticalLayout(
|
||||||
|
h5("Filter criteria"),
|
||||||
|
div(
|
||||||
|
style = "margin-top: 8px;",
|
||||||
radioButtons(
|
radioButtons(
|
||||||
NS(id, "method"),
|
NS(id, "method"),
|
||||||
label = NULL,
|
label = NULL,
|
||||||
|
|
@ -14,6 +17,7 @@ filters_ui <- function(id) {
|
||||||
"No filtering" = "none"
|
"No filtering" = "none"
|
||||||
),
|
),
|
||||||
inline = TRUE
|
inline = TRUE
|
||||||
|
)
|
||||||
),
|
),
|
||||||
tabsetPanel(
|
tabsetPanel(
|
||||||
id = NS(id, "sliders"),
|
id = NS(id, "sliders"),
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# Construct UI for the methods editor.
|
# Construct UI for the methods editor.
|
||||||
methods_ui <- function(id, options) {
|
methods_ui <- function(id, options) {
|
||||||
verticalLayout(
|
verticalLayout(
|
||||||
h3("Methods"),
|
h5("Methods"),
|
||||||
selectInput(
|
selectInput(
|
||||||
NS(id, "optimization_genes"),
|
NS(id, "optimization_genes"),
|
||||||
"Genes to optimize for",
|
"Genes to optimize for",
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ preset_editor_ui <- function(id, options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
verticalLayout(
|
verticalLayout(
|
||||||
h3("Inputs"),
|
h5("Inputs"),
|
||||||
selectInput(
|
selectInput(
|
||||||
NS(id, "species"),
|
NS(id, "species"),
|
||||||
"Species to include",
|
"Species to include",
|
||||||
|
|
|
||||||
56
R/results.R
56
R/results.R
|
|
@ -37,7 +37,22 @@ results_ui <- function(id, options) {
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
tabPanel(
|
tabPanel(
|
||||||
title = "Method comparison",
|
title = "Gene sets",
|
||||||
|
div(
|
||||||
|
style = "margin-top: 16px",
|
||||||
|
htmlOutput(NS(id, "comparison_text")),
|
||||||
|
div(
|
||||||
|
style = "margin-top: 16px;",
|
||||||
|
plotly::plotlyOutput(
|
||||||
|
NS(id, "boxplot"),
|
||||||
|
width = "100%",
|
||||||
|
height = "600px"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
tabPanel(
|
||||||
|
title = "Methods",
|
||||||
div(
|
div(
|
||||||
style = "margin-top: 16px",
|
style = "margin-top: 16px",
|
||||||
plotly::plotlyOutput(
|
plotly::plotlyOutput(
|
||||||
|
|
@ -100,29 +115,6 @@ results_ui <- function(id, options) {
|
||||||
height = "600px"
|
height = "600px"
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
tabPanel(
|
|
||||||
title = "Comparison",
|
|
||||||
div(
|
|
||||||
style = "margin-top: 16px",
|
|
||||||
htmlOutput(NS(id, "comparison_text")),
|
|
||||||
plotly::plotlyOutput(
|
|
||||||
NS(id, "boxplot"),
|
|
||||||
width = "100%",
|
|
||||||
height = "600px"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
tabPanel(
|
|
||||||
title = "Ortholog locations",
|
|
||||||
div(
|
|
||||||
style = "margin-top: 16px",
|
|
||||||
plotly::plotlyOutput(
|
|
||||||
NS(id, "gene_locations_plot"),
|
|
||||||
width = "100%",
|
|
||||||
height = "1200px"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
tabPanel(
|
tabPanel(
|
||||||
title = "Scores by position",
|
title = "Scores by position",
|
||||||
div(
|
div(
|
||||||
|
|
@ -143,6 +135,17 @@ results_ui <- function(id, options) {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
tabPanel(
|
||||||
|
title = "Ortholog locations",
|
||||||
|
div(
|
||||||
|
style = "margin-top: 16px",
|
||||||
|
plotly::plotlyOutput(
|
||||||
|
NS(id, "gene_locations_plot"),
|
||||||
|
width = "100%",
|
||||||
|
height = "1200px"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
tabPanel(
|
tabPanel(
|
||||||
title = "Detailed results",
|
title = "Detailed results",
|
||||||
details_ui(NS(id, "results"))
|
details_ui(NS(id, "results"))
|
||||||
|
|
@ -330,7 +333,10 @@ results_server <- function(id, options, analysis) {
|
||||||
if (!is.null(comparison)) {
|
if (!is.null(comparison)) {
|
||||||
div(
|
div(
|
||||||
reference_div,
|
reference_div,
|
||||||
div(HTML(comparison_text("comparison genes", comparison)))
|
div(
|
||||||
|
style = "margin-top: 16px;",
|
||||||
|
HTML(comparison_text("comparison genes", comparison))
|
||||||
|
)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
reference_div
|
reference_div
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,9 @@ custom_css <- function() {
|
||||||
"vertical-align: top;",
|
"vertical-align: top;",
|
||||||
"margin-right: 12px;",
|
"margin-right: 12px;",
|
||||||
"}",
|
"}",
|
||||||
".shiny-input-container { width: auto !important; min-width: 200px; }"
|
".shiny-input-container { width: auto !important; min-width: 200px; }",
|
||||||
|
"h5 { margin-top: 0.5rem; margin-bottom: 1rem; font-weight: bold; }",
|
||||||
|
".navbar-brand { font-weight: bold; }"
|
||||||
))
|
))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue