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

rework summary

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