-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathapp_ui.R
119 lines (99 loc) · 4.26 KB
/
app_ui.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#' Shiny application user interface
#'
#' @param request Internal parameter for `{shiny}`.
#' @noRd
app_ui = function(request) {
data_dir <- get_data_dir()
shiny::tagList(
shinyjs::useShinyjs(),
shinybrowser::detect(),
shiny::navbarPage(
# title
title = place_title_logo(),
header = add_ext_resources(data_dir),
# theme
theme = bslib::bs_theme(version = 4,
bootswatch = "minty",
bg = "#EBEEEE",
fg = "#002147",
primary = "#003E74",
secondary = "#9D9D9D"),
# Input widgets
shiny::tabPanel(
title = "Data",
shiny::fluidRow(
shiny::column(12,
# use details and summary to create expandable section
htmltools::tags$details(
# preview of expandable section
htmltools::tags$summary("Cluster statistics (click to expand)"),
shiny::br(),
# text to print choice
shiny::textOutput("select_text"),
shiny::br(),
# output options
shiny::tabsetPanel(id = "plot_tabs",
# Tables tab
tablesUI("table1"),
# Plots tab
plotsUI("plot1"),
# RDS tab
rdsUI("rds1")
)
)
)
), # end fluid row
# Bottom row - show tree (static html output from tfpscanner)
shiny::fluidRow(
shiny::column(12,
id="view-container",
shiny::div(id="view-selection",
htmltools::tags$details(
id="sidebar-toggle",
open="open",
`aria-role`="button",
`aria-label`="Toggle sidebar visibility",
htmltools::tags$summary(
shiny::span(">>"),
shiny::span("<<")
)
),
# choose type of treeview
shiny::selectInput(inputId = "widgetChoice",
label = "View",
choices = c("None" = ""),
selectize = FALSE),
# choose type of mutation
shiny::selectInput(inputId = "mutationChoice",
label = "Mutation",
choices = character(0),
selectize = FALSE),
# choose type of sequence
shiny::selectInput(inputId = "sequenceChoice",
label = "Sequence",
choices = NULL,
selectize = FALSE),
),
shiny::div(id="view-graphic",
# markdown files to add description
shiny::uiOutput("tree_md_files"),
# show treeview widget
shiny::wellPanel(
ggiraph::girafeOutput("treeview"),
style = "background: white; height: 1800px;",
),
shiny::br()
)
)
) # end fluid row
), # end "data" page
# about page
shiny::tabPanel(
title = "About",
shiny::includeMarkdown(system.file("app", "www", "content", "about.md",
package = "tfpbrowser",
mustWork = TRUE))
)
) # end navbar page
) # end tag list
}