R/ui_proteinClustering.R

#' 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"),
                   ghosts::bsCollapse(id = "proteinPeakSettingsDropDown",
                                        open = "Panel 1",
                                        
                                        ghosts::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",
                                                                      ghosts::peakRetentionSettings_UI("protMirror")
                                                                  )
                                                                  
                                                                  
                                        ),
                                        ghosts::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."),
                                                                  ghosts::sampleChooser_UI("proteinSampleChooser")
                                                                  
                                        ),
                                        ghosts::bsCollapsePanel(p("Choose Clustering Settings", 
                                                                    align = "center"),
                                                                  value = "proteinClustSettingsDropDown",
                                                                  div(align = "center",
                                                                  ghosts::dendrogramCreatorUI("proteinHierOptions")
                                                                  )
                                        )           )
                 ),    
                 wellPanel(
                   div(p("Optional Settings", style = "text-decoration: underline; font-weight: bold; font-size: 1.2em;"), align = "center" ),
                   ghosts::bsCollapse(id = "optionalProteinPeakSettingsDropDown",
                                        
                                        ghosts::bsCollapsePanel(p("Adjust the Dendrogram", 
                                                                    align = "center"),
                                                                  value = "adjustProteinDendDropDown",
                                                                  shiny::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,
                                                                               min = 0),
                                                                  div(align = "left",
                                                                  radioButtons("dendOrPhylo", 
                                                                               label = p("Label Positions:"),
                                                                               choices = list("Plot all labels at x = 0" = "Dendrogram", 
                                                                                              "Hang labels" = "Phylogram"),
                                                                               selected = "Dendrogram")
                                                                  ),
                                                                  fluidRow(ghosts::colordendLabelsUI("proth")),
                                                                  fluidRow(ghosts::colordendLinesUI("proth")),
                                                                  fluidRow(ghosts::addDotsActionUI("proth"))
                                                                  
                                        ),
                                        ghosts::bsCollapsePanel(p("Insert Samples from Another Experiment", 
                                                                    align = "center"),     
                                                                  value = "proteinInjectDropDown",
                                                                  ghosts::selectInjections_UI("proteinInject")
                                                                  
                                        ),
                                        ghosts::bsCollapsePanel(p("PCA, PCoA, t-SNE", 
                                                                    align = "center"),   
                                                                  value = "proteinMuliDimDropDown",
                                                                  p("Principal Component Analysis (PCA)"),
                                                                  ghosts::popupPlot_UI("proteinPCA", "PCA"),
                                                                  
                                                                  p("Principal Coordinates Analysis (PCoA)"),
                                                                  ghosts::popupPlot_UI("proteinPCOA", "PCoA"),
                                                                  
                                                                  p("t-Distributed Stochastic Neighbor Embedding (t-SNE)"),
                                                                  ghosts::popupPlotTsne_UI("tsnePanel")
                                                                  
                                                                  
                                        ),
                                        ghosts::bsCollapsePanel(p("Save Dendrogram", 
                                                                    align = "center"),   
                                                                  value = "proteinDendSaveDropDown",
                                                                  
                                                                  ghosts::downloadHier("proth"),
                                                                  ghosts::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(
                             ghosts::mirrorPlotsSettings_UI("protMirror")
                           ),
                           fluidRow(
                             ghosts::mirrorPlots_UI("protMirror")
                           ),
                           fluidRow(
                             ghosts::mirrorPlotDownload_UI("protMirror")
                           )
                  ),
                  tabPanel(value = "proteinDendrogram","Dendrogram",
                           ghosts::displayMissingProteinUI("proth"),
                           ghosts::plotHier("proth"),
                           ghosts::dendDotsUI("proth")
                  )
      )
    )
    
  )
  
  
}
chasemc/ghosts documentation built on May 8, 2019, 12:50 a.m.