This repository has been archived by the owner on Aug 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
171 lines (164 loc) · 6.38 KB
/
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
library(shiny)
shinyUI(fluidPage(
# Application title
titlePanel(paste("Minimum spanning networks in", "poppr")),
sidebarLayout(
sidebarPanel(
tags$h5("status"),
conditionalPanel(condition="!$('html').hasClass('shiny-busy')",
tagAppendChild(tags$div(class="progress"),
tagAppendChild(tags$div(class="progress-bar progress-bar-success",
role="progressbar", `aria-valuenow`="100",
`aria-valuemin`="0", `aria-valuemax`="100",
style="width: 100%"), tags$strong("ready")))
),
conditionalPanel(condition="$('html').hasClass('shiny-busy')",
tagAppendChild(tags$div(class="progress"),
tagAppendChild(tags$div(class="progress-bar progress-bar-striped active",
role="progressbar", `aria-valuenow`="100",
`aria-valuemin`="0", `aria-valuemax`="100",
style="width: 100%"), tags$strong("loading")))
),
tagAppendChildren(
tags$div(style="display:inline-block"),
list(
actionButton("submit", "Go!", icon("check-circle")),
actionButton("update-data", "reData", icon("refresh")),
actionButton("update-graph", "reGraph", icon("refresh"))
)
),
h3("Data Parameters"),
uiOutput("selectUI"),
uiOutput("selectPops"),
checkboxInput("genclone", "convert to genclone?", TRUE),
selectInput("distance",
"choose distance calculation",
choices = c("Dissimilarity",
"Bruvo",
"Nei",
"Rogers",
"Edwards",
"Provesti",
"Reynolds",
"Custom")
),
conditionalPanel("input.distance == 'Custom'",
uiOutput("customDist")
),
conditionalPanel("input.distance == 'Bruvo'",
selectInput("bruvo_model",
"Select a model for missing data",
choices = c("Genome Addition",
"Genome Loss",
"Infinite",
"Average Addition/Loss"),
selected = "Average Addition/Loss"),
textInput("replen", "SSR repeat lengths\n(comma separated or a valid R expression)", "1, 2, 3")
),
conditionalPanel("input.distance != 'Bruvo'",
uiOutput("distargsUI")
),
checkboxInput("reticulate", "include reticulations?", TRUE),
h3("Graphical Parameters"),
checkboxInput("pop.leg", "population legend", TRUE),
checkboxInput("scale.leg", "scale bar", TRUE),
sliderInput("greyslide",
"Grey Scale",
min = 0,
max = 25,
value = 3,
step = 1
),
numericInput("nodebase",
"Node Size Scale (log(size, value))",
"1.15",
min = 1.0001,
step = 0.0001),
numericInput("seed",
"Random Seed",
"69"
),
radioButtons("ind_or_mlg", "Labels",
choices = c("sample names", "MLGs"),
selected = "sample names", inline = TRUE
),
textInput("inds", NULL, "ALL"),
checkboxInput("mlgs", "show MLG", FALSE),
radioButtons("pal", "Indicate a color palette to be used",
choices=c("rainbow",
"cm.colors",
"topo.colors",
"terrain.colors",
"gray.colors",
"funky",
"spectral",
"seasun",
"azur",
"wasp",
"custom"), inline = TRUE
),
conditionalPanel("input.pal == 'custom'",
textInput("custom_pal", "custom palette/function", "function(x) 'purple'")
),
conditionalPanel("input.distance == 'Dissimilarity'",
numericInput("cutoff",
"Distance Cutoff",
NULL,
min = 2
)
),
conditionalPanel("input.distance != 'Dissimilarity'",
numericInput("cutoff",
"Distance Cutoff",
NULL,
step = 0.001)
),
checkboxInput("beforecut", "Keep graph position", TRUE)
),
mainPanel(
tabsetPanel(
tabPanel("Plot", plotOutput("plot", height = '600px')),
tabPanel("Data", verbatimTextOutput("summary")),
tabPanel("Command", verbatimTextOutput("cmd")),
tabPanel("Save Plot",
radioButtons("pdf_png", label = "Choose output filetype",
choices = c("pdf", "png"),
selected = "pdf",
inline = TRUE),
conditionalPanel("input.pdf_png == 'pdf'",
numericInput("pdf_plot_width", "Width (in)",
value = 7,
step = 0.1,
min = 1,
max = 20),
numericInput("pdf_plot_height", "Height (in)",
value = 7,
step = 0.1,
min = 1,
max = 20),
downloadButton("save_pdf", "Save PDF", class = "btn-info")
),
conditionalPanel("input.pdf_png == 'png'",
numericInput("png_plot_width", "Width (px)",
value = 400,
min = 1,
max = 5000),
numericInput("png_plot_height", "Height (px)",
value = 400,
min = 1,
max = 5000),
numericInput("png_res", "Resolution (dpi)",
value = 300,
min = 72,
max = 2000,
step = 1),
downloadButton("save_png", "Save PNG", class = "btn-info")
)
),
tabPanel("Session Information",
verbatimTextOutput("infoRmation")
)
)
)
)
))