ubigen/R/ui.R

95 lines
2.5 KiB
R
Raw Normal View History

2022-05-07 17:54:23 +02:00
#' Function for creating the main user interface.
#' @noRd
ui <- function() {
2022-05-30 19:32:19 +02:00
navbarPage(
theme = bslib::bs_theme(
version = 5,
bootswatch = "united",
primary = "#7d19bf"
),
title = "Ubigen",
2022-05-30 21:27:18 +02:00
header = custom_css(),
2022-05-30 19:32:19 +02:00
tabPanel(
"Explore",
sidebarLayout(
sidebarPanel(
width = 3,
2022-05-30 21:27:18 +02:00
h3("My genes"),
gene_selector_ui("custom_genes"),
h3("Scoring"),
2022-05-30 20:22:42 +02:00
selectInput(
"cross_sample_metric",
2022-05-30 19:32:19 +02:00
verticalLayout(
2022-05-30 21:59:40 +02:00
strong("Expression across samples"),
paste0(
"Proportion samples in which the gene is expressed above the ",
"selected threshold. Select a method and a weight for the ",
"final score."
)
2022-05-30 19:32:19 +02:00
),
2022-05-30 20:22:42 +02:00
list(
"Above 95th percentile" = "above_95",
"Above median" = "above_median",
"Above zero" = "above_zero"
)
2022-05-30 19:32:19 +02:00
),
sliderInput(
2022-05-30 20:22:42 +02:00
"cross_sample_weight",
label = NULL,
2022-05-30 19:32:19 +02:00
min = -1.0,
max = 1.0,
step = 0.01,
2022-05-30 20:25:50 +02:00
value = 0.5
2022-05-30 19:32:19 +02:00
),
sliderInput(
"sd_expression",
verticalLayout(
strong("Standard deviation"),
2022-05-30 20:25:50 +02:00
"Standard deviation of the gene's expression across all samples."
2022-05-30 19:32:19 +02:00
),
min = -1.0,
max = 1.0,
step = 0.01,
2022-05-30 20:25:50 +02:00
value = -0.5
2022-05-30 19:32:19 +02:00
)
2022-05-07 17:54:23 +02:00
),
2022-05-30 19:32:19 +02:00
mainPanel(
width = 9,
2022-05-30 21:59:40 +02:00
h3("Overview"),
2022-05-30 20:08:54 +02:00
plotly::plotlyOutput("overview_plot", height = "200px"),
2022-05-30 21:59:40 +02:00
tabsetPanel(
id = "custom_genes_panel",
type = "hidden",
tabPanelBody("hide"),
tabPanelBody(
"show",
h3("Your genes"),
htmlOutput("custom_genes_synopsis"),
plotly::plotlyOutput("custom_genes_boxplot")
)
),
h3("Focus on top genes"),
2022-05-30 19:32:19 +02:00
div(paste0(
"Click or drag within the figure to select genes of ",
"interest."
)),
plotly::plotlyOutput("scores_plot"),
h3("Detailed ranking"),
div(paste0(
"Click on gene names to view them using the Ensembl ",
"genome browser."
)),
div(class = "p-1"),
DT::dataTableOutput("selected_genes")
2022-05-07 17:54:23 +02:00
)
2022-05-30 19:32:19 +02:00
)
),
tabPanel(
title = "Help"
),
tabPanel(
title = "Publication"
2022-05-07 17:54:23 +02:00
)
2022-05-30 19:32:19 +02:00
)
2022-05-07 17:54:23 +02:00
}