-
Notifications
You must be signed in to change notification settings - Fork 20
/
ui.R
151 lines (117 loc) · 9.48 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
shinyUI(fluidPage(
# Application title
titlePanel("SAM - Significance Analysis of Microarrays"),
# Control panel;
fluidRow(
column(3,
wellPanel(
tags$div(title="Click here to select data you would like to analyze",
fileInput('file', 'Choose XLSX File')
),
conditionalPanel(condition = "input.analysisType == 'Standard'",
tags$div(title= "Specify the type of analysis from below, then press Run",
actionButton("goButton", "Run")
)
),
conditionalPanel(condition = "input.analysisType == 'Gene sets'",
tags$div(title= "Specify the type of analysis from below, then press Run",
actionButton("goButton2", "Run")
)
),
conditionalPanel(condition = "input.goButton != 0 && input.analysisType == 'Standard'",
tags$hr(),
radioButtons("deltaChoice", "Delta", c("Delta Slider" = "Delta Slider", "Manually Enter Delta" = "Manually Enter Delta")),
conditionalPanel(condition = "input.deltaChoice == 'Delta Slider'",
uiOutput("slider")
),
conditionalPanel(condition = "input.deltaChoice == 'Manually Enter Delta'",
numericInput("deltaInput", label = "Delta value", min = 0, max = 10, value = 0, step = 0.01)
),
conditionalPanel(condition = "(input.assayType == 'array' && (input.responseType_array == 'Two class unpaired' || input.responseType_array == 'Two class paired' )) || (input.assayType == 'seq' && (input.responseType_seq == 'Two class unpaired' || input.responseType_seq == 'Two class paired'))",
numericInput("min.foldchange", label = "Minimum fold change", min = 1, value = 0, step = 0.01)
),
conditionalPanel(condition = "(input.assayType == 'array' && (input.responseType_array == 'Two class unpaired' || input.responseType_array == 'Two class paired' || input.responseType_array == 'One class' || input.responseType_array == 'Survival')) || (input.assayType == 'seq' && (input.responseType_seq == 'Two class unpaired' || input.responseType_seq == 'Two class paired' || input.responseType_seq == 'Survival'))",
numericInput("dif", label = "Hypothesized mean difference in expression", value = 0),
textInput("sampleSizeFactors", label = "Same size factors - four comma separated values", value = "1,2,3,5")
),
radioButtons("localFDR", "Output local FDRs", c("No" = FALSE, "Yes" = TRUE)),
textInput("dir", "Paste the filepath to save the output", value = getwd()),
textInput("fname", "Type the file name you would like to save as", value = "result"),
actionButton("saveButton", "Save")
),
conditionalPanel(condition = "input.goButton2 != 0 && input.analysisType == 'Gene sets'",
tags$hr(),
radioButtons("fdrChoice", "FDR", c("FDR Slider" = "FDR Slider", "Manually Enter FDR" = "Manually Enter FDR")),
conditionalPanel(condition = "input.fdrChoice == 'FDR Slider'",
sliderInput("fdrSlider", label = "FDR value", min = 0, max =1, value = 0.5, step = 0.01)
),
conditionalPanel(condition = "input.fdrChoice == 'Manually Enter FDR'",
numericInput("fdrInput", label = "FDR value", min = 0, max = 1, value = 0.5, step = 0.01)
),
textInput("dir2", "Paste the filepath to save the output", value = getwd()),
textInput("fname2", "Type the file name you would like to save as", value = "result"),
actionButton("saveButton2", "Save")
)
),
wellPanel(
radioButtons("assayType", "Data type", c("Array" = "array", "Sequencing" = "seq")),
conditionalPanel(condition = "input.assayType == 'seq'",
selectInput("responseType_seq","Response Type", c('Quantitative','Two class unpaired', 'Survival', 'Multiclass', 'Two class paired'))
),
conditionalPanel(condition = "input.assayType == 'array'",
selectInput("responseType_array","Response Type", c('Quantitative','Two class unpaired', 'Survival', 'Multiclass', 'One class', 'Two class paired', 'Two class unpaired timecourse', 'One class timecourse', 'Two class paired timecourse','Pattern discovery')),
conditionalPanel(condition = paste("(input.responseType_array == 'Quantitative' ||", "input.responseType_array == 'Two class unpaired' ||", "input.responseType_array == 'Survival' ||", "input.responseType_array == 'Multiclass' ||", "input.responseType_array == 'Two class paired' ||", "input.responseType_array == 'Two class unpaired')"),
radioButtons("analysisType", "Analysis Type", c("Standard (genes)" = "Standard", "Gene sets" = "Gene sets"))
),
conditionalPanel(condition = paste("input.analysisType == 'Gene sets' && ", "(input.responseType_array == 'Quantitative' ||", "input.responseType_array == 'Two class unpaired' ||", "input.responseType_array == 'Survival' ||", "input.responseType_array == 'Multiclass' ||", "input.responseType_array == 'Two class paired' ||", "input.responseType_array == 'Two class unpaired')"),
fileInput(inputId = "gmtFile", label = "Browse for Gene Sets .gmt file"),
numericInput("minGeneSet", label = "Minimum gene set size", min = 1, value = 15, step = 1),
numericInput("maxGeneSet", label = "Maximum gene set size", min = 1, value = 500, step = 1)
),
conditionalPanel(condition = paste("(input.responseType_array == 'Two class unpaired' ||", "input.responseType_array == 'Two class unpaired timecourse')"),
radioButtons("testStatistic", "Test Statistic", c("T-statistic"="standard", "Wilcoxon"="wilcoxon"))
),
conditionalPanel(condition = paste("(input.responseType_array == 'Two class unpaired timecourse' ||", "input.responseType_array == 'One class timecourse' ||", "input.responseType_array == 'Two class paired timecourse')"),
radioButtons("timeSummaryType", "Time Summary Type", c("Slope"='slope', "Signed Area"='signed.area'))
),
radioButtons("centerArrays", "Median center the arrays", c("No" = FALSE, "Yes" = TRUE)),
conditionalPanel(condition = paste("(input.responseType_array == 'Two class unpaired' ||", "input.responseType_array == 'Two class paired')"),
radioButtons("dataLogged", "Are data in log scale (base 2)", c("No" = FALSE, "Yes" = TRUE))
),
conditionalPanel(condition = "input.responseType_array == 'Quantitative'",
radioButtons("regressionMethod", "Regression method", c("Standard"='standard', "Ranks"='ranks'))
),
radioButtons("s0", "Estimate of s0 factor for denominator", c("Automatic"="Automatic", "Use fixed percentile (eg 50)"="useFixed")),
conditionalPanel(condition = "input.s0 == 'useFixed'",
numericInput("s0.perc", "(-1 implies s0 is zero)", step=1, value = 50)
),
numericInput("numberOfNeighbors", "K-Nearest Neighbors Imputer: Number of Neighbors", value= 10, step=1)
),
numericInput("nperms", "Number of Permutations", value=100, min=25, max=5000, step=1),
uiOutput("rseed"),
actionButton("randomButton", "Generate Random Seed")
)
),
column(9,
conditionalPanel(condition = "input.analysisType == 'Gene sets'",
tabsetPanel(id = 'gene set',
tabPanel("GSA Plot", h3(textOutput("GSAPlotText")), plotOutput("geneSetPlot")),
tabPanel("Significant Gene Sets", h3(textOutput("geneSetPositive")), tableOutput("positiveGeneSet"), h3(textOutput("geneSetNegative")), tableOutput("negativeGeneSet"), h3(textOutput("GeneScoreText")), numericInput("geneset.number", "geneset number", value= 1, step=1), tableOutput("testGeneSet")),
tabPanel("All Gene Sets", h3(textOutput("geneSetFullPositive")), tableOutput("positiveFullGeneSet"), h3(textOutput("geneSetFullNegative")), tableOutput("negativeFullGeneSet")),
tabPanel("Gene Set Collection Info", h3(textOutput("geneSetInfoText")), tableOutput("geneSetTable"), h3(textOutput("geneSetInfoText2")), tableOutput("geneSetQuantile"), h3(textOutput("geneSetInfoText3")), tableOutput("geneSetTableGenes")),
tabPanel("Current Settings", h3(textOutput("inputParametersText2")), tableOutput("inputParameters2"), h3(textOutput("computedValuesText2")), tableOutput("computedValues2"))
)
),
conditionalPanel(condition = "input.analysisType == 'Standard'",
tabsetPanel(id='SAM',
tabPanel("SAM Plot", h3(textOutput("samPlotText")), plotOutput("samrPlot")),
tabPanel("Delta Table", h3(textOutput("deltaTableText")), tableOutput("deltaTable"), h3(textOutput("missRateText")), tableOutput("missRate")),
tabPanel("Significant Genes", h3(textOutput("positiveGenesText")), tableOutput("siggenes.table.up"), h3(textOutput("negativeGenesText")), tableOutput("siggenes.table.lo")),
tabPanel("All Genes", h3(textOutput("allPositiveGenesText")), tableOutput("Allgenes.table.up"), h3(textOutput("allNegativeGenesText")), tableOutput("Allgenes.table.lo")),
tabPanel("Sample Size", h3(textOutput("sampleSizePlotText")), plotOutput("samplePlot"), h3(textOutput("sampleTableText1")), tableOutput("sampleTable1"), h3(textOutput("sampleTableText2")), tableOutput("sampleTable2"), h3(textOutput("sampleTableText3")), tableOutput("sampleTable3"), h3(textOutput("sampleTableText4")), tableOutput("sampleTable4")),
tabPanel("Current Settings", h3(textOutput("inputParametersText")), tableOutput("inputParameters"), h3(textOutput("computedValuesText")), tableOutput("computedValues"), h3(textOutput("eigengeneText")), tableOutput("eigengene") )
)
)
)
)
))