-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui_heatmap.R
46 lines (38 loc) · 1.47 KB
/
ui_heatmap.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
#
# user-interface for the heatmap tabPanel
#
tabPanel(
"heatmap",
# Sidebar with options on the side and preview of data on the main panel
sidebarLayout(
sidebarPanel(
# Action button to draw heatmap
actionButton("draw_heatmap", "Draw heatmap"),
tags$hr(),
# Options for data transformation
radioButtons("data_transform", "Data transformation",
c("None"="none",
"Log2(X+1)"="log2",
"Z-score: (X-mean)/SD"="zscore")),
tags$hr(),
# Options for distance matrix
radioButtons("corMethod","Distance metric",
c("1 - Pearson's correlation"="pearson",
"1 - Spearman's correlation"="spearman",
"1 - Kendall's correlation"="kendall")),
tags$hr(),
# Option for number of clusters to cut the tree by
numericInput("tree_k","Number of groups to cut the tree",
value = 1, min=1, max=12),
tags$hr(),
# Option for number of genes to plot
numericInput("n_top", "Number of top variable genes to cluster",
value = 10, min = 10, max = Inf)),
# Plot the heatmap in the main panel
mainPanel(fluidPage(
fluidRow(
column(6,plotlyOutput("heatmap", height="500px")),
column(3,plotlyOutput("dendrogram", height="500px"))),
fixedRow(plotOutput("heatmap_click", height="250px"))
))
))