mirror of
https://github.com/johrpan/ubigen.git
synced 2025-10-26 19:57:24 +01:00
Structure results using tabs
This commit is contained in:
parent
7f69b26a49
commit
6fb91e0eff
2 changed files with 25 additions and 24 deletions
|
|
@ -30,9 +30,9 @@ server <- function(input, output, session) {
|
||||||
observeEvent(custom_genes(),
|
observeEvent(custom_genes(),
|
||||||
{ # nolint
|
{ # nolint
|
||||||
if (length(custom_genes()) > 0) {
|
if (length(custom_genes()) > 0) {
|
||||||
updateTabsetPanel(session, "custom_genes_panel", selected = "show")
|
updateTabsetPanel(session, "results_panel", selected = "custom_genes")
|
||||||
} else {
|
} else if (input$results_panel == "custom_genes") {
|
||||||
updateTabsetPanel(session, "custom_genes_panel", selected = "hide")
|
updateTabsetPanel(session, "results_panel", selected = "top_genes")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ignoreNULL = FALSE
|
ignoreNULL = FALSE
|
||||||
|
|
|
||||||
43
R/ui.R
43
R/ui.R
|
|
@ -55,32 +55,33 @@ ui <- function() {
|
||||||
),
|
),
|
||||||
mainPanel(
|
mainPanel(
|
||||||
width = 9,
|
width = 9,
|
||||||
h3("Overview"),
|
|
||||||
plotly::plotlyOutput("overview_plot", height = "200px"),
|
plotly::plotlyOutput("overview_plot", height = "200px"),
|
||||||
tabsetPanel(
|
tabsetPanel(
|
||||||
id = "custom_genes_panel",
|
id = "results_panel",
|
||||||
type = "hidden",
|
selected = "top_genes",
|
||||||
tabPanelBody("hide"),
|
header = div(class = "p-2"),
|
||||||
tabPanelBody(
|
tabPanel(
|
||||||
"show",
|
"Your genes",
|
||||||
h3("Your genes"),
|
value = "custom_genes",
|
||||||
htmlOutput("custom_genes_synopsis"),
|
htmlOutput("custom_genes_synopsis"),
|
||||||
plotly::plotlyOutput("custom_genes_boxplot")
|
plotly::plotlyOutput("custom_genes_boxplot")
|
||||||
|
),
|
||||||
|
tabPanel(
|
||||||
|
"Top genes",
|
||||||
|
value = "top_genes",
|
||||||
|
div(paste0(
|
||||||
|
"Hover over the markers to see details on each gene. Click or ",
|
||||||
|
"drag within the figure to select genes of interest."
|
||||||
|
)),
|
||||||
|
plotly::plotlyOutput("scores_plot"),
|
||||||
|
div(paste0(
|
||||||
|
"Click on gene names to view them using the Ensembl genome ",
|
||||||
|
"browser."
|
||||||
|
)),
|
||||||
|
div(class = "p-1"),
|
||||||
|
DT::dataTableOutput("selected_genes")
|
||||||
)
|
)
|
||||||
),
|
)
|
||||||
h3("Focus on top genes"),
|
|
||||||
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")
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue