server.R 1.31 KB
Newer Older
Midoux Cedric's avatar
PCA  
Midoux Cedric committed
1
options(shiny.maxRequestSize = 30 * 1024 ^ 2)
Midoux Cedric's avatar
Midoux Cedric committed
2

3
library(shinydashboard)
Midoux Cedric's avatar
Midoux Cedric committed
4
library(shinymeta)
Midoux Cedric's avatar
Midoux Cedric committed
5 6 7
library(phyloseq)
library(phyloseq.extended)
library(ggplot2)
Midoux Cedric's avatar
Midoux Cedric committed
8
library(dplyr)
Midoux Cedric's avatar
Midoux Cedric committed
9
library(DT)
Midoux Cedric's avatar
Midoux Cedric committed
10
library(magrittr)
Midoux Cedric's avatar
PCA  
Midoux Cedric committed
11
library(factoextra)
12 13 14

shinyServer
(function(input, output, session)
Midoux Cedric's avatar
Midoux Cedric committed
15 16 17
{  
  source("internals.R")
  source("panels/dataInput.R", local = TRUE)
18
  source("panels/Summary-server.R", local = TRUE)
Midoux Cedric's avatar
Midoux Cedric committed
19
  source("panels/table-server.R", local = TRUE)
Midoux Cedric's avatar
Midoux Cedric committed
20
  source("panels/barplot-server.R", local = TRUE)
Midoux Cedric's avatar
Midoux Cedric committed
21
  source("panels/heatmap-server.R", local = TRUE)
Midoux Cedric's avatar
Midoux Cedric committed
22
  source("panels/rarefactionCurve-server.R", local = TRUE)
Midoux Cedric's avatar
Midoux Cedric committed
23
  source("panels/richnessA-server.R", local = TRUE)
Midoux Cedric's avatar
Midoux Cedric committed
24
  source("panels/richnessB-server.R", local = TRUE)
Midoux Cedric's avatar
Midoux Cedric committed
25
  source("panels/mds-server.R", local = TRUE)
Midoux Cedric's avatar
Midoux Cedric committed
26
  source("panels/pca-server.R", local = TRUE)
Midoux Cedric's avatar
Midoux Cedric committed
27
  source("panels/tree-server.R", local = TRUE)
28 29

  physeq <- reactiveVal()
Midoux Cedric's avatar
Midoux Cedric committed
30 31 32
  raw_physeq <- reactiveVal()
  transform_physeq <- reactiveVal()
  
33 34 35 36
  showModal(dataInput())

  observeEvent(input$dataButton, {
    showModal(dataInput())
37
  })
38
  
Midoux Cedric's avatar
Midoux Cedric committed
39 40 41 42
  observeEvent(input$filterButton, {
    showModal(filterSample())
  })
  
Midoux Cedric's avatar
Midoux Cedric committed
43 44 45 46
  observeEvent(input$transformButton, {
    showModal(transformSample())
  })
  
Midoux Cedric's avatar
Midoux Cedric committed
47 48 49 50
  observeEvent(input$downloadButton, {
    showModal(dataDownload())
  })
  
Midoux Cedric's avatar
Midoux Cedric committed
51 52 53 54
  observeEvent(input$plotButton, {
    showModal(plotDownload())
  })
  
Midoux Cedric's avatar
Midoux Cedric committed
55
})