Commit 58726f00 authored by Midoux Cedric's avatar Midoux Cedric
Browse files

adonis

parent 894413b0
......@@ -5,6 +5,7 @@ betaDist <- metaReactive2({
})
})
## MDS
output$betaMdsUI <- renderUI({
validate(need(physeq(), ""))
box(
......@@ -100,6 +101,7 @@ observeEvent(input$betaMds_output_code,
}
)
## Cluster
output$betaClusterUI <- renderUI({
validate(need(physeq(), ""))
box(
......@@ -142,6 +144,34 @@ observeEvent(input$betaCluster_output_code,
}
)
## MANOVA
output$betaManovaUI <- renderUI({
validate(need(physeq(), ""))
box(
title = "Setting : " ,
width = NULL,
status = "primary",
selectInput("betaManovaVar",
label = "Covariates",
multiple = TRUE,
choices = c(sample_variables(physeq())),
selected = NULL)#,
# actionButton("betaManovaButton",
# "Compute"),
)
})
output$betaManova <- renderPrint({
validate(need(physeq(), "Requires an abundance dataset"))
validate(need(input$betaManovaVar, "Requires at least one covariate"))
vegan::adonis(
as.formula(paste("betaDist()", "~", paste(input$betaManovaVar, collapse = "*"))),
data = as(sample_data(physeq()), "data.frame"),
perm = 9999)
})
## Heatmap
output$betaHeatmapUI <- renderUI({
validate(need(physeq(), ""))
box(
......@@ -211,6 +241,7 @@ observeEvent(input$betaHeatmap_output_code,
}
)
## Network
output$betaNetworkUI <- renderUI({
validate(need(physeq(), ""))
box(
......@@ -275,6 +306,7 @@ observeEvent(input$betaNetwork_output_code,
}
)
## Table
output$betaTable <- renderUI({
validate(need(physeq(), "Requires an abundance dataset"))
box(
......
......@@ -2,8 +2,11 @@ betaMds <- fluidPage(outputCodeButton(withLoader(plotOutput("betaMds", height =
uiOutput("betaMdsUI"))
betaCluster <- fluidPage(outputCodeButton(withLoader(plotOutput("betaCluster", height = 700))),
uiOutput("betaClusterUI"))
betaHeatmap <- fluidPage(outputCodeButton(withLoader(plotOutput("betaHeatmap", height = 700))),
uiOutput("betaHeatmapUI"))
betaManova <- fluidPage(withLoader(verbatimTextOutput("betaManova")),
uiOutput("betaManovaUI"),
verbatimTextOutput("betaManova2"))
betaNetwork <- fluidPage(outputCodeButton(withLoader(plotOutput("betaNetwork", height = 700))),
uiOutput("betaNetworkUI"))
betaHeatmap <- fluidPage(outputCodeButton(withLoader(plotOutput("betaHeatmap", height = 700))),
uiOutput("betaHeatmapUI"))
betaTable <- fluidPage(uiOutput("betaTable"))
......@@ -69,6 +69,7 @@ dashboardHeader(title = "Easy16S"),
choices = list("bray", "jaccard", "unifrac", "wunifrac", "dpcoa", "jsd", "euclidean")),
menuSubItem("MultiDimensional Scaling", tabName = "betaMds"),
menuSubItem("Samples clustering", tabName = "betaCluster"),
menuSubItem("Multivariate ANOVA", tabName = "betaManova"),
menuSubItem("Network", tabName = "betaNetwork"),
menuSubItem("Samples heatmap", tabName = "betaHeatmap"),
menuSubItem("Table", tabName = "betaTable")
......@@ -91,6 +92,7 @@ dashboardHeader(title = "Easy16S"),
tabItem(tabName = "alphaTable", alphaTable),
tabItem(tabName = "betaMds", betaMds),
tabItem(tabName = "betaCluster", betaCluster),
tabItem(tabName = "betaManova", betaManova),
tabItem(tabName = "betaNetwork", betaNetwork),
tabItem(tabName = "betaHeatmap", betaHeatmap),
tabItem(tabName = "betaTable", betaTable),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment