Diff of /ui.R.save [000000] .. [81de4e]

Switch to unified view

a b/ui.R.save
1
shinyUI(pageWithSidebar(
2
3
4
    titlePanel(title="VoomDDA: Discovery of Diagnostic Biomarkers and Classification of RNA-Seq Data  (ver. 1.2)"),
5
6
    sidebarPanel(width = 3,
7
        conditionalPanel(condition="input.tabs1=='Introduction'",
8
            HTML('<p align="center"><img src="voomdda.jpg" width=200 height=200></p>'),
9
            tags$head(includeScript("google-analytics.js"))
10
11
        ),
12
13
        conditionalPanel(condition="input.tabs1=='Manual'",
14
            HTML('<p align="center"><img src="manual.png" width=200 height=200></p>')
15
16
        ),
17
18
        conditionalPanel(condition="input.tabs1=='News'",
19
            HTML('<p align="center"><img src="news.png" width=200 height=200></p>')
20
21
        ),
22
23
        conditionalPanel(condition="input.tabs1=='Citation'",
24
            HTML('<p align="center"><img src="cite.png" width=200 height=200></p>')
25
        ),
26
27
        conditionalPanel(condition="input.tabs1=='VoomDDA'",
28
            h4("1. Pre-processing"),
29
            h5("a) Filtering"),
30
            fluidRow(column(1),
31
                     column(10,
32
                            checkboxInput(inputId = "nearZeroF", label = "Near-zero variance filtering", value = TRUE),
33
                            checkboxInput(inputId = "varF", label = "Variance filtering", value = FALSE))
34
            ),
35
            HTML('<br>'),
36
            conditionalPanel(condition = "input.varF",
37
                textInput(inputId = "maxVar", label = "Number of genes with maximum variance", value = "")
38
            ),
39
            
40
            h5("b) Normalization"),
41
            fluidRow(column(1),
42
                     column(10,
43
                            radioButtons(inputId = "normMeth", label = "", choices = list("None" = "none", "DESeq median ratio" = "deseq", "TMM" = "TMM"), 
44
                                         selected = "none"))
45
            ),
46
            #HTML('<br>'),
47
            h4("2. Model building"),
48
            fluidRow(column(1),
49
                     column(11,
50
                            radioButtons(inputId = "models", label = "", selected = "vNSC",
51
                                               choices = c("voomNSC" = "vNSC",
52
                                                            "voomDLDA" = "vDLDA",
53
                                                            "voomDQDA" = "vDQDA"))
54
            )),
55
            HTML('<br>'),
56
            checkboxInput(inputId = "advanced", label = "Advanced options", value = FALSE),
57
            fluidRow(
58
                column(1),
59
                column(11, 
60
                       conditionalPanel(condition = "input.advanced",
61
                                 checkboxGroupInput(inputId = "advOpts", label = "", selected = c("trSummary","selGenes","selHeat"),
62
                                                    choices = c("Display training summary" = "trSummary",
63
                                                                "Display selected genes (voomNSC)" = "selGenes"))
64
                ))    
65
            )
66
            
67
        ),
68
69
70
        conditionalPanel(condition="input.tabs1=='Heatmap'",
71
72
            h4("Heatmap options"),
73
            actionButton(inputId = "runHeatMap", label = "Create heatmap"),
74
            checkboxInput(inputId = "centerHeat", label = "Center heatmap data", value = TRUE),
75
            checkboxInput(inputId = "darkTheme", label = "Dark theme", value = FALSE),
76
            selectInput("colorsHM", "Select a color scheme", choices = c("Blues" = "Blues", "Reds" = "Reds", "Greens" = "Greens"),
77
                              selected = "Blues")
78
79
80
81
82
            #sliderInput(inputId = "widthHM" , label = "Width", min = 200, max = 1000, value = 600, step = 50),
83
            #sliderInput(inputId = "heightHM" , label = "Height", min = 200, max = 1000, value = 600, step = 50)
84
85
86
        ),
87
88
        conditionalPanel(condition="input.tabs1=='Network'",
89
90
            actionButton(inputId = "runNetwork", label = "Create network plot")
91
92
        ),
93
94
        conditionalPanel(condition="input.tabs1=='Authors & News'",
95
            HTML('<p align="center"> <a href="https://www.hacettepe.edu.tr/english/" target="_blank"><img src="hulogo.JPEG" width=150 height=150></a> </p>')
96
        ),
97
98
        conditionalPanel(condition="input.tabs1=='Data upload'",
99
            h4("Input data"),
100
            radioButtons("dataInput", "", list("Load example data"=1,"Upload a file"=2), selected=1),
101
102
            conditionalPanel(condition="input.dataInput=='1'",
103
                h5("Load example data:"),
104
                
105
                radioButtons("sampleData", "", list("Cervical"=1, "Alzheimer"=2),selected=1)
106
                
107
                #HTML('<p>n: number of observations</p>'),
108
                #HTML('<p>p: number of genes</p>')
109
            ),
110
            
111
            conditionalPanel(condition="input.dataInput=='2'",
112
                h5("Upload train set: "),
113
                fileInput("uploadTrain", "", multiple = FALSE),
114
115
                h5("Upload class labels: "),
116
                fileInput("uploadCond", "", multiple = FALSE),
117
                
118
                h5("Upload test set: "),
119
                fileInput("uploadTest", "", multiple = FALSE),
120
                
121
                radioButtons("fileSepDF", "Delimiter:", list("Comma"=1,"Tab"=2,"Semicolon"=3,"Space"=4),selected=2),  
122
123
                HTML('<p>You can upload your data as separated by comma, tab, semicolon or space.</p>'),
124
                HTML('<p>Note: Samples are in the column and genes are in the rows.</p>')
125
            )
126
        )
127
),
128
129
130
    mainPanel(
131
        tabsetPanel(
132
            tabPanel("Introduction",
133
                    HTML('<br>'),
134
                    HTML('<p>Identifying the relevant genes (or other genomic features such as transcripts, miRNAs, lncRNAs, etc.) across the conditions (e.g. tumor and non-tumor tissue samples) is a common research interest in gene-expression studies. In this gene selection, researchers are often interested in detecting a small set of genes for diagnostic purpose in medicine that involves identification of the minimal subset of genes that achieves maximal predictive performance. biomarker discovery and classification problem.</p>'),
135
                    HTML('<p>VoomDDA is a decision support tool developed for RNA-Sequencing datasets to assist researchers in their decisions for diagnostic biomarker discovery and classification problem. VoomDDA consists both sparse and non-sparse statistical learning classifiers adapted with voom method. Voom is a recent method that estimates the mean and variance relationship of the log-counts of RNA-Seq data (log counts per million, log-cpm) at observational level. It also provides precision weights for each observation that can be incorporated with the log-cpm values for further analysis. Algorithms in our tool incorporates the log-cpm values and the corresponding precision weights into biomarker discovery and classification problem. For this purpose, these algorithms use weighted statistics in estimating the discriminating functions of the used statistical learning algorithms.</p>'),
136
                    HTML('<p>VoomNSC is a sparse classifier that is developed to bring together two powerful methods for RNA-Seq classification:</p>'),
137
                     
138
                    h5("1.    to extend voom method for RNA-Seq classification studies,"),
139
                    h5("2.    to make nearest shrunken centroids (NSC) algorithm available for RNA-Seq technology."),
140
                    HTML('<p>VoomNSC both provides fast, accurate and sparser classification results for RNA-Seq data. More details can be found in the research paper. This tool also includes RNA-Seq extensions of diagonal linear and diagonal quadratic discriminant classifiers: (i) voomDLDA and (ii) voomDQDA.</p>'),
141
142
          
143
                h5("References"),
144
                HTML('<p> [1] Zararsiz, G., Goksuluk, G., Korkmaz, S., et al. (2015). VoomDDA: Discovery of Diagnostic Biomarkers and Classification of RNA-Seq Data.</p>'),
145
146
                HTML('<p> [2] Law, C.W., Chen, Y., Shi, W., et al. (2014). <a href="http://www.genomebiology.com/2014/15/2/R29">voom: Precision weights unlock linear model analysis tools for RNA-Seq read counts.</a> Genome Biology; 15:R29.</p>'),
147
148
                HTML('<p> [3] Tibshirani, R., Hastie, T., Narasimhan, B., et al. (2002). <a href="http://www.pnas.org/content/99/10/6567.abstract" target="_blank">Diagnosis of multiple cancer types by shrunken centroids of gene expression.</a> PNAS; 99(10): 6567-72. </p>'),
149
150
                HTML('<p> [4] Dudoit, S., Fridlyand, J. and Speed, T.P. (2002). <a href="http://amstat.tandfonline.com/doi/abs/10.1198/016214502753479248" target="_blank">Comparison of Discrimination Methods for the Classification of Tumors Using Gene Expression Data.</a> Journal of the American Statistical Association; 97(457): 77-87.</p>')
151
                  
152
            ),
153
154
            tabPanel("Data upload",
155
                navbarPage(
156
                               title = '',
157
                               tabPanel('Train',                dataTableOutput('RawDataTrain')),
158
                               tabPanel('Test',                dataTableOutput('RawDataTest'))
159
                 )
160
            ),
161
162
163
            tabPanel("VoomDDA",
164
165
                #downloadButton("downloadNormTest", "Download univariate results"),
166
                #downloadButton("downloadNormPlot", "Download univariate plots"),
167
168
                verbatimTextOutput("trainConsole"),
169
                HTML('<br>'),
170
                HTML('<br>')
171
                #plotOutput("heatMap")
172
            ),
173
HTML('<br>'),
174
175
176
177
            tabPanel("Heatmap",
178
        br(),
179
              d3heatmap::d3heatmapOutput("heatMap", width = "100%", height = "600px")
180
181
182
            ),
183
184
185
            tabPanel("Network",
186
187
                plotOutput('newtwork')
188
189
            ),
190
191
192
            tabPanel("Manual",
193
194
            h5("Tutorial"),
195
            HTML('<p><b>1.Uploading the data</b></p>'),
196
            HTML('<p>VoomDDA application requires three inputs from the user. Train and test sets should be text files (.txt) that contain the raw mapped read counts in a matrix form, where rows correspond to genomic features (for simplicity of language, let’s say genes) and the columns correspond to observations (or samples). This type of count data can be obtained from feature counting softwares such as HTSeq [1] or featureCounts [2]. Note that this type of count data should contain the raw number of mapped reads, should not be normalized or contain RPKM values. Class labels should also be in a text file (.txt) and should contain each sample condition. Note that each row should contain only one label of a sample. Example datasets for Witten et al. cervical dataset are given as below:</p>'),
197
            HTML('<p><a href="data/cervical_train.txt" download>Training set of cervical data</a></p>'),
198
            HTML('<p><a href="data/cervical_test.txt" download>Test set of cervical data</a></p>'),
199
            HTML('<p><a href="data/cervical_cond.txt" download>Class labels of cervical data</a></p>'),
200
            HTML('<p>If the purpose is the prediction of the class labels of new test observations, users should upload all three necessary files. However, test set is not required, when the purpose is just the identification of the diagnostic biomarkers.</p>'),
201
            HTML('<p>After uploading the data, make sure that the data is displayed in the screen.</p>'),
202
            HTML('<br>'),
203
            HTML('<p><b>2. Pre-processing the Data</b></p>'),
204
            HTML('<p><b>2.1. Filtering</b></p>'),
205
            HTML('<p>VoomDDA classifiers (VoomNSC, VoomDLDA and VoomDQDA) introduced in this application have the same assumptions with voom+limma pipeline [3], that is to filter out the rows with zero or very very low counts. In RNA-Seq data, we often meet with count data that contains rows with single unique values (mostly zero). This type of data may lead to unreliable estimation of the mean and variance relationship of the data and unstable model fitting for the introduced classifiers. Three possible filtering criteria are available: (i) DESeq2 outlier and independent filtering, (ii) near-zero variance filtering, (iii) variance filtering.</p>'),
206
            HTML('<p>DESeq2 package [4] contains a filtering criteria based on outlier detection and independent filtering.  Outliers are detected based on the Cook’s distance and independent filtering is applied based on the gene-wise mean normalized counts. More details can be obtained in the vignette of DESeq2 package [5].</p>'),
207
            HTML('<p>Near-zero variance filtering is described in caret package of R [6]. This package applies filtering based on two criteria: (i) the frequency of the most frequent value to the most frequent second value is higher than 19 (95/5), (ii) the number of unique values divided by the sample size is less than 10%.</p>'),
208
            HTML('<p>Variance filtering is another option to filter out the non-informative genes. This option may also be selected to decrease the computational cost of the model building process for very large datasets. After selecting this option, users can enter the number of genes desired to be included to the classification models.</p>'),
209
            HTML('<p>After selecting one or multiple filtering criteria, filtering statistics are demonstrated in the screen.</p>'),
210
            HTML('<p><b>2.2. Normalization</b></p>'),
211
            HTML('<p>Library sizes for each observation are dependent on the experimental design and may lead to the existence of technical biases. These biases can have significant effect on the classification results and should be corrected before starting to classification model building. In our experiments, we found that normalization has a significant effect on the classification results for datasets that have very large library size differences across samples. Two normalization approaches are available in the application: (i) DESeq median ratio [7], (ii) trimmed mean of M values (TMM) [8]. More details about this approaches can be found in referenced papers.</p>'),
212
            HTML('<br>'),
213
            HTML('<p><b>3. Model Building for Classification</b></p>'),
214
            HTML('<p>After data processing, users can build classification models with three introduced algorithms: (i) voomNSC, (ii) voomDLDA, (iii) voomDQDA. VoomNSC is a sparse classifier that brings together two powerful methods, voom method [3] and nearest shrunken centroids algorithm [9], for the classification of RNA-Seq data. VoomDLDA and voomDQDA are non-sparse classifiers which are the extensions of diagonal discriminant classifiers [10]. Details of these classifiers are given in the referenced paper [11].</p>'),
215
            HTML('<p>After selecting any of the three classifiers, a summary of the fitting process is displayed in the screen. A confusion matrix and several statistical diagnostic measures are given to examine how successful the classifier fit to the given data. Furthermore, a heatmap plot is constructed to display the expression levels of genes and the gene-wise and sample-wise relationships. Heatmap is displayed for the entire unfiltered genes for non-sparse classifiers, while displayed for the selected gene subset for sparse voomNSC classifier.</p>'),
216
            HTML('<br>'),
217
            HTML('<p><b>4. Identification of Diagnostic Biomarkers</b></p>'),
218
            HTML('<p>If VoomNSC is the selected classifier, the subset of genes, that are most relevant with the class condition, are identified and the gene names are displayed in the screen. Several plots are also given. First plot demonstrates the selection of the threshold parameter. The parameter which fits the most accurate and sparsest model is identified as optimal. Second plot displays the distribution of selected genes in each class. Third plot displays the shrunken differences of the selected genes. Final plot is the heatmap plot discussed in the previous section.</p>'),
219
            HTML('<br>'),
220
            HTML('<p><b>5. Prediction</b></p>'),
221
            HTML('<p>Based on the selected classifier, predictions appear on the screen for each test observation. Note that the test observations should be processed as same as the training observations. Same experimental and computational procedures should be applied before obtaining the raw count data. Data should be in the same format as the training data to obtain the predictions. It should contain the raw mapped read counts, and the gene names should match with the training data.</p>'),
222
            HTML('<p>VoomDDA application filters and normalizes the test data based on the information obtained from the training data. Thus, the estimated parameters from the training data are used for the test data. This guarantees that both sets are on the same scale and homoscedastic each other.</p>'),
223
            HTML('<br>'),
224
            HTML('<p><b>References</b></p>'),
225
            HTML('<p>[1] Anders, S., Pyl, P.T., and Huber, W. (2015) HTSeq - a Python framework to work with high-throughput sequencing data. Bioinformatics; 31(2):166-9.</p>'),
226
            HTML('<p>[2] Liao, Y., Smyth, G.K., and Shi, W. (2013). featureCounts: an efficient general-purpose program for assigning sequence reads to genomic features. Bioinformatics. doi: 10.1093/bioinformatics/btt656.</p>'),
227
            HTML('<p>[3] Law, C.W., Chen, Y., Shi, W. and Smyth, G.K. (2014). voom: Precision weights unlock linear model analysis tools for RNA-Seq read counts. Genome Biology; 15:R29.</p>'),
228
            HTML('<p>[4] Love, M.I., Huber, W. and Anders, S. (2015). Moderated estimation of fold change and dispersion for RNA-seq data with DESeq2. Genome Biology; 15(550).  doi:10.1186/s13059-014-0550-8 .</p>'),
229
            HTML('<p>[5] Love, M.I., Huber, W. and Anders, S. (2015). Differential analysis of count data – the DESeq2 package. http://www.bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.pdf (19.06.2015).</p>'),
230
            HTML('<p>[6] Kuhn, M. (2008). Building Predictive Models in R Using the caret Package. Journal of Statistical Software; 28(5).</p>'),
231
            HTML('<p>[7] Anders, S. and Huber, W. (2010). Differential expression analysis for sequence count data. Genome Biology; 11(R106): doi:10.1186/gb-2010-11-10-r106 .</p>'),
232
            HTML('<p>[8] Robinson, M.D., and Oshlack, A. (2010). A scaling normalization method for differential expression analysis of RNA-seq data. Genome Biology; 11(R25).</p>'),
233
            HTML('<p>[9] Tibshirani, R., Hastie, T., Narasimhan, B. and Chu, G. (2002). Diagnosis of multiple cancer types by shrunken centroids of gene expression. PNAS; 99(10): 6567–72.</p>'),
234
            HTML('<p>[10] Dudoit, S., Fridlyand, J. and Speed, T.P. (2002). Comparison of Discrimination Methods for the Classification of Tumors Using Gene Expression Data. Journal of the American Statistical Association; 97(457): 77-87.</p>'),
235
            HTML('<p>[11] Zararsiz, G., Goksuluk, D, Korkmaz, S., et al. (2015). VoomDDA: Discovery of Diagnostic Biomarkers and Classification of RNA-Seq Data.</p>')
236
            ),
237
238
            tabPanel("Authors & News",
239
                h4("Authors"),
240
                HTML('<p><a href="http://bit.do/gokmenzararsiz" target="_blank"> <b>Gokmen Zararsiz</b></a><p>'),
241
                HTML('<p>Hacettepe University Faculty of Medicine <a href="http://www.biostatistics.hacettepe.edu.tr" target="_blank"> Department of Biostatistics</a><p>'),
242
                HTML('<p><a href="mailto:gokmen.zararsiz@hacettepe.edu.tr" target="_blank">gokmen.zararsiz@hacettepe.edu.tr</a><p>'),
243
                HTML('<p><a href="http://www.biostatistics.hacettepe.edu.tr/cv/Dincer_Goksuluk_CV_Eng.pdf" target="_blank"> <b>Dincer Goksuluk</b></a><p>'),
244
                HTML('<p>Hacettepe University Faculty of Medicine <a href="http://www.biostatistics.hacettepe.edu.tr" target="_blank"> Department of Biostatistics</a><p>'),
245
                HTML('<p><a href="mailto:dincer.goksuluk@hacettepe.edu.tr" target="_blank">dincer.goksuluk@hacettepe.edu.tr</a><p>'),
246
                HTML('<p><a href="http://yunus.hacettepe.edu.tr/~selcuk.korkmaz/" target="_blank"> <b>Selcuk Korkmaz</b></a><p>'),
247
                HTML('<p>Hacettepe University Faculty of Medicine <a href="http://www.biostatistics.hacettepe.edu.tr" target="_blank"> Department of Biostatistics</a><p>'),
248
                HTML('<p><a href="mailto:selcuk.korkmaz@hacettepe.edu.tr" target="_blank">selcuk.korkmaz@hacettepe.edu.tr</a><p>'),
249
                HTML('<p><a href="http://aves.istanbul.edu.tr/vahap.eldem/" target="_blank"> <b>Vahap Eldem</b></a><p>'),
250
                HTML('<p>Istanbul University Faculty of Science <a href="http://fen.istanbul.edu.tr/biyoloji/#" target="_blank"> Department of Biology</a><p>'),
251
                HTML('<p><a href="mailto:vahap.eldem@istanbul.edu.tr" target="_blank">vahap.eldem@istanbul.edu.tr</a><p>'),
252
                HTML('<p><a href="http://unverlab.karatekin.edu.tr" target="_blank"> <b>Turgay Unver</b></a><p>'),
253
                HTML('<p>Cankiri Karatekin University Faculty of Science <a href="http://biyoloji.karatekin.edu.tr/default.aspx" target="_blank"> Department of Biology</a><p>'),
254
                HTML('<p><a href="mailto:turgayunver@gmail.com" target="_blank">turgayunver@gmail.com</a><p>'),
255
                HTML('<p><a href="http://www.biyoistatistik.hacettepe.edu.tr/erdem.html" target="_blank"> <b>Erdem Karabulut</b></a><p>'),
256
                HTML('<p>Hacettepe University Faculty of Medicine <a href="http://www.biostatistics.hacettepe.edu.tr" target="_blank"> Department of Biostatistics</a><p>'),
257
                HTML('<p><a href="mailto:ekarabul@hacettepe.edu.tr" target="_blank">ekarabul@hacettepe.edu.tr</a><p>'),
258
                HTML('<p><a href="http://aves.erciyes.edu.tr/ahmetozturk/" target="_blank"> <b>Ahmet Ozturk</b></a><p>'),
259
                HTML('<p>Erciyes University Faculty of Medicine <a href="http://biyoistatistik.erciyes.edu.tr" target="_blank"> Department of Biostatistics</a><p>'),
260
                HTML('<p><a href="mailto:ahmets67@hotmail.com" target="_blank">ahmets67@hotmail.com</a><p>'),
261
262
263
                HTML('<br>'),
264
265
266
                h4("News"),
267
268
                h5("Version 1.0 (June 18, 2015)"),
269
                HTML('<p>(1) VoomDDA web application has been released. <p>'),
270
271
272
HTML('<br>'),
273
274
h5("Other Tools"),
275
276
HTML('<p><a href="http://www.bioconductor.org/packages/release/bioc/html/MLSeq.html" target="_blank"> <b>MLSeq: Machine learning interface for RNA-Seq data </b></a><p>'),
277
HTML('<p><a href="http://www.biosoft.hacettepe.edu.tr/MLViS/" target="_blank"> <b>MLViS: machine learning-based virtual screening tool </b></a><p>'),
278
HTML('<p><a href="http://www.biosoft.hacettepe.edu.tr/easyROC" target="_blank"> <b>easyROC: a web-tool for ROC curve analysis </b></a><p>'),
279
HTML('<p><a href="http://www.biosoft.hacettepe.edu.tr/MVN" target="_blank"> <b>MVN: a web-tool for assessing multivariate normality </b></a><p>'),
280
HTML('<p><a href="http://www.biosoft.hacettepe.edu.tr/DDNAA/" target="_blank"> <b>DDNAA: Decision support system for differential diagnosis of nontraumatic acute abdomen </b></a><p>'),
281
HTML('<br>'),
282
283
284
285
                h6("Please feel free to send us bugs and feature requests.")
286
287
            ),
288
289
            tabPanel("Citation",
290
             HTML('<br>'),
291
             HTML('<p>If you use this application, please cite it as below:</p>'),
292
             HTML('<p><b>Zararsiz, G., Goksuluk, D, Korkmaz, S., et al. (2015). VoomDDA: Discovery of Diagnostic Biomarkers and Classification of RNA-Seq Data. Available at: http://www.biosoft.hacettepe.edu.tr/voomDDA .</b></p>')
293
            ),
294
295
            id="tabs1"
296
        ),
297
298
        tags$head(tags$style(type="text/css", "label.radio { display: inline-block; }", ".radio input[type=\"radio\"] { float: none; }"),
299
        tags$style(type="text/css", "select { max-width: 200px; }"),
300
        tags$style(type="text/css", "textarea { max-width: 185px; }"),
301
        tags$style(type="text/css", ".jslider { max-width: 200px; }"),
302
        tags$style(type='text/css', ".well { max-width: 330px; }"),
303
        tags$style(type='text/css', ".span4 { max-width: 330px; }")),
304
305
        tags$head(
306
        tags$link(rel = "shortcut icon", href = "favicon-2.ico"))
307
308
 )
309
))
310
311
312
313