inst/shinyapps/tlcbrain/ui.R

##### Package library #####
library(shiny)
library(shinydashboard)
##### sidebar #####
sidebar <- dashboardSidebar(
  sidebarMenu(
#    menuSubItem("About",  tabName = "About",selected = T),
    menuSubItem("Data Input",  tabName = "Data_input"),
    menuSubItem("Algorithm Table",tabName = "Algo_table"),
#    menuSubItem('Interactive extraction', tabName = 'InterExtract'),
#    menuSubItem('Proto UI', tabName = 'ProtoUI'),
    h3('Pipeline'),
    menuSubItem("New color generator",  tabName = "New_color"),
    menuSubItem("Kohonen: Pipeline 1",  tabName = "Kohonen_1"),
    menuSubItem("Kohonen: Pipeline 2",  tabName = "Kohonen_2"),
    menuSubItem("RBM: Pipeline 1",  tabName = "RBM_1"),
    menuSubItem("RBM: Pipeline 2",  tabName = "RBM_2"),
    menuSubItem("RBM: Pipeline 3",  tabName = "RBM_3"),
    menuSubItem("RBM: Pipeline 4",  tabName = "RBM_4"),
    menuSubItem("PCA: Pipeline 1",  tabName = "PCA_1"),
    menuSubItem("HCA: Pipeline 1",  tabName = "HCA_1"),
    menuSubItem("RNN: Pipeline 1",  tabName = "RNN_1"),
    menuSubItem("TSNE: Pipeline 1",  tabName = "TSNE_1")
  )
)
##### body ####
body <- dashboardBody(
  tabItems(
    tabItem(tabName = "Algo_table",
            tableOutput("Algo_table")
            ),
    tabItem(tabName = 'ProtoUI',
            box(width=12,title='Picture Input',collapsible = T,
                column(width=2),
                column(width=7),
                column(width=3)
                ),
            box(width=12,title='Picture Preprocessing',collapsible = T,
                column(width=2),
                column(width=7),
                column(width=3)
            ),
            box(width=12,title='Chromato extraction',collapsible = T,
                column(width=2),
                column(width=7),
                column(width=3)
            ),
            box(width=12,title='Batch',collapsible = T,
                column(width=2),
                column(width=7),
                column(width=3)
            ),
            box(width=12,title='Chromatograms Preprocessing',collapsible = T,
                column(width=2),
                column(width=7),
                column(width=3)
            ),
            box(width=12,title='Array deconstruction',collapsible = T,
                column(width=2),
                column(width=7),
                column(width=3)
            )
            ),
    tabItem(tabName = 'About',
            tags$head(tags$style(HTML(".box {height: 90vh; overflow-y: auto;}"))),
            tags$head(tags$style(type="text/css", "tfoot {display: table-header-group}")),
            tags$head(tags$style(HTML(".shiny-output-error-validation {color: red;font-size: 24px}"))),
            tags$head(tags$style(type="text/css", ".shiny-progress .progress {position: absolute;width: 100%;top: 100px;height: 10px;margin: 0px;}")),
            tags$head(tags$style(type="text/css", ".shiny-progress .progress-text {position: absolute;border-style: solid;
                                 border-width: 2px;right: 10px;height: 36px;width: 50%;background-color: #EEF8FF;margin: 0px;padding: 2px 3px;opacity: 1;}")),
            tags$head(tags$style(type="text/css", ".btn {border-radius: 20px; font-size: 30px;}")),
            includeMarkdown("paper.md")
            ),
    tabItem(tabName = 'Data_input',
            fileInput('FilePicture','Upload your own picture(s) or let empty to use the demo file',multiple=T),
            numericInput('height','Height to redimension',256),
            checkboxInput('data.raw.normalize','Normalize the picture(s)',T),
            plotOutput('Kohonen.1.raster.Process_0',
                       click='click.Kohonen.1.raster.Process_0'),
            br(),
            plotOutput('Kohonen.1.chromato.Process_0')
    ),
    tabItem(tabName = 'InterExtract',
            plotOutput('InterExtract.raster.1',click = 'click.InterExtract.raster.1',dblclick = 'dblclick.InterExtract.raster.1'),
            plotOutput('InterExtract.raster.2')
            ),
    tabItem(tabName = 'New_color',
            selectInput('New.Col.dist.function','Technique used to calculate the new color',choices=c('Euclidean distance','1 - Euclidean distance')), #,'Sigmoid Euclidean distance'
            plotOutput('New.Col.raster_0',
                       click='click.New.Col.raster_0'),
            br(),
            plotOutput('New.Col.raster_1',
                       click='click.New.Col.raster_1'),
            br(),
            plotOutput('New.Col.chromato_0'),
            br(),
            plotOutput('New.Col.raster_0.red'),
            plotOutput('New.Col.raster_0.green'),
            plotOutput('New.Col.raster_0.blue'),
            plotOutput('New.Col.raster_0.gray')
    ),
    tabItem(tabName = 'Kohonen_1',
            box(title='Options',width=4,height=400,
                tableOutput('Kohonen.1.option'),
                actionButton('Kohonen.1.go','Analyze')
            ),
            box(title='Info',width=6,height=400,
                h4('Deconstruction Process 1:'),
                p('pixels aspect (margin = 3, transform = F)'),
                h4('Reconstruction process 1:'),
                p('The reconstruction take the distance between each unit and the real valule, creating new channels'),
                h4('Deconstruction Process 2:'),
                p('chromatograms aspect with the cerated channels'),
                h4('Algorithm:'),
                p('kohonen self organised map: the samples are sampled into a given number of units and the algorithm then cross the dataset by looking at each samples, determining a winning unit (closer in euclidean distance) and make this unit evolve in direction of the samples, the surrounding unit also evolves creating a map which will clusterize the samples in the same zone of the map'),
                h4('Plots:'),
                p('network: new channels created, those are the final color in each unit at the end of the training'),
                p('image: new channels selected from the network plot above'),
                p('chromatograms: channel chromatogram and original data'),
                p('Training progress for the first process'),
                p('network: kohonen self organized map, each point is a sample'),
                p('image: selected samples from the above network'),
                p('Training progress for the second process'),
                h4('Options:'),
                p('grid map dimensions for each process')
                ),
            box(title='Links',width=2,height=400,
                HTML('<a href="http://www.cioslab.vcu.edu/alg/Visualize/kohonen-82.pdf" target="_blank">Paper</a>'),br(),br(),
                tags$a(href='https://en.wikipedia.org/wiki/Self-organizing_map',target="_blank", "Wikipedia"),br(),br(),
                tags$a(href='https://www.jstatsoft.org/index.php/jss/article/view/v021i05/v21i05.pdf', "R package")
            ),
            box(width=12,
              h3('Process 1'),
              plotOutput('Kohonen.1.mapping.Process_1.RGB.explosion',
                         click='click.Kohonen.1.plot.mapping.Process_1.RGB.explosion'),br(),
              ## Interactive to show the chromatogram (one channel only)
              plotOutput('Kohonen.1.raster.Process_1.RGB.explosion',
                         click='click.Kohonen.1.raster.Process_1.RGB.explosion'),br(),
              plotOutput('Kohonen.1.chromato.Process_1.RGB.explosion',height='600px'),br(),
              plotOutput('Kohonen.1.changes.Process_1'),br(),
              h3('Process 2'),
              plotOutput('Kohonen.1.mapping.Process_2.chromato.cluster',
                         click='click.Kohonen.1.mapping.Process_2.chromato.cluster',
                         dblclick='dblclick.Kohonen.1.mapping.Process_2.chromato.cluster'
              ),br(),
              plotOutput('Kohonen.1.raster.Process_1.original.subset'),br(),
              plotOutput('Kohonen.1.changes.Process_2')
            )
    ),
    tabItem(tabName = 'Kohonen_2',
            box(title='Options',width=4,height=400,
                tableOutput('Kohonen.2.option'),
                actionButton('Kohonen.2.go','Analyze')
            ),
            box(title='Info',width=6,height=400,
                h4('Deconstruction Process 1:'),
                p('pixels aspect (margin = 3, transform = F)'),
                h4('Reconstruction process 1:'),
                p('The reconstruction the result of the new units for each pixel'),
                h4('Algorithm:'),
                p('kohonen self organised map: the samples are sampled into a given number of units and the algorithm then cross the dataset by looking at each samples, determining a winning unit (closer in euclidean distance) and make this unit evolve in direction of the samples, the surrounding unit also evolves creating a map which will clusterize the samples in the same zone of the map'),
                h4('Plots:'),
                p('image: original'),
                p('network: new channels created, those are the final color in each unit at the end of the training'),
                p('image: winning color for each pixel'),
                p('chromatograms: reconstruct and original data'),
                h4('Options:'),
                p('grid map dimensions')
            ),
            box(title='Links',width=2,height=400,
                HTML('<a href="http://www.cioslab.vcu.edu/alg/Visualize/kohonen-82.pdf" target="_blank">Paper</a>'),br(),br(),
                tags$a(href='https://en.wikipedia.org/wiki/Self-organizing_map',target="_blank", "Wikipedia"),br(),br(),
                tags$a(href='https://www.jstatsoft.org/index.php/jss/article/view/v021i05/v21i05.pdf', "R package")
            ),
            box(width=12,
              plotOutput('Kohonen.2.raster_0'),br(),
              plotOutput('Kohonen.2.mapping.Process_1.RGB.explosion'),br(),
              plotOutput('Kohonen.2.raster_1',click='click.Kohonen.2.raster_1'),br(),
              plotOutput('Kohonen.2.chromato_1',height='600px')
            )
    ),
    tabItem(tabName = 'RBM_1',
            box(title='Options',width=4,height=400,
                tableOutput('RBM.1.option'),
                actionButton('RBM.1.go','Analyze')
            ),
            box(title='Info',width=6,height=400,
                h4('Deconstruction:'),
                p('chromatograms aspect (margin = 2, transform = T)'),
                p('The second process use the hidden unit states from the first process with a PCA to capture the features of the samples'),
                h4('Algorithm:'),
                p('RBM: an algorithm wich encode the input into a given amount of hidden unit and try to reproduce the input from it'),
                h4('Plots:'),
                p('image: original'),
                p('image: reconstruct from hidden layer'),
                p('image: hidden unit states, click to see the weights and original chromatograms'),
                p('chromatograms: weight and input data'),
                p('image: PCA reconstruction of the hidden units'),
                p('scatterplot: first and second PCA component, select to see them appear on the following image'),
                p('image: selected samples from the previous scatterplot'),
                h4('Options:'),
                p('hidden:	number of hidden units'),
                p('numepochs:	number of iteration for samples'),
                p('batchsize: size of mini-batch'),
                p('learningrate:	learning rate for gradient descent.'),
                p('momentum:	momentum for gradient descent.')
            ),
            box(title='Links',width=2,height=400,
                HTML('<a href="http://www.cs.toronto.edu/~hinton/absps/guideTR.pdf" target="_blank">Paper</a>'),br(),br(),
                tags$a(href='https://en.wikipedia.org/wiki/Restricted_Boltzmann_machine',target="_blank", "Wikipedia"),br(),br(),
                tags$a(href='https://cran.r-project.org/web/packages/deepnet/deepnet.pdf', "R package")
            ),
            box(width=12,
                plotOutput('RBM.1.raster_0'),br(),
                uiOutput('RBM.1.slider.epochs'),br(),
                plotOutput('RBM.1.raster_1'),br(),
                plotOutput('RBM.1.raster_2',click='click.RBM.1.raster_2'),br(),
                plotOutput('RBM.1.chromato.1'),
                h3('Process bis: PCA'),
                sliderInput('RBM.1.slider.comp','Number of Component to take in the reconstruction',min=1,max=20,value=3),
                plotOutput('RBM.1.raster_3'),br(),
                plotOutput('RBM.1.scores_1',brush = 'brush.RBM.1.scores_1',height='600px'),br(),
                plotOutput('RBM.1.raster_4'),br()
                )

    ),
    tabItem(tabName = 'RBM_2',
            box(title='Options',width=4,height=400,
                tableOutput('RBM.2.option'),
                actionButton('RBM.2.go','Analyze')
            ),
            box(title='Info',width=6,height=400,
                h4('Deconstruction:'),
                p('pixels aspect (margin = 3, transform = F)'),
                h4('Algorithm:'),
                p('RBM: an algorithm wich encode the input into a given amount of hidden unit and try to reproduce the input from it'),
                h4('Plots:'),
                p('image: original'),
                p('image: reconstruct from hidden layer'),
                p('image: reconstruct from hidden layer with a normalization step'),
                p('image: hidden unit states, click to see the weights, original and reconstruct chromatograms'),
                p('chromatograms: weight, input and output data'),
                p('network: interactive network plot, click on the cells to see the correponding image in the 2 following plots'),
                p('image: clicked cell from the network plot'),
                p('image: double clicked cell from the network plot'),
                h4('Options:'),
                p('hidden:	number of hidden units'),
                p('numepochs:	number of iteration for samples'),
                p('batchsize: size of mini-batch'),
                p('learningrate:	learning rate for gradient descent.'),
                p('momentum:	momentum for gradient descent.')
            ),
            box(title='Links',width=2,height=400,
                HTML('<a href="http://www.cs.toronto.edu/~hinton/absps/guideTR.pdf" target="_blank">Paper</a>'),br(),br(),
                tags$a(href='https://en.wikipedia.org/wiki/Restricted_Boltzmann_machine',target="_blank", "Wikipedia"),br(),br(),
                tags$a(href='https://cran.r-project.org/web/packages/deepnet/deepnet.pdf', "R package")
            ),
            box(width=12,
              plotOutput('RBM.2.raster_0'),br(),
              plotOutput('RBM.2.raster_1'),br(),
              plotOutput('RBM.2.raster_2',click='click.RBM.2.raster_2'),br(),
              plotOutput('RBM.2.chromato_1',height='800px'),br(),
              plotOutput('RBM.2.network_1',click='click.RBM.2.network_1',dblclick='dblclick.RBM.2.network_1',height = '600px'),br(),
              plotOutput('RBM.2.raster_3_click'),br(),
              plotOutput('RBM.2.raster_4_dblclick')
            )
    ),
    tabItem(tabName = 'RBM_3',
            box(title='Options',width=4,height=400,
                tableOutput('RBM.3.option'),
                actionButton('RBM.3.go','Analyze')
            ),
            box(title='Info',width=6,height=400,
                h4('Deconstruction Process 1:'),
                p('pixels aspect with "patch" (margin = 3, transform = F)'),
                p('This deconstruction take the envirronment of the pixels insterad of just a 1*1 pixel
                   and is designed for a better reconstruction, specially with bioassay and 254nm pictures'),
                h4('Deconstruction Process 2:'),
                p('chromatograms aspect after the reconstruction'),
                h4('Algorithm:'),
                p('RBM: an algorithm wich encode the input into a given amount of hidden unit and try to reproduce the input from it'),
                h4('Plots:'),
                p('image: original'),
                p('image: reconstruct from hidden layer'),
                p('image: hidden unit states, click to see the weights, original and reconstruct chromatograms'),
                p('chromatograms: input and output data'),
                p('network: interactive network plot, click on the cells to see the correponding image in the 2 following plots'),
                p('image: clicked cell from the network plot'),
                p('image: double clicked cell from the network plot'),
                p('image: original'),
                p('image: reconstruction after the second process'),
                h4('Options:'),
                p('conv_width: number of pixels to take around, 0 means 1*1, 2 means 5*5'),
                p('hidden:	number of hidden units'),
                p('numepochs:	number of iteration for samples'),
                p('batchsize: size of mini-batch'),
                p('learningrate:	learning rate for gradient descent.'),
                p('momentum:	momentum for gradient descent.')
            ),
            box(title='Links',width=2,height=400,
                HTML('<a href="http://www.cs.toronto.edu/~hinton/absps/guideTR.pdf" target="_blank">Paper</a>'),br(),br(),
                tags$a(href='https://en.wikipedia.org/wiki/Restricted_Boltzmann_machine',target="_blank", "Wikipedia"),br(),br(),
                tags$a(href='https://cran.r-project.org/web/packages/deepnet/deepnet.pdf', "R package")
            ),
            box(width=12,
                plotOutput('RBM.3.raster_0'),br(),
                plotOutput('RBM.3.raster_1',click='click.RBM.3.raster_1'),br(),
                plotOutput('RBM.3.chromato_1',height='600px'),br(),
                plotOutput('RBM.3.network_1',click='click.RBM.3.network_1',dblclick='dblclick.RBM.3.network_1',height = '600px'),br(),
                plotOutput('RBM.3.raster_3_click',click='click.RBM.3.raster_3'),br(),
                plotOutput('RBM.3.raster_4_dblclick'),
                plotOutput('RBM.3.chromato_2',height='600px'),br(),
                h3('Process.2 chromatograms'),
                tableOutput('RBM.3.Process.2.option'),
                actionButton('RBM.3.Process.2.go','Analyze'),
                plotOutput('RBM.3.raster_5'),
                plotOutput('RBM.3.raster_6')
                )

    ),
    tabItem(tabName = 'RBM_4',
            box(title='Options',width=4,height=400,
                tableOutput('RBM.4.option'),
                actionButton('RBM.4.go','Analyze')
            ),
            box(title='Info',width=6,height=400,
                h4('Deconstruction:'),
                p('chromatograms aspect (margin = 2, transform = T)'),
                p('The second and third processes use the hidden unit states from the first process'),
                h4('Algorithm:'),
                p('RBM: an algorithm wich encode the input into a given amount of hidden unit and try to reproduce the input from it'),
                p('Here RBM are stacking together, the name of this technique is Deep Believe Network (check this), this is deep learning'),
                h4('Plots:'),
                p('image: original'),
                p('image: hidden layer 1'),
                p('image: orifginal reconstruct from layer 1'),
                p('image: hidden layer 2'),
                p('image: layer 1 reconstruct from layer 2'),
                p('image: original reconstruct from layer 2'),
                p('image: hidden layer 3'),
                p('image: layer 2 reconstruct from layer 3'),
                p('image: layer 1 reconstruct from layer 3'),
                p('image: original reconstruct from layer 3'),
                h4('Options:'),
                p('hidden 1:	number of hidden units in the layer 1'),
                p('hidden 2:	number of hidden units in the layer 2'),
                p('hidden 3:	number of hidden units in the layer 3'),
                p('numepochs:	number of iteration for samples'),
                p('batchsize: size of mini-batch'),
                p('learningrate:	learning rate for gradient descent.'),
                p('momentum:	momentum for gradient descent.')
            ),
            box(title='Links',width=2,height=400,
                HTML('<a href="http://www.cs.toronto.edu/~hinton/absps/guideTR.pdf" target="_blank">RBM Paper</a>'),br(),br(),
                tags$a(href='https://en.wikipedia.org/wiki/Restricted_Boltzmann_machine',target="_blank", "RBM Wikipedia"),br(),br(),
                tags$a(href='https://cran.r-project.org/web/packages/deepnet/deepnet.pdf', "R package RBM and DBN"),br(),br(),
                HTML('<a href="http://www.cs.toronto.edu/~hinton/absps/fastnc.pdf" target="_blank">DBN Paper</a>'),br(),br(),
                tags$a(href='https://en.wikipedia.org/wiki/Deep_belief_network',target="_blank", "DBN Wikipedia"),br(),br()
            ),
            box(width=12,
              h3('Original'),
              plotOutput('RBM.4.raster_0'),br(), # original
              h3('First Layer RBM'),
              plotOutput('RBM.4.raster_1'),br(), # hidden layer 1
              plotOutput('RBM.4.raster_2'),br(), # orifginal recon from layer 1
              h3('Second Layer RBM'),
              plotOutput('RBM.4.raster_3'),br(), # hidden layer 2
              plotOutput('RBM.4.raster_4'),br(), # layer 1 recon from layer 2
              plotOutput('RBM.4.raster_5'),br(), # original recon from layer 2
              h3('Third Layer RBM'),
              plotOutput('RBM.4.raster_6'),br(), # hidden layer 3
              plotOutput('RBM.4.raster_7'),br(), # layer 2 recon from layer 3
              plotOutput('RBM.4.raster_8'),br(), # layer 1 recon from layer 3
              plotOutput('RBM.4.raster_9'),br() # original recon from layer 3
            )
    ),
    tabItem(tabName = 'PCA_1',
            box(title='Options',width=4,height=400,
                p('No options here')
            ),
            box(title='Info',width=6,height=400,
                h4('Deconstruction:'),
                p('chromatograms aspect (margin = 2, transform = T)'),
                h4('Algorithm:'),
                p('PCA: This algorithm extract the principal components in order to reduce the dimensionnality of the dataset'),
                h4('Plots:'),
                p('image: original'),
                p('image: reconstructed  from the principal component analysis with the number of component choose above'),
                p('chromatograms: chromatograms selected from the above picture'),
                p('scatterplot: first and second PCA component, select to see them appear on the following image'),
                p('image: selected samples from the previous scatterplot'),
                p('image: first 10 components for each chromatograms'),
                h4('Options:'),
                p('none')
            ),
            box(title='Links',width=2,height=400,
                HTML('<a href="http://www.cl.uni-heidelberg.de/courses/ws14/deepl/BengioETAL12.pdf" target="_blank">PCA Book</a>'),br(),br(),
                tags$a(href='https://en.wikipedia.org/wiki/Principal_component_analysis',target="_blank", "PCA Wikipedia"),br(),br(),
                tags$a(href='https://cran.r-project.org/web/packages/ChemometricsWithR/ChemometricsWithR.pdf', "R package PCA"),br(),br()
            ),
            box(width=12,
              plotOutput('PCA.1.raster_0'),br(),
              sliderInput('PCA.1.slider.comp','Number of Component to take in the reconstruction',min=1,max=20,value=3),
              plotOutput('PCA.1.raster_1',click='click.PCA.1.raster_1'),br(),
              plotOutput('PCA.1.chromato_1'),br(),
              plotOutput('PCA.1.scores_1',brush = 'brush.PCA.1.scores_1',height='600px'),br(),
              plotOutput('PCA.1.raster_2'),br(),
              plotOutput('PCA.1.raster_3'),br()
            )
    ),
    tabItem(tabName = 'HCA_1',
            box(title='Options',width=4,height=400,
                p('No options here, could add the distance calcul technique and the clusterisation technique')
            ),
            box(title='Info',width=6,height=400,
                h4('Deconstruction:'),
                p('chromatograms aspect (margin = 2, transform = T)'),
                h4('Algorithm:'),
                p('Hierarchical cluster : a first step will calcul the distance between each sample, then those samples will be clusterize accoriding to this distance'),
                h4('Plots:'),
                p('clustertree'),
                p('image: selected samples in the selected cluster'),
                h4('Options:'),
                p('none')
            ),
            box(title='Links',width=2,height=400,
                HTML('<a href="http://iv.slis.indiana.edu/sw/data/ward.pdf" target="_blank">Paper</a>'),br(),br(),
                tags$a(href='https://en.wikipedia.org/wiki/Hierarchical_clustering',target="_blank", "Wikipedia"),br(),br(),
                tags$a(href='https://stat.ethz.ch/R-manual/R-devel/library/stats/html/hclust.html', "R package or function")
            ),
            box(width=12,
                plotOutput('HCA.1.raster_0'),br(),
                plotOutput('HCA.1.cluster_1',click='click.HCA.1.cluster_1'),br(),
                div(style="display:inline-block",numericInput('HCA.1.cluster.nbr.1','Number of Cluster',4)),
                div(style="display:inline-block",numericInput('HCA.1.select.1','Selected cluster',1)),
                div(style="display:inline-block",h4('problem here, selected cluster is not the same in the plot and the picture')),
                plotOutput('HCA.1.raster_1'),br()
                )
    ),
    tabItem(tabName = 'RNN_1',
            box(title='Options',width=4,height=400,
                tableOutput('RNN.1.option'),
                selectizeInput('RNN.1.channel','Channel choice, only one could be use, or not???',choices=c('red'=1,'green'=2,'blue'=3,'all'=0)),
                actionButton('RNN.1.go','Analyze')
                ),
            box(title='Info',width=4,height=400,
                h4('Deconstruction:'),
                p('chromatograms aspect (margin = 2, transform = T)'),
                h4('Algorithm:'),
                p('Reccurent neural network: this is a time series analysis algorithm, this algorithm aim to cross the sequences and capture the intrinsics features in order to reproduce the sequences afterwards'),
                h4('Plots:'),
                p('incomming, not really good result yet, need Python and LSTM'),
                h4('Options:'),
                p('hidden layer 1: number of unit isn the first hidden layer'),
                p('hidden layer 2: number of unit isn the second hidden layer'),
                p('maxit: maximum number of iteration')
                ),
            box(title='Link',width=4,height=400,
                HTML('<a href="http://crl.ucsd.edu/~elman/Papers/fsit.pdf" target="_blank">Paper</a>'),br(),br(),
                tags$a(href='https://en.wikipedia.org/wiki/Recurrent_neural_network',target="_blank", "Wikipedia"),br(),br(),
                tags$a(href='https://cran.r-project.org/web/packages/RSNNS/RSNNS.pdf', "R package or function")
                ),
            br(),
            box(width=12,
                plotOutput('RNN.1.raster_0'),
                plotOutput('RNN.1.raster_1',click='click.RNN.1.raster_1'),
                plotOutput('RNN.1.chromato_1',height='600px'),
                fileInput('RNN.1.upload.test','Upload your the file test picture',multiple = T),
                plotOutput('RNN.1.raster_2'),
                plotOutput('RNN.1.raster_3',click='click.RNN.1.raster_3'),
                plotOutput('RNN.1.chromato_2',height='600px'),
                h3('Process 2:  Double layer RBM'),
                actionButton('RNN.1.RBM.go','Analyse'),
                tableOutput('RNN.1.option.RBM'),
                plotOutput('RNN.1.raster_4'),
                plotOutput('RNN.1.raster_5'),
                plotOutput('RNN.1.raster_6')
            )

    ),
    tabItem(tabName = 'TSNE_1',
            box(title='Options',width=4,height=400,
                tableOutput('TSNE.1.option'),
                actionButton('TSNE.1.go','Analyze')
                ),
            box(title='Info',width=6,height=400,

                h4('Deconstruction:'),
                p('chromatograms aspect (margin = 2, transform = T)'),
                h4('Algorithm:'),
                p('t-SNE : an algorithm for dimension reduction, we expect to see the similar samples clusterize together'),
                h4('Plots:'),
                p('scatterplot: 2 new dimensions, each point is a sample, interactive plot, select a zone to see the correponding position of the samples in the picture above'),
                p('image: selected samples from the above scaetterplot'),
                h4('Options:'),
                p('initial_config: an argument providing a matrix specifying the initial embedding for X. '),
                p('perplexity:	Perplexity parameter. (optimal number of neighbors)'),
                p('max_iter:	Maximum number of iterations to perform.')
                ),
            box(title='Links',width=2,height=400,
                HTML('<a href="http://jmlr.org/papers/volume9/vandermaaten08a/vandermaaten08a.pdf" target="_blank">Paper</a>'),br(),br(),
                tags$a(href='https://en.wikipedia.org/wiki/T-distributed_stochastic_neighbor_embedding',target="_blank", "Wikipedia"),br(),br(),
                tags$a(href='https://cran.r-project.org/web/packages/tsne/tsne.pdf', "R package")
                ),
            box(width=12,
              plotOutput('TSNE.1.raster_0'),br(),
              plotOutput('TSNE.1.scores_1',brush = 'brush.TSNE.1.scores_1',height='600px'),br(),
              plotOutput('TSNE.1.raster_1'),br()
            )
    )
  )
)


dashboardPage(title = "TLC-brain",
              dashboardHeader(title = "TLC-brain"),
              sidebar,
              body
)
DimitriF/DLC documentation built on May 27, 2018, 9:04 a.m.