ui.R 3.26 KB
Newer Older
dmattek's avatar
dmattek committed
1

dmattek's avatar
dmattek committed
2

dmattek's avatar
dmattek committed
3
4
5
6
7
8
9
# This is the user-interface definition of a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#

library(shiny)
dmattek's avatar
dmattek committed
10
library(shinyjs) #http://deanattali.com/shinyjs/
dmattek's avatar
dmattek committed
11
12
13
library(plotly)

shinyUI(fluidPage(
dmattek's avatar
dmattek committed
14
15
  useShinyjs(),
  # Include shinyjs
dmattek's avatar
dmattek committed
16
17
18
19
  
  # Application title
  title = "Timecourse Inspector",
  
dmattek's avatar
dmattek committed
20
21
22
23
24
  sidebarLayout(
    sidebarPanel(
      #Selector for file upload
      fileInput(
        'inFileLoadNuc',
dmattek's avatar
dmattek committed
25
        'Select data file (e.g. tCoursesSelected.csv) and press "Load Data"',
dmattek's avatar
dmattek committed
26
27
28
29
30
        accept = c('text/csv', 'text/comma-separated-values,text/plain')
      ),
      actionButton("inButLoadNuc", "Load Data"),
      actionButton("butReset", "Reset file input"),
      actionButton('inDataGen1', 'Generate artificial dataset'),
dmattek's avatar
Added:    
dmattek committed
31
32
33
34
35
36
37
38
39
40
41
42
43
      
      tags$hr(),
      checkboxInput('chBtrajRem', 'Upload IDs to remove'),
      helpPopup(
        title = 'Remove time series',
        content = help.text[1],
        placement = 'right',
        trigger = 'hover'
      ),
      
      uiOutput('uiFileLoadTrajRem'),
      uiOutput('uiButLoadTrajRem'),
      
dmattek's avatar
dmattek committed
44
      tags$hr(),
45
      checkboxInput('chBtrackUni', 'Track Label unique across entire dataset', TRUE),
dmattek's avatar
Added:    
dmattek committed
46
47
48
49
50
51
      helpPopup(
        title = 'Create unique cell ID',
        content = help.text[2],
        placement = 'right',
        trigger = 'hover'
      ),
dmattek's avatar
dmattek committed
52
53
      uiOutput('varSelSite'),
      uiOutput('varSelTrackLabel'),
dmattek's avatar
dmattek committed
54

dmattek's avatar
Added:    
dmattek committed
55
      tags$hr(),
56
      checkboxInput('chBgroup', 'Dataset contains grouping column (e.g. treatment, condition)', TRUE),                
dmattek's avatar
dmattek committed
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
      uiOutput('varSelGroup'),
      uiOutput('varSelTime'),
      uiOutput('varSelMeas1'),
      radioButtons(
        'inSelMath',
        'Math operation 1st and 2nd meas.:',
        c(
          'None' = '',
          'Divide' = " / ",
          'Sum' = " + ",
          'Multiply' = " * ",
          'Subtract' = ' - ',
          '1 / X' = '1 / '
        )
      ),
dmattek's avatar
dmattek committed
72
73
      uiOutput('varSelMeas2'),
      
dmattek's avatar
dmattek committed
74
75
76
      tags$hr(),
      checkboxInput('chBtimeTrim', 'Trim x-axis', FALSE),
      uiOutput('uiSlTimeTrim'),
dmattek's avatar
dmattek committed
77
78
79
80
81
      tags$hr(),
      checkboxInput('chBnorm', 'Normalization', FALSE),
      uiOutput('uiChBnorm'),
      uiOutput('uiSlNorm'),
      uiOutput('uiChBnormRobust'),
dmattek's avatar
dmattek committed
82
83
84
      uiOutput('uiChBnormGroup'),
      tags$hr(),
      checkboxInput('chBoutliers', 'Remove outliers', FALSE),
dmattek's avatar
dmattek committed
85
86
87
      uiOutput('uiSlOutliers'),
      uiOutput("uiTxtOutliers"),
      downloadButton('downloadDataClean', 'Download mod\'d data')
88
    ),
dmattek's avatar
dmattek committed
89
90
91
92
    
    mainPanel(tabsetPanel(
      tabPanel(
        "Time courses",
dmattek's avatar
Added:    
dmattek committed
93
94
95
        h4(
          "Plot time series"
        ),
dmattek's avatar
Added:    
dmattek committed
96
        
dmattek's avatar
Added:    
dmattek committed
97
98
99
        br(),
        checkboxInput('chBhighlightTraj', 'Highlight trajectories?', FALSE),
        uiOutput('varSelHighlight'),
dmattek's avatar
dmattek committed
100
        br(),
dmattek's avatar
Mod:    
dmattek committed
101
        modTrajPlotUI('modTrajPlot')
dmattek's avatar
Added:    
dmattek committed
102
      ),
dmattek's avatar
Mod:    
dmattek committed
103
      
dmattek's avatar
dmattek committed
104
      
dmattek's avatar
Added:    
dmattek committed
105
      tabPanel(
dmattek's avatar
dmattek committed
106
        "AUC",
dmattek's avatar
Added:    
dmattek committed
107
108
109
        modAUCplotUI('tabAUC')
      ),
      
dmattek's avatar
Added:    
dmattek committed
110
111
112
      tabPanel(
        "Box-plots",
        tabBoxPlotUI('tabBoxPlot')
dmattek's avatar
dmattek committed
113
114
      ),
      
dmattek's avatar
Added:    
dmattek committed
115
      
dmattek's avatar
dmattek committed
116
117
118
119
120
121
      # scatter plot
      tabPanel(
        'Scatter',
        tabScatterPlotUI('tabScatter')
      ),
      
dmattek's avatar
dmattek committed
122
123
      tabPanel(
        'Hierarchical',
dmattek's avatar
Added:    
dmattek committed
124
        clustHierUI('tabClHier')
dmattek's avatar
dmattek committed
125
126
127
      ),
      
      tabPanel(
dmattek's avatar
Added:    
dmattek committed
128
129
        'Hierarchical Sparse',
        clustHierSparUI('tabClHierSpar')
dmattek's avatar
Added:    
dmattek committed
130
      )
dmattek's avatar
dmattek committed
131
132
133
    ))
  )
))