## import metadata and store it in phyloseq object
sample_data(d)<-.import_sample_data(input,d)
## Rarefy data
if(input$rareData){
d<-rarefy_even_depth(
d,
...
...
@@ -114,21 +82,19 @@ shinyServer
return(d)
}
## Rdata input
if(input$dataset=="rdata")
{
if(is.null(input$fileRData))
{
return()
}
load(input$fileRData$datapath)
if(exists("data"))
{
## Happy path
if(!is.null(input$fileRData))
load(input$fileRData$datapath)
if(exists("data")&&class(data)=="phyloseq")
return(data)
}else{
return()
}
## Unhappy path
return()
}
## Default case
load("demo/demo.RData")
return(get(input$dataset))
...
...
@@ -174,7 +140,7 @@ shinyServer
validate(
need(
data16S(),
"Firstly, you should select a demo dataset or upload an abundance BIOM file.\nFor example, with Galaxy, a BIOM file can be obtained at the end of FROGS workflow with the 'FROGS BIOM to std BIOM' tool"
"Firstly, you should select a demo dataset or upload an abundance BIOM file.\nFor example, with Galaxy, a BIOM file can be obtained at the end of FROGS workflow with the 'FROGS BIOM to std BIOM' tool.\n Make sure that the phyloseq object in the RData file is called 'data'."