In order to mitigate against the brute force attacks against Gitlab accounts, we are moving to all edu-ID Logins. We would like to remind you to link your account with your edu-id. Login will be possible only by edu-ID after November 30, 2021. Here you can find the instructions for linking your account.

If you don't have a SWITCH edu-ID, you can create one with this guide here

kind regards

This Server has been upgraded to GitLab release 14.2.6

ui.R 5.16 KB
Newer Older
dmattek's avatar
dmattek committed
1
#
dmattek's avatar
dmattek committed
2
3
# Time Course Inspector: Shiny app for plotting time series data
# Author: Maciej Dobrzynski
dmattek's avatar
dmattek committed
4
#
dmattek's avatar
dmattek committed
5
6
7
# This is the user-interface definition for a Shiny web application.
#

dmattek's avatar
dmattek committed
8
9

library(shiny)
dmattek's avatar
dmattek committed
10
11
library(shinyjs) # http://deanattali.com/shinyjs/
library(shinyBS) # for tooltips
dmattek's avatar
dmattek committed
12
library(shinycssloaders) # for loader animations
dmattek's avatar
dmattek committed
13
14

shinyUI(fluidPage(
dmattek's avatar
dmattek committed
15
16
  useShinyjs(),
  # Include shinyjs
dmattek's avatar
dmattek committed
17
18
19
20
  
  # Application title
  title = "Timecourse Inspector",
  
dmattek's avatar
dmattek committed
21
  sidebarLayout(
Maciej Dobrzynski's avatar
Maciej Dobrzynski committed
22
    sidebarPanel(width = 3,
dmattek's avatar
dmattek committed
23
24
25
      #Selector for file upload
      fileInput(
        'inFileLoadNuc',
dmattek's avatar
dmattek committed
26
        'Select data file and click "Load Data"',
dmattek's avatar
dmattek committed
27
28
        accept = c('text/csv', 'text/comma-separated-values,text/plain')
      ),
dmattek's avatar
dmattek committed
29
30
      bsTooltip('inFileLoadNuc', helpText.server[1], placement = "bottom", trigger = "hover", options = NULL),

dmattek's avatar
dmattek committed
31
      radioButtons("inRbutLongWide", "Data format:", c("Long" = 0, "Wide" = 1), width = "40%"),
dmattek's avatar
dmattek committed
32
33
      bsTooltip('inRbutLongWide', helpText.server[2], placement = "bottom", trigger = "hover", options = NULL),
      
dmattek's avatar
dmattek committed
34
35
      actionButton("inButLoadNuc", "Load Data"),
      actionButton("butReset", "Reset file input"),
dmattek's avatar
dmattek committed
36
      
37
      actionButton('inDataGen1', 'Synthetic data'),
dmattek's avatar
dmattek committed
38
      bsTooltip('inDataGen1', helpText.server[3], placement = "bottom", trigger = "hover", options = NULL),
dmattek's avatar
Added:    
dmattek committed
39
40
      
      tags$hr(),
dmattek's avatar
dmattek committed
41
42
      checkboxInput('chBtrajRem', 'Upload tracks to remove'),
      bsTooltip('chBtrajRem', helpText.server[4], placement = "bottom", trigger = "hover", options = NULL),
dmattek's avatar
Added:    
dmattek committed
43
44
45
46
      
      uiOutput('uiFileLoadTrajRem'),
      uiOutput('uiButLoadTrajRem'),
      
47
      #tags$hr(),
48
      checkboxInput('chBstim', 'Upload stimulation pattern'),
dmattek's avatar
dmattek committed
49
      bsTooltip('chBstim', helpText.server[5], placement = "bottom", trigger = "hover", options = NULL),
50
51
52
53
      
      uiOutput('uiFileLoadStim'),
      uiOutput('uiButLoadStim'),
      
54
55
      #tags$hr(),
      checkboxInput('chBtrajInter', 'Interpolate NAs and missing data', value = F),
dmattek's avatar
dmattek committed
56
      bsTooltip('chBtrajInter', helpText.server[6], placement = "bottom", trigger = "hover", options = NULL),
57
58
      
      uiOutput('varSelTimeFreq'),
59

dmattek's avatar
dmattek committed
60
61
62
      checkboxInput('chBtrackUni', 'Create unique track ID', F),
      bsTooltip('chBtrackUni', helpText.server[7], placement = "bottom", trigger = "hover", options = NULL),
      uiOutput('varSelSite'),
63
64
65
      
      tags$hr(),

dmattek's avatar
dmattek committed
66
      uiOutput('varSelTrackLabel'),
67
      
dmattek's avatar
dmattek committed
68
69
      checkboxInput('chBgroup', 'Columns for plot grouping', F),                
      bsTooltip('chBgroup', helpText.server[8], placement = "bottom", trigger = "hover", options = NULL),
70

dmattek's avatar
dmattek committed
71
72
73
74
      uiOutput('varSelGroup'),
      uiOutput('varSelTime'),
      uiOutput('varSelMeas1'),
      radioButtons(
Maciej Dobrzynski's avatar
Maciej Dobrzynski committed
75
        'inSelMath', width = '50%',
76
        'Math on 1st and 2nd meas.:',
dmattek's avatar
dmattek committed
77
78
79
80
81
82
83
84
85
        c(
          'None' = '',
          'Divide' = " / ",
          'Sum' = " + ",
          'Multiply' = " * ",
          'Subtract' = ' - ',
          '1 / X' = '1 / '
        )
      ),
dmattek's avatar
dmattek committed
86
      bsTooltip('inSelMath', helpText.server[9], placement = "bottom", trigger = "hover", options = NULL),
87
      
dmattek's avatar
dmattek committed
88
89
      uiOutput('varSelMeas2'),
      
dmattek's avatar
dmattek committed
90
91
      tags$hr(),
      checkboxInput('chBtimeTrim', 'Trim x-axis', FALSE),
dmattek's avatar
dmattek committed
92
      bsTooltip('chBtimeTrim', helpText.server[10], placement = "bottom", trigger = "hover", options = NULL),
dmattek's avatar
dmattek committed
93
      uiOutput('uiSlTimeTrim'),
94

dmattek's avatar
dmattek committed
95
      checkboxInput('chBnorm', 'Normalization', FALSE),
dmattek's avatar
dmattek committed
96
      bsTooltip('chBnorm', helpText.server[11], placement = "bottom", trigger = "hover", options = NULL),
dmattek's avatar
dmattek committed
97
98
99
      uiOutput('uiChBnorm'),
      uiOutput('uiSlNorm'),
      uiOutput('uiChBnormRobust'),
dmattek's avatar
dmattek committed
100
      uiOutput('uiChBnormGroup'),
101

dmattek's avatar
dmattek committed
102
      tags$hr(),
103
      downloadButton('downloadDataClean', 'Download mod\'d data'),
dmattek's avatar
dmattek committed
104
      bsTooltip('downloadDataClean', helpText.server[16], placement = "bottom", trigger = "hover", options = NULL)
105
    ),
dmattek's avatar
dmattek committed
106
    
107
108
109
110
111
    mainPanel(
      tabsetPanel(
        tabPanel(
          "Time series",
          h4(
dmattek's avatar
dmattek committed
112
            "Plot time series: averages per group or individual"
113
114
          ),
          br(),
dmattek's avatar
dmattek committed
115
          modSelOutliersUI('returnOutlierIDs'),
116
          tabsetPanel(
dmattek's avatar
dmattek committed
117
            tabPanel("Averages",
118
119
120
121
122
123
124
                     br(),
                     modTrajRibbonPlotUI('modTrajRibbon')
            ),
            
            tabPanel(
              "Individual",
              br(),
125
              checkboxInput('chBhighlightTraj', 'Highlight trajectories', FALSE),
126
127
128
              uiOutput('varSelHighlight'),
              br(),
              modTrajPlotUI('modTrajPlot')
129
130
131
132
133
134
            ),
            
            tabPanel(
              "Power Spectral Density",
              br(),
              modPSDPlotUI('modPSDPlot')
135
136
            )
          )
dmattek's avatar
Added:    
dmattek committed
137
        ),
dmattek's avatar
Added:    
dmattek committed
138
        
139
140
        tabPanel(
          "AUC",
dmattek's avatar
dmattek committed
141
          tabAUCplotUI('tabAUC')
142
143
144
        ),
        
        tabPanel(
dmattek's avatar
dmattek committed
145
          "Distributions",
dmattek's avatar
dmattek committed
146
          tabDistPlotUI('tabDistPlot')
147
148
149
150
151
152
153
154
155
156
157
158
        ),
        
        
        # scatter plot
        tabPanel(
          'Scatter',
          tabScatterPlotUI('tabScatter')
        ),
        
        tabPanel(
          'Hierarchical',
          clustHierUI('tabClHier')
dmattek's avatar
dmattek committed
159
        ),
160
161
        
        # sparse hierarchical clustering package sparcl temporarily unavailable from CRAN
dmattek's avatar
dmattek committed
162
163
164
165
         tabPanel(
           'Hierarchical Sparse',
           clustHierSparUI('tabClHierSpar')
        )
166
      ))
dmattek's avatar
dmattek committed
167
168
  )
))