Commit c2e3d1e6 authored by Amine  GHOZLANE's avatar Amine GHOZLANE
Browse files

Add export tables

parent 7334a71b
Pipeline #31919 passed with stages
in 106 minutes and 31 seconds
redoofig.R
*.Rproj.user *.Rproj.user
*.Rhistory *.Rhistory
*.RData *.RData
......
...@@ -642,7 +642,8 @@ shinyServer(function(input, output,session) { ...@@ -642,7 +642,8 @@ shinyServer(function(input, output,session) {
if(!is.null(tree)) if(!is.null(tree))
{ {
res = tabBox(width = NULL, selected = "Count table", res = tabBox(width = NULL, selected = "Count table",
tabPanel("Count table",DT::dataTableOutput("DataCounts")), tabPanel("Count table",DT::dataTableOutput("DataCounts"),
downloadButton('ExportRawCounts', 'Export count table file')),
tabPanel("Taxonomy",DT::dataTableOutput("DataTaxo"), tabPanel("Taxonomy",DT::dataTableOutput("DataTaxo"),
actionButton("deleteTaxo", "Delete annotation"), actionButton("deleteTaxo", "Delete annotation"),
downloadButton('ExportTaxo', 'Export taxonomy file')), downloadButton('ExportTaxo', 'Export taxonomy file')),
...@@ -655,7 +656,8 @@ shinyServer(function(input, output,session) { ...@@ -655,7 +656,8 @@ shinyServer(function(input, output,session) {
else else
{ {
res = tabBox(width = NULL,selected = "Count table", res = tabBox(width = NULL,selected = "Count table",
tabPanel("Count table",DT::dataTableOutput("DataCounts")), tabPanel("Count table",DT::dataTableOutput("DataCounts"),
downloadButton('ExportRawCounts', 'Export count table file')),
tabPanel("Taxonomy",DT::dataTableOutput("DataTaxo"), tabPanel("Taxonomy",DT::dataTableOutput("DataTaxo"),
actionButton("deleteTaxo", "Delete annotation"), actionButton("deleteTaxo", "Delete annotation"),
downloadButton('ExportTaxo', 'Export taxonomy file')), downloadButton('ExportTaxo', 'Export taxonomy file')),
...@@ -2307,6 +2309,10 @@ shinyServer(function(input, output,session) { ...@@ -2307,6 +2309,10 @@ shinyServer(function(input, output,session) {
write_biom(make_biom(dataMergeCounts()$CT_noNorm, sample_metadata=values$TargetWorking[,-1], write_biom(make_biom(dataMergeCounts()$CT_noNorm, sample_metadata=values$TargetWorking[,-1],
observation_metadata=dataInput()$data$taxo_biom), file)} observation_metadata=dataInput()$data$taxo_biom), file)}
) )
output$ExportRawCounts <- downloadHandler(
filename = function() { 'SHAMAN_count.csv' },
content = function(file){write.csv(dataInput()$data$counts, file)}
)
output$ExportTaxo <- downloadHandler( output$ExportTaxo <- downloadHandler(
filename = function() { 'SHAMAN_taxo.csv' }, filename = function() { 'SHAMAN_taxo.csv' },
......
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