Commit 77d8adb6 authored by Midoux Cedric's avatar Midoux Cedric

rework summary

parent d14cb37b
......@@ -8,50 +8,56 @@ output$phyloseqPrint <- renderPrint({
physeq()
})
output$sampledataTable <- renderUI({
validate(need(sample_data(data16S(), errorIfNULL = FALSE), ""))
collapsedBox(renderTable({
(sapply(sample_data(data16S()), class))
}, rownames = TRUE, colnames = FALSE),
title = "Class of sample_data")
output$otuTable <- renderUI({
validate(need(physeq(), ""))
collapsedBox(
beautifulTable(data.frame(OTU = taxa_names(physeq()), otu_table(physeq()))),
title = "OTU table"
)
})
output$summaryTable <- renderUI({
validate(need(data16S(), ""))
output$glomOtuTable <- renderUI({
validate(need(physeq(), ""))
box(
title = "Tables",
title = "Agglomerate OTU table",
width = NULL,
status = "primary",
tabsetPanel(
tabPanel("otu_table",
beautifulTable(
data.frame(OTU = taxa_names(data16S()), otu_table(data16S()))
)),
tabPanel("tax_table",
beautifulTable(
data.frame(OTU = taxa_names(data16S()), tax_table(data16S()))
)),
tabPanel("sample_data",
#as.data.frame(sapply(sample_data(data16S()), class)),
beautifulTable(
data.frame(SAMPLE = sample_names(data16S()), sample_data(data16S()))
)),
tabPanel(
"agglomerate_taxa",
radioButtons(
"glomRank",
collapsible = TRUE,
collapsed = TRUE,
radioButtons("glomRank",
label = "Taxonomic rank : ",
choices = rank_names(data16S()),
inline = TRUE
),
choices = rank_names(physeq()),
inline = TRUE),
DT::dataTableOutput("tableGlom")
)
})
output$taxTable <- renderUI({
validate(need(physeq(), ""))
collapsedBox(
beautifulTable(data.frame(OTU = taxa_names(physeq()), tax_table(physeq()))),
title = "Taxonomy table"
)
})
output$sampleDataTable <- renderUI({
validate(need(physeq(), ""))
collapsedBox(
beautifulTable(data.frame(SAMPLE = sample_names(physeq()), sample_data(physeq()))),
title = "Sample data table"
)
})
output$sampleDataType <- renderUI({
validate(need(sample_data(physeq(), errorIfNULL = FALSE), ""))
collapsedBox(renderTable({
(sapply(sample_data(physeq()), class))
}, rownames = TRUE, colnames = FALSE),
title = "Class of sample data")
})
output$tableGlom <- DT::renderDataTable(server = FALSE, {
Glom <- tax_glom(data16S(), input$glomRank, NArm = FALSE)
Glom <- tax_glom(physeq(), input$glomRank, NArm = FALSE)
taxTableGlom <- Glom %>%
tax_table() %>%
as.data.frame(stringsAsFactors = FALSE) %>%
......
Summary <- div(verbatimTextOutput("phyloseqPrint"),
uiOutput("sampledataTable"),
withLoader(uiOutput("summaryTable")),
uiOutput("downloadUI"),
uiOutput("otuTable"),
uiOutput("glomOtuTable"),
uiOutput("taxTable"),
uiOutput("sampleDataTable"),
uiOutput("sampleDataType"),
tags$footer("Questions, problems or comments regarding this application should be sent to ",
a(href = "mailto:cedric.midoux@irstea.fr?subject=[Easy16S]", "cedric.midoux@irstea.fr"),
a(href = "mailto:cedric.midoux@inrae.fr?subject=[Easy16S]", "cedric.midoux@inrae.fr"),
align = "center",
style = "position:absolute;bottom: 0;width: 100%;color: grey;padding: 10px;# background-color: white;z-index: 1000;"
)
)
)
......@@ -45,7 +45,6 @@ output$dataUI <- renderUI({
# "Morton et al., 2017" = "soil",
# "Ravel et al., 2011" = "ravel",
# "biorare" = "biorare",
"toto" = "toto",
"GlobalPatterns" = "GlobalPatterns")
),
"input" = tags$div(
......@@ -176,15 +175,6 @@ output$downloadData <- {
)
}
output$downloadUI <- renderUI({
validate(need(physeq(), ""))
tags$div(
style = "text-align:center",
title = "Download data as RData",
downloadButton("downloadData", "Download", style = "color: black; background-color: gray90")
)
})
# output$rarefactionMin <- renderText({
# validate(need(input$fileBiom, ""),
# need(input$dataset == "input", ""))
......
......@@ -15,7 +15,15 @@ source("panels/Help-ui.R", local = TRUE)
shinyUI(dashboardPage(
dashboardHeader(title = "Easy16S"),
dashboardSidebar(
actionButton("dataButton", "Select your data"),
actionButton("dataButton",
"Select your data",
icon = icon("upload"),
style = "width: 80% ; color: black ; background-color: gray90"),
actionButton("downloadData",
"Download",
icon = icon("download"),
style = "width: 80% ; color: black ; background-color: gray90"),
#uiOutput("downloadUI"),
sidebarMenu(
menuItem("Summary", tabName = "Summary", icon = icon("dashboard")),
menuItem("Barplot", tabName = "barplot", icon = icon("dashboard")),
......
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