R/app_server.R

Defines functions app_server

#' The application server-side
#'
#' @param input,output,session Internal parameters for {shiny}.
#'     DO NOT REMOVE.
#' @import shiny
#' @import MolBio
#' @import reactable
#' @noRd
app_server <- function(input, output, session) {
  # Your application server logic
  # Make the number 10
  numb <- reactive(input$a)

  # use the module to make the DNA to protein.
  dna <- reactive(make_dna(numb()))
  rna <- reactive(make_rna(dna()))
  codon <- reactive(make_codon(rna()))
  protein <- reactive(make_polypeptide(codon()))
  chart <- reactive(find_aa_distribution(protein()))

  # View the outcomes
  output$oDNA <- renderText(dna())
  output$oRNA <- renderText(rna())
  output$oCodon <- renderText(codon())
  output$oProt <- renderText(protein())
  output$obar <- renderPlot(chart(), res = 96)
}
rforbiodatascience22/group_20_shiny documentation built on April 28, 2022, 12:07 a.m.