-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
148 lines (140 loc) · 5.5 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
library(shinythemes)
fluidPage(
####################### Browser icon
headerPanel(
tags$head(tags$link(rel = "icon", type = "image/png",
href = "deploidTransLowSmall.ico")), windowTitle = "DEploid-ShinyApp"),
####################### Head image
titlePanel(
title = div(img(src = "deploidTrans.png", height = 93, width = 209,
style = "margin:1px 1px"))),
####################### NAV BAR
navbarPage(title = "", theme = shinytheme("cerulean"),
########## tabPanel 1. would be great to have a map here
tabPanel("Sample infos",
sidebarLayout(
sidebarPanel(width = 3,
shinyjs::useShinyjs(),
radioButtons("inputSample", "What is this sample?",
c("Plasmodium Falciparum",
"Plasmodium Vivax")),
hr(),
uiOutput("inputOriginUI"),
hr(),
fileInput("inputVCFfile", "Choose VCF file",
accept = c("text", "ref", "txt")),
actionButton("prepData", "Preparing data")
# htmlOutput("panelSampleInfoExplainSample")
),
mainPanel(width = 9,
shinyjs::useShinyjs(),
leafletOutput("panelSampleInfoMap", height = "530px")
)
)
),
############ tabPanel 2
tabPanel("Sequence exploration",
sidebarLayout(
sidebarPanel(width = 3,
sliderInput("panelDataTotalCoverageThreshold",
label = h4("Total coverage quantile threshold: "),
min = 0.9, max = 1, value = 0.995),
sliderInput("panelDataTotalCoverageWindow",
label = h4("Window size for filtering: "),
min = 0, max = 50, value = 10),
checkboxInput("advanceDEploidParameters",
label = h5("Advance parameters"), value = FALSE),
conditionalPanel(
condition = "input.advanceDEploidParameters == true",
fluidRow(
HTML("working progress ...")
)
),
actionButton("deconvData", "Deconvolution")
),
mainPanel(width = 9,
shinyjs::useShinyjs(),
tabsetPanel(id = "data",
tabPanel("Coverage distribution across the genome", value = "p1",
fluidRow(column(12, dygraphOutput("panelDataTotalCoverage")))
),
tabPanel("Allele read counts", value = "p3",
fluidRow(column(2),
column(8, plotlyOutput("panelDataAltVsRef"))
)
# htmlOutput("panelDataExplainTotalCoverage"),
),
tabPanel("WSAF VS PLAF", value = "p4",
fluidRow(column(2),
column(6, plotlyOutput("panelDataWSAFVsPLAF")))
# htmlOutput("panelDataExplainWSAFVsPLAF")
),
tabPanel("WSAF Histogram", value = "p3",
fluidRow(column(2),
column(6, plotlyOutput("panelDataHistWSAF")))
# htmlOutput("panelDataExplainHistWSAF"),
)
)
)
)
),
############ tabPanel 3
tabPanel("Sequence deconvolution",
sidebarLayout(
sidebarPanel(width = 3,
downloadButton("downloadHaplotypes", "Download haplotypes"),
# HTML("<font color=\"blue\">TODO: interactive buttons.</font>"),
uiOutput("inputCHROMUI"),
# hr(),
checkboxGroupInput("panelSequenceDeconWSAFVsPOSShades",
h5("Show Gene and Exon:"), c("Gene", "Exon")),
hr(),
checkboxInput("panelSequenceDeconWSAFVsPOSControlGene",
label = h5("Enable/Disable Gene Zoom"), value = FALSE),
conditionalPanel(
condition = "input.panelSequenceDeconWSAFVsPOSControlGene == true",
fluidRow(
column(5, radioButtons("panelSequenceDeconWSAFVsPOSGene",
h5("Choose a Gene"),
c("CRT", "DHFR", "DHPS", "Kelch", "MDR1",
"Plasmepsin2&3"),
selected = NULL)),
column(7, uiOutput("inputGeneUI"))
)
)),
mainPanel(width = 9,
shinyjs::useShinyjs(),
tabsetPanel(id = "deconvolution",
tabPanel("Allele frequency across the genome", value = "p1",
fluidRow(column(12, dygraphOutput("panelSequenceDeconWSAFVsPOS")))
),
tabPanel("Expected vs observed allele frequency", value = "p1",
fluidRow(column(3), column(5, align = "center",
plotlyOutput("panelSequenceDeconObsVsExpWSAF")))),
tabPanel("MCMC diagnostic",
tabsetPanel(id = "mcmc",
tabPanel("Proportions",
fluidRow(column(12, align = "center",
plotlyOutput("panelMCMCProportions"))
)
),
tabPanel("LLKs",
fluidRow(column(12, align = "center",
plotlyOutput("panelMCMCLLK"))
)
)
)
)
)
)
)
),
############ tabPanel 4
navbarMenu("Documentation",
tabPanel("Sample Infos", htmlOutput("infoPage")),
tabPanel("Sequence Exploration", htmlOutput("dataPage")),
tabPanel("Sequence Deconvolution", htmlOutput("dEploidPage")),
tabPanel("Cite me", verbatimTextOutput("citeMe"))
)
)
)