Commit 3cbc62de authored by Midoux Cedric's avatar Midoux Cedric
Browse files

deseqTable

parent 41ab68de
......@@ -84,7 +84,7 @@ beautifulTable <- function(data) {
filter = "top",
extensions = c("Buttons", "ColReorder", "FixedColumns"),
options = list(
dom = "lBtip",
dom = "Btlip",
pageLength = 10,
lengthMenu = list(c(10, 25, 50, 100,-1), list('10', '25', '50', '100', 'All')),
buttons = list(
......
......@@ -189,6 +189,32 @@ observeEvent(input$deseq_output_code,
}
)
# output$deseqTable <- metaRender2(renderTable, {
# }
# )
output$deseqTable <- renderDT({
validate(
need(physeq(), "Requires an abundance dataset"),
need(class(get_variable(physeq(), input$deseqContrastVar)) == "numeric" ||
length(input$deseqContrastMod) == 2, "Requires a continuous design or a selection of two modalities for a discrete design."),
need(results(), "Invalid input.")
)
results() %>%
filter(padj <= 0.05) %>% ## Only significant OTUs
datatable(rownames = FALSE,
filter = "top",
extensions = c("Buttons", "ColReorder", "FixedColumns"),
options = list(dom = "Btlip",
pageLength = 10,
lengthMenu = list(c(10, 25, 50, 100, -1), list('10', '25', '50', '100', 'All')),
buttons = list('colvis',
list(extend = 'collection',
buttons = c('copy', 'csv', 'excel', 'pdf'),
text = 'Download')),
colReorder = TRUE,
scrollX = TRUE,
fixedColumns = list(leftColumns = 1, rightColumns = 0)
),
width = "auto",
height = "auto") %>%
formatSignif(columns = c("baseMean", "log2FoldChange", "lfcSE", "stat", "padj", "pvalue"), digits = 4) %>%
formatStyle(columns = "log2FoldChange", color = DT::styleInterval(0, c('red', 'green')))
})
\ No newline at end of file
deseq <- fluidPage(outputCodeButton(withLoader(plotOutput("deseq", height = 700))),
#table
box(
title = "Table of OTUs with significant effect",
width = NULL,
status = "primary",
collapsible = TRUE,
collapsed = TRUE,
DT::DTOutput("deseqTable")),
uiOutput("deseqUI"))
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