Commit a949d8e1 authored by Midoux Cedric's avatar Midoux Cedric

Table with agglomerate taxe but not DataTable formatting

parent 2f2009bb
......@@ -27,7 +27,7 @@ shinyServer
options = list(
dom = "lBtip",
pageLength = 10,
lengthMenu = list(c(10, 25, 50, 100, -1), list('10', '25', '50', '100', 'All')),
lengthMenu = list(c(10, 25, 50, 100,-1), list('10', '25', '50', '100', 'All')),
buttons = list(
'colvis',
list(
......@@ -52,7 +52,6 @@ shinyServer
source("internals.R")
data16S <- reactive({
## BIOM input
if (input$dataset == "input")
{
......@@ -88,7 +87,8 @@ shinyServer
## .import_from_rdata(input) ## does not work as a function for some reason
## Happy path
ne <- new.env() ## new env to store RData content and avoid border effects
ne <-
new.env() ## new env to store RData content and avoid border effects
if (!is.null(input$fileRData))
load(input$fileRData$datapath, envir = ne)
if (class(ne$data) == "phyloseq")
......@@ -169,11 +169,38 @@ shinyServer
#as.data.frame(sapply(sample_data(data16S()), class)),
beautifulTable(
data.frame(SAMPLE = sample_names(data16S()), sample_data(data16S()))
))
)),
tabPanel(
"agglomerate_taxa",
radioButtons(
"glomRank",
label = "Taxonomic rank : ",
choices = rank_names(data16S()),
inline = TRUE
),
dataTableOutput("tableGlom")
)
)
)
})
output$tableGlom <- renderDataTable({
Glom <- tax_glom(data16S(), input$glomRank)
taxTableGlom <- Glom %>%
tax_table() %>%
as.data.frame() %>%
dplyr::select(1:input$glomRank) %>%
tibble::rownames_to_column()
otuTableGlom <- Glom %>%
otu_table() %>%
as.data.frame() %>%
tibble::rownames_to_column()
joinGlom <-
dplyr::left_join(taxTableGlom, otuTableGlom, by = "rowname") %>%
dplyr::select(-rowname)
return(joinGlom)
})
output$histUI <- renderUI({
validate(need(data16S(), ""))
box(
......
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