knitr::opts_chunk$set(echo = TRUE)
library(shiny)

shiny::shinyApp(

  ui = shiny::fluidPage(theme="bootstrap.css",
    titlePanel("LoxCodeR"),

    navbarPage("LoxcodeR",
      tabPanel("Load File"),
      tabPanel("Summary Table",
        shiny::tableOutput("summary_table")
      ),

      tabPanel("Overview",
        shiny::plotOutput("readstats")
      ),

      tabPanel("Heatmap",
        shiny::plotOutput("heatmap"),
        shiny::fluidRow(
          column(4, shiny::selectInput("matrix", "Sample:", choices = names(D@count_matrixes))),
          column(8, shiny::selectInput("codeset", "Codes:", choices = names(D@code_sets)))
        )
      ),

      tabPanel("Saturation Plot"),

      tabPanel("Pair Comparison Plot")

    ),

  ),

  server = function(input, output) {

    output$heatmap = renderPlot({
      loxcoder::heatmap_plot(D, code_set=input$codeset)
    })

    output$summary_table = DT::renderDataTable(DT::datatable({
      data <- loxcoder::summary_table(D)
      data
    }))

    output$readstats = renderPlot({
      loxcoder::readstats_plot(D)
    })
  },

  options = list(height = 600)
)


jngwehi/loxcodeR documentation built on March 17, 2020, 5:32 p.m.