-
Notifications
You must be signed in to change notification settings - Fork 1
/
ui.R
100 lines (96 loc) · 6.47 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
# UI ------------------------
shinyUI(fluidPage(theme = shinytheme('lumen'),
#tags$head(includeScript("www/js/google-analytics.js")),
useShinyjs(),
tags$title('NeuroExpresso'),
tags$head(tags$script('$(function () { $("#expressionPlot").click(function(e){ $("#ggvis-tooltip").hide(); }); })'),
tags$script('$(function () { $("#difPlot").click(function(e){ $("#ggvis-tooltip").hide(); }); })'),
tags$script('$(function () { $("#tabs").click(function(e){ $("#ggvis-tooltip").hide(); }); })'),
tags$script("async src"="https://www.googletagmanager.com/gtag/js?id=G-08PL1XMYLD"),
tags$script(" window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-08PL1XMYLD');")),
# includeScript("www/js/googleAnalytics.js")),
includeCSS('www/style.css'),
extendShinyjs(script = 'js/shinyjsFunctions.js',functions = c('changeTree',
'open',
'deselect',
'setDefaultTree',
'openStaticTree',
'setStaticTree',
'hidePlotTooltip')),
tags$h2(div(img(src = 'neuroExp.png',height = 50,id='logo'),"NeuroExpresso")),
fluidRow(column(4,wellPanel(
tabsetPanel(id = 'tabs',
tabPanel('Gene Search', value = 'genes'),
tabPanel('Diff. Expr', value = 'difExp'),
tabPanel('Help', value = 'help')
),
conditionalPanel(condition = "input.tabs=='difExp'",
h4('Select groups on the graph to perform differential expression'),
h4(id = "select_text", "Please select first group"),
actionButton(inputId = "group1Selected", label = "Save group 1"),
actionButton(inputId = "group2Selected", label = "Save group 2"),
actionButton(inputId = 'newSelection', label = 'New Selection'),
downloadButton(outputId = 'downloadDifGenes', label = 'Download')),
fluidRow(
column(4,
textInput(inputId = 'searchGenes',
label = 'Select Gene',
value = 'Dok5')
),
column(4, selectInput(inputId = "regionChoice",
label= 'Select Region',
selected = 'Cortex',
choices = names(regionGroups$GPL339))),
column(4,selectInput(inputId = 'platform',
label = 'Select Platform',
choices = names(exprs)))
),
textOutput(outputId = 'geneFound'),
htmlOutput(outputId = 'didYouMean'),
textOutput(outputId = 'synonyms'),
conditionalPanel(condition = 'input.graphSettings.indexOf("Is marker?")>-1',htmlOutput(outputId = 'tisAMarker')),
htmlOutput(outputId ='allenBrain'),
br(),
#br(),
fluidRow(
column(6,
htmlOutput(outputId = 'selectTree'),
#htmlOutput('tree'))
shinyTree("tree",search = TRUE, checkbox = TRUE)),
column(6,
fluidRow(column(5,
checkboxGroupInput(inputId = 'graphSettings',
label = 'Options',
selected = c('Color'),
choices = c('Fixed Y axis',
'Color',
'Is marker?')),
checkboxGroupInput(inputId = 'display',
label = 'Display',
selected = c('Microarray','RNAseq'),
choices = c('Microarray','RNAseq'))),
column(7,
radioButtons(inputId = 'ordering',
label = 'Order by',
choices = c('Cell type','A-Z'), selected = NULL, inline = FALSE, width = NULL))
)
)
)
),
acknowledge()
),
column(8,
conditionalPanel(condition = "input.tabs!='help'",
ggvisOutput('difPlot'),
ggvisOutput('expressionPlot'),
wellPanel(id = 'difGenePanel',type='hidden',dataTableOutput('difGeneTable'))),
conditionalPanel(condition = "input.tabs == 'help'",
helpPage()
),
br(),
bottomInfo()
)
)))