forked from jminnier/STARTapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui-tab-heatmap.R
118 lines (103 loc) · 6.54 KB
/
ui-tab-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
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
## ==================================================================================== ##
# START Shiny App for analysis and visualization of transcriptome data.
# Copyright (C) 2016 Jessica Minnier
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# You may contact the author of this code, Jessica Minnier, at <[email protected]>
## ==================================================================================== ##
## ==================================================================================== ##
## HEATMAP TAB
## ==================================================================================== ##
tabPanel("Heatmaps",
fluidRow(column(4,wellPanel(
actionButton("action_heatmaps","Generate Heatmaps"),
h6(textOutput("numheat")),
radioButtons("heatmapvaluename",label="Select Value to Plot in Heatmap",choices=""),
checkboxGroupInput("view_group_heatmap",
label=h5("Select Groups to View"),
choices="",
selected=""
),
radioButtons("heatmap_subset",label="Use all genes or upload your own subset?",
choices=c("all","subset"),selected="all"),
conditionalPanel("input.heatmap_subset=='subset'",
fileInput('heatmap_file', 'Choose File Containing Gene IDs\n(one row per gene)',
accept=c('text/csv',
'text/comma-separated-values,text/plain',
'.csv'))
),
conditionalPanel("input.heatmap_subset=='all'",
radioButtons("heatmap_order",label = "Order genes by",
choices=c("Significance (adjusted p-value)"="significance",
"Variation (CV or SD)"="variation"),
selected="variation")
,
h3("Filters"),
conditionalPanel(condition="input.heatmap_order=='significance'",
selectizeInput("sel_test_heatmap",
label=h5("Select Test to Use for Filtering"),
choices="",
selected="")
),
conditionalPanel(condition="input.heatmap_order=='significance'",
checkboxInput("filter_fdr","FDR cutoff",value = FALSE)),
conditionalPanel(condition="input.filter_fdr==true",
numericInput("FDRcut",label="Choose P-value
(FDR if analyzed by START) cutoff",
min=0,max= 1,value=0.05)),
conditionalPanel(condition="input.heatmap_order=='significance'",
checkboxInput("filter_fc","Filter by fold change for a pair of groups",
value=FALSE)),
conditionalPanel(condition="input.filter_fc==true",
selectizeInput("fold_change_groups", label="Select 2 Groups",
choices=NULL,
selected=NULL,
multiple=TRUE,options = list(maxItems = 2)),
sliderInput("fold_change_range",
label="Choose Log2Fold Change Filter",
min= -20, max=20,value=c(-20,20))),
checkboxInput("filter_maxgene",
"Show a maximum number of genes (recommended)",value=TRUE),
conditionalPanel(condition="input.filter_maxgene==true",
numericInput("maxgenes",label="Choose Max # of Genes",
min=1,max= 5000,value=100,step=1))
)
)#,#sidebarPanel
#img(src="KCardio_CMYK_4C_pos_small.jpg",height=150,width= 275,align="right")
),#column
column(8,
tabsetPanel(
tabPanel(title="HeatMap",
#textOutput("which_genes"),
h4(textOutput("heatmap_rna_title")),
plotOutput("heatmap_rna",height="800px")
),
# tabPanel(title="Interactive HeatMap",
# h4(textOutput("heatmap_rna_title_int")),
# uiOutput("heatmapggvisUI_rna"),
# ggvisOutput("heatmapggvis_rna")
# ),
tabPanel(title="Interactive HeatMap",
#h4(textOutput("heatmap_rna_title_int")),
plotlyOutput("heatmapplotly",height="800")
),
tabPanel(title="Data Output",
downloadButton('downloadHeatmapData_rna',
'Download Heatmap Data as CSV File'),
DT::dataTableOutput("heatdat_rna"))
)#tabsetPanel
)#column
)#fluidrow
)#tabpanel