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 4.91 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',
26
        'Select main data file and press "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
      radioButtons("inRbutLongWide", "Data format:", c("Long" = 0, "Wide" = 1), width = "40%"),
      bsTooltip('inRbutLongWide', help.text.short[10], placement = "right", trigger = "hover", options = NULL),
dmattek's avatar
dmattek committed
31
32
      actionButton("inButLoadNuc", "Load Data"),
      actionButton("butReset", "Reset file input"),
33
      actionButton('inDataGen1', 'Synthetic data'),
dmattek's avatar
Added:    
dmattek committed
34
35
36
      
      tags$hr(),
      checkboxInput('chBtrajRem', 'Upload IDs to remove'),
37
      bsTooltip('chBtrajRem', help.text.short[1], placement = "right", trigger = "hover", options = NULL),
dmattek's avatar
Added:    
dmattek committed
38
39
40
41
      
      uiOutput('uiFileLoadTrajRem'),
      uiOutput('uiButLoadTrajRem'),
      
42
      #tags$hr(),
43
      checkboxInput('chBstim', 'Upload stimulation pattern'),
44
      bsTooltip('chBstim', help.text.short[4], placement = "right", trigger = "hover", options = NULL),
45
46
47
48
      
      uiOutput('uiFileLoadStim'),
      uiOutput('uiButLoadStim'),
      
49
50
51
      #tags$hr(),
      checkboxInput('chBtrajInter', 'Interpolate NAs and missing data', value = F),
      bsTooltip('chBtrajInter', help.text.short[3], placement = "right", trigger = "hover", options = NULL),
52
53
      
      uiOutput('varSelTimeFreq'),
54

dmattek's avatar
dmattek committed
55
      checkboxInput('chBtrackUni', 'Create unique ID', F),
56
57
58
59
      bsTooltip('chBtrackUni', help.text.short[2], placement = "right", trigger = "hover", options = NULL),
      
      tags$hr(),

dmattek's avatar
dmattek committed
60
61
      uiOutput('varSelSite'),
      uiOutput('varSelTrackLabel'),
62
      
63
64
65
      checkboxInput('chBgroup', 'Select grouping column', F),                
      bsTooltip('chBgroup', help.text.short[5], placement = "right", trigger = "hover", options = NULL),

dmattek's avatar
dmattek committed
66
67
68
69
      uiOutput('varSelGroup'),
      uiOutput('varSelTime'),
      uiOutput('varSelMeas1'),
      radioButtons(
Maciej Dobrzynski's avatar
Maciej Dobrzynski committed
70
        'inSelMath', width = '50%',
71
        'Math on 1st and 2nd meas.:',
dmattek's avatar
dmattek committed
72
73
74
75
76
77
78
79
80
        c(
          'None' = '',
          'Divide' = " / ",
          'Sum' = " + ",
          'Multiply' = " * ",
          'Subtract' = ' - ',
          '1 / X' = '1 / '
        )
      ),
81
82
      bsTooltip('inSelMath', help.text.short[6], placement = "right", trigger = "hover", options = NULL),
      
dmattek's avatar
dmattek committed
83
84
      uiOutput('varSelMeas2'),
      
dmattek's avatar
dmattek committed
85
86
      tags$hr(),
      checkboxInput('chBtimeTrim', 'Trim x-axis', FALSE),
87
      bsTooltip('chBtimeTrim', help.text.short[7], placement = "right", trigger = "hover", options = NULL),
dmattek's avatar
dmattek committed
88
      uiOutput('uiSlTimeTrim'),
89

dmattek's avatar
dmattek committed
90
      checkboxInput('chBnorm', 'Normalization', FALSE),
91
      bsTooltip('chBnorm', help.text.short[8], placement = "right", trigger = "hover", options = NULL),
dmattek's avatar
dmattek committed
92
93
94
      uiOutput('uiChBnorm'),
      uiOutput('uiSlNorm'),
      uiOutput('uiChBnormRobust'),
dmattek's avatar
dmattek committed
95
      uiOutput('uiChBnormGroup'),
96

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