mirror of
https://github.com/johrpan/geposanui.git
synced 2025-10-26 11:17:24 +01:00
Rearrange user interface
This commit is contained in:
parent
7b9a42215e
commit
fcd9b4ee05
2 changed files with 27 additions and 32 deletions
10
server.R
10
server.R
|
|
@ -86,17 +86,21 @@ server <- function(input, output) {
|
||||||
output$genes <- renderDT({
|
output$genes <- renderDT({
|
||||||
method_ids <- sapply(methods, function(method) method$id)
|
method_ids <- sapply(methods, function(method) method$id)
|
||||||
method_names <- sapply(methods, function(method) method$name)
|
method_names <- sapply(methods, function(method) method$name)
|
||||||
columns <- c("rank", "gene", "name", method_ids, "score")
|
columns <- c("rank", "gene", "name", "chromosome", method_ids, "score")
|
||||||
column_names <- c("", "Gene", "", method_names, "Score")
|
column_names <- c("", "Gene", "", "Chromosome", method_names, "Score")
|
||||||
|
|
||||||
dt <- datatable(
|
dt <- datatable(
|
||||||
results()[, ..columns],
|
results()[, ..columns],
|
||||||
rownames = FALSE,
|
rownames = FALSE,
|
||||||
colnames = column_names,
|
colnames = column_names,
|
||||||
style = "bootstrap",
|
style = "bootstrap",
|
||||||
|
extensions = "Scroller",
|
||||||
options = list(
|
options = list(
|
||||||
rowCallback = js_link,
|
rowCallback = js_link,
|
||||||
columnDefs = list(list(visible = FALSE, targets = 2))
|
columnDefs = list(list(visible = FALSE, targets = 2)),
|
||||||
|
deferRender = TRUE,
|
||||||
|
scrollY = 200,
|
||||||
|
scroller = TRUE
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
49
ui.R
49
ui.R
|
|
@ -8,9 +8,9 @@ source("methods.R")
|
||||||
ui <- fluidPage(
|
ui <- fluidPage(
|
||||||
rclipboardSetup(),
|
rclipboardSetup(),
|
||||||
titlePanel("TPE-OLD candidates"),
|
titlePanel("TPE-OLD candidates"),
|
||||||
column(
|
sidebarLayout(
|
||||||
width = 3,
|
sidebarPanel(
|
||||||
wellPanel(
|
width = 3,
|
||||||
h3("Filter criteria"),
|
h3("Filter criteria"),
|
||||||
selectInput(
|
selectInput(
|
||||||
"species",
|
"species",
|
||||||
|
|
@ -20,9 +20,16 @@ ui <- fluidPage(
|
||||||
"All qualified" = "all"
|
"All qualified" = "all"
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
uiOutput("n_species_slider")
|
uiOutput("n_species_slider"),
|
||||||
),
|
sliderInput(
|
||||||
wellPanel(
|
"cutoff",
|
||||||
|
"Cut-off score",
|
||||||
|
post = "%",
|
||||||
|
min = 0,
|
||||||
|
max = 100,
|
||||||
|
step = 1,
|
||||||
|
value = 50
|
||||||
|
),
|
||||||
h3("Ranking"),
|
h3("Ranking"),
|
||||||
lapply(methods, function(method) {
|
lapply(methods, function(method) {
|
||||||
sliderInput(
|
sliderInput(
|
||||||
|
|
@ -35,21 +42,12 @@ ui <- fluidPage(
|
||||||
value = 100
|
value = 100
|
||||||
)
|
)
|
||||||
}),
|
}),
|
||||||
sliderInput(
|
|
||||||
"cutoff",
|
|
||||||
"Cut-off score",
|
|
||||||
post = "%",
|
|
||||||
min = 0,
|
|
||||||
max = 100,
|
|
||||||
step = 1,
|
|
||||||
value = 50
|
|
||||||
),
|
|
||||||
checkboxInput(
|
checkboxInput(
|
||||||
"penalize",
|
"penalize",
|
||||||
"Penalize missing values"
|
"Penalize missing values"
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
wellPanel(
|
mainPanel(
|
||||||
h3("Results"),
|
h3("Results"),
|
||||||
textOutput("synposis"),
|
textOutput("synposis"),
|
||||||
div(
|
div(
|
||||||
|
|
@ -57,18 +55,13 @@ ui <- fluidPage(
|
||||||
uiOutput("copy")
|
uiOutput("copy")
|
||||||
),
|
),
|
||||||
div(
|
div(
|
||||||
style = "overflow-x: auto; overflow-y: auto; margin-top: 16px",
|
style = "margin-top: 16px",
|
||||||
DTOutput("genes")
|
DTOutput("genes")
|
||||||
)
|
),
|
||||||
)
|
|
||||||
),
|
|
||||||
column(
|
|
||||||
width = 8,
|
|
||||||
wellPanel(
|
|
||||||
h3("Gene positions"),
|
h3("Gene positions"),
|
||||||
p("This plot shows the selected genes' distance to the telomeres \
|
p("This plot shows the selected genes' distance to the telomeres \
|
||||||
across species. It visualizes how certain genes have \
|
across species. It visualizes how certain genes have \
|
||||||
evolutionary conserved positions."),
|
evolutionary conserved positions."),
|
||||||
div(
|
div(
|
||||||
style = "overflow-x: auto",
|
style = "overflow-x: auto",
|
||||||
div(
|
div(
|
||||||
|
|
@ -79,9 +72,7 @@ ui <- fluidPage(
|
||||||
height = "600px"
|
height = "600px"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
),
|
||||||
),
|
|
||||||
wellPanel(
|
|
||||||
h3("Gene set enrichment analysis"),
|
h3("Gene set enrichment analysis"),
|
||||||
checkboxInput(
|
checkboxInput(
|
||||||
"enable_gost",
|
"enable_gost",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue