R/ui_proteinClustering.R

Defines functions ui_proteinClustering

Documented in ui_proteinClustering

#' ui_proteinClustering
#'
#' @return NA
#' @export
#'

ui_proteinClustering <- function() {
  
  
  # in hier -> delineatwe settings menu vs optional
  fluidPage(
    # sidebarLayout(
    
    sidebarPanel(style = "background-color:#7777770d", 
                 width = 4,
                 wellPanel(
                   div(p("Analysis Settings",
                         style = "text-decoration: underline; font-weight: bold; font-size: 1.2em;"),
                       align = "center"),
                   tempRepo::bsCollapse(id = "proteinPeakSettingsDropDown",
                                        open = "Panel 1",
                                        
                                        tempRepo::bsCollapsePanel(title = div(p("Choose how Peaks are Retained for Analyses", align = "center"),
                                                                              p("(Effects all protein analysis)",
                                                                                style = "font-size: 0.75em",
                                                                                align = "center")), 
                                                                  value = "proteinPeakSettingsDropDown2",
                                                                  div(align = "center",
                                                                      tempRepo::peakRetentionSettings_UI("protMirror")
                                                                  )
                                                                  
                                                                  
                                        ),
                                        tempRepo::bsCollapsePanel(p("Select Samples", 
                                                                    align = "center"),
                                                                  value = "selectProteinSamplesDropDown",
                                                                  p("Move samples between boxes by clicking the samples's name
                                                                    and then an arrow. Samples in the right box will be used for analysis."),
                                                                  tempRepo::sampleChooser_UI("proteinSampleChooser")
                                                                  
                                        ),
                                        tempRepo::bsCollapsePanel(p("Choose Clustering Settings", 
                                                                    align = "center"),
                                                                  value = "proteinClustSettingsDropDown",
                                                                  div(align = "center",
                                                                  tempRepo::dendrogramCreatorUI("proteinHierOptions")
                                                                  )
                                        )           )
                 ),    
                 wellPanel(
                   div(p("Optional Settings", style = "text-decoration: underline; font-weight: bold; font-size: 1.2em;"), align = "center" ),
                   tempRepo::bsCollapse(id = "optionalProteinPeakSettingsDropDown",
                                        
                                        tempRepo::bsCollapsePanel(p("Adjust the Dendrogram", 
                                                                    align = "center"),
                                                                  value = "adjustProteinDendDropDown",
                                                                  numericInput("hclustHeight",
                                                                               label = h5(strong("Expand dendrogram")),
                                                                               value = 750,
                                                                               step = 50,
                                                                               min = 100),
                                                                  numericInput("dendparmar",
                                                                               label = h5(strong("Adjust right margin of dendrogram")),
                                                                               value = 20),
                                                                  radioButtons("dendOrPhylo", 
                                                                               label = p("Label Positions:"),
                                                                               choices = list("Plot all labels at x = 0" = "Dendrogram", 
                                                                                              "Hang labels" = "Phylogram"),
                                                                               selected = "Dendrogram"),
                                                                  fluidRow(tempRepo::colordendLabelsUI("proth")),
                                                                  fluidRow(tempRepo::colordendLinesUI("proth")),
                                                                  fluidRow(tempRepo::addDotsActionUI("proth"))
                                                                  
                                        ),
                                        tempRepo::bsCollapsePanel(p("Insert Samples from Another Experiment", 
                                                                    align = "center"),     
                                                                  value = "proteinInjectDropDown",
                                                                  tempRepo::selectInjections_UI("proteinInject")
                                                                  
                                        ),
                                        tempRepo::bsCollapsePanel(p("PCA, PCoA, t-SNE", 
                                                                    align = "center"),   
                                                                  value = "proteinMuliDimDropDown",
                                                                  p("Principal Component Analysis (PCA)"),
                                                                  tempRepo::popupPlot_UI("proteinPCA", "PCA"),
                                                                  
                                                                  p("Principal Coordinates Analysis (PCoA)"),
                                                                  tempRepo::popupPlot_UI("proteinPCOA", "PCoA"),
                                                                  
                                                                  p("t-Distributed Stochastic Neighbor Embedding (t-SNE)"),
                                                                  tempRepo::popupPlotTsne_UI("tsnePanel")
                                                                  
                                                                  
                                        ),
                                        tempRepo::bsCollapsePanel(p("Save Dendrogram", 
                                                                    align = "center"),   
                                                                  value = "proteinDendSaveDropDown",
                                                                  
                                                                  tempRepo::downloadHier("proth"),
                                                                  tempRepo::downloadSvg("proth")
                                        )             )
                 ),
                 br(),
                 uiOutput("proteinReport")
                 
    ),
    
    mainPanel(
      
      tabsetPanel(type = "tabs",           
                  tabPanel(value = "proteinMirror","Mirror Plots",
                           h3("Mirror Plot", align = "center"),
                           br(),
                           p("Choose two samples to compare in the mirror plot below.
                           Matching peaks will be colored blue and non-matching peaks
                           will be colored red."),
                           p("Note: Binning algorithm for mirror plot and dendrogram is different.", style = "font-size: 0.75em"),
                           br(),
                           fluidRow(
                             tempRepo::mirrorPlotsSettings_UI("protMirror")
                           ),
                           fluidRow(
                             tempRepo::mirrorPlots_UI("protMirror")
                           ),
                           fluidRow(
                             tempRepo::mirrorPlotDownload_UI("protMirror")
                           )
                  ),
                  tabPanel(value = "proteinDendrogram","Dendrogram",
                           tempRepo::displayMissingProteinUI("proth"),
                           tempRepo::plotHier("proth"),
                           tempRepo::dendDotsUI("proth")
                  )
      )
    )
    
  )
  
  
}
chasemc/tempRepo documentation built on April 8, 2019, 10:22 p.m.