R/ui_MAN.R

Defines functions ui_smallMolMan

Documented in ui_smallMolMan

# Create MAN UI
#----

#' ui_smallMolMan
#'
#' @return UI
#' @export
#'
ui_smallMolMan <-  function(){
  
  fluidPage(
    sidebarLayout(
      
      
      sidebarPanel(width = 3,
                   style = 'padding:30px',
                   tempRepo::bsCollapse(id = "collapseManSettings",
                                        open = "Panel 1",
                                        tempRepo::bsCollapsePanel(p("Show/Hide MAN Settings", 
                                                                    align = "center"),
                                                                  div(align = "center",
                                                                      tempRepo::peakRetentionSettings_UI("smallMirror",
                                                                                                         minMass = 200, 
                                                                                                         maxMass = 2000)
                                                                  )
                                        )),
                   uiOutput("matrixSelector"),
                   tempRepo::bsCollapse(id = "collapseManSettings",
                                        open = "Panel 1",
                                        tempRepo::bsCollapsePanel(p("Adjust Protein Dendrogram", 
                                                                    align = "center"),
                                                                  numericInput("hclustHeightNetwork",
                                                                               label = h5(strong("Expand Tree")),
                                                                               value = 750,
                                                                               step = 50,
                                                                               min = 100),
                                                                  numericInput("dendparmar2",
                                                                               label = h5(strong("Adjust right margin of dendrogram")),
                                                                               value = 5)
                                        )),
                   div(align = "center",
                       tempRepo::downloadSmNet_UI("smMAN")
                   ),
                   br(),
                   p(strong("Hint 1:"),
                     "Use mouse to select parts of the tree and display the MAN of corresponding samples."),
                   p(strong("Hint 2:"),
                     "Use mouse to click & drag parts (nodes) of the MAN if it appears congested."),
                   br(),
                   
                   p(strong("Note 1:"), "For publication-quality networks click \"Download Current Network Data\".
                   This will download a .csv file of the currently-displayed
                   network that can be easily imported into Gephi or Cytoscape."),
                   br(),
                   h4("Suggestions for Reporting MAN Analysis:"),
                   uiOutput("manReport")
                   
                   
      ),
      mainPanel(
        column(width = 5,
               
               
               tabsetPanel(type = "tabs",           
                           tabPanel(value = "protd","Protein Dendrogram",
                                    
                                    manPageProtDend_UI("manProtDend")
                                    
                                    
                           ))),
        column(width = 7,
               
               tabsetPanel(type = "tabs",           
                           tabPanel(value = "smallMolMANUI","Small Molecule MAN",
                                    p("Nodes in the MAN are colored by modularity score, not the same colors as the protein dendrogram.",
                                      style = "font-size: 0.75em"),
                                    tempRepo::smMANPlot_UI("smMAN")),
                           tabPanel(value = "smallMolPCAUi","Small Molecule PCA",
                                    
                                    plotly::plotlyOutput("smallMolPcaPlot")
                           ),
                           tabPanel(value = "smallMirror", "Small Molecule Mirror Plot",
                                    tempRepo::smallmirrorPlotsSampleSelect_UI("smallMirror"),
                                    tempRepo::smallmirrorPlots_UI("smallMirror"))
                           
                           
                           
               ))
      )
    ))
  
  
}

mirrorPlots_UI
chasemc/tempRepo documentation built on May 28, 2019, 7:32 p.m.