mirror of
https://github.com/johrpan/geposanui.git
synced 2025-10-26 19:27:24 +01:00
Reorganize source files and generalize presets
This commit is contained in:
parent
8104e9bd8a
commit
68354bf808
14 changed files with 119 additions and 147 deletions
116
shiny/ui.R
Normal file
116
shiny/ui.R
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
library(DT)
|
||||
library(plotly)
|
||||
library(rclipboard)
|
||||
library(shiny)
|
||||
|
||||
ui <- fluidPage(
|
||||
shinyjs::useShinyjs(),
|
||||
rclipboardSetup(),
|
||||
titlePanel("TPE-OLD candidates"),
|
||||
sidebarLayout(
|
||||
sidebarPanel(
|
||||
width = 3,
|
||||
h3("Filter criteria"),
|
||||
selectInput(
|
||||
"species",
|
||||
"Species to include",
|
||||
choices = list(
|
||||
"Replicatively aging" = "replicative",
|
||||
"All qualified" = "all"
|
||||
)
|
||||
),
|
||||
uiOutput("n_species_slider"),
|
||||
sliderInput(
|
||||
"cutoff",
|
||||
"Cut-off score",
|
||||
post = "%",
|
||||
min = 0,
|
||||
max = 100,
|
||||
step = 1,
|
||||
value = 50
|
||||
),
|
||||
h3("Methods"),
|
||||
actionButton(
|
||||
"optimize_button",
|
||||
"Find optimal weights",
|
||||
icon = icon("check-double")
|
||||
),
|
||||
div(style = "margin-top: 16px"),
|
||||
lapply(methods, function(method) {
|
||||
verticalLayout(
|
||||
checkboxInput(
|
||||
method$id,
|
||||
span(
|
||||
method$description,
|
||||
style = "font-weight: bold"
|
||||
),
|
||||
value = TRUE
|
||||
),
|
||||
sliderInput(
|
||||
sprintf("%s_weight", method$id),
|
||||
NULL,
|
||||
post = "%",
|
||||
min = 0,
|
||||
max = 100,
|
||||
step = 1,
|
||||
value = 100
|
||||
)
|
||||
)
|
||||
}),
|
||||
checkboxInput(
|
||||
"penalize",
|
||||
"Penalize missing values"
|
||||
),
|
||||
),
|
||||
mainPanel(
|
||||
tabsetPanel(
|
||||
type = "pills",
|
||||
header = div(style = "margin-top: 16px"),
|
||||
tabPanel(
|
||||
"Results",
|
||||
uiOutput("copy"),
|
||||
div(
|
||||
style = "margin-top: 16px",
|
||||
DTOutput("genes", height = "1000px")
|
||||
)
|
||||
),
|
||||
tabPanel(
|
||||
"Positions",
|
||||
plotlyOutput(
|
||||
"scatter",
|
||||
width = "100%",
|
||||
height = "600px"
|
||||
)
|
||||
),
|
||||
tabPanel(
|
||||
"Assessment",
|
||||
htmlOutput("assessment_synopsis"),
|
||||
div(
|
||||
style = "margin-top: 16px",
|
||||
plotlyOutput(
|
||||
"rank_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",
|
||||
plotlyOutput(
|
||||
"gost",
|
||||
width = "100%",
|
||||
height = "600px"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue