Commit e9de9648 authored by Midoux Cedric's avatar Midoux Cedric

histScript

parent 226dc4d6
......@@ -210,16 +210,66 @@ shinyServer
"barGrid",
label = "Subplot : ",
choices = c("..." = 0, sample_variables(data16S()))
)
,
),
selectInput(
"barX",
label = "X : ",
choices = c("..." = 0, sample_variables(data16S()))
),
box(
title = "RCode",
width = NULL,
status = "primary",
collapsible = TRUE,
collapsed = TRUE,
verbatimTextOutput("histScript")
)
)
})
output$histScript <- renderText({
paste0(
"# Loading packages\n",
"source(\"https://raw.githubusercontent.com/mahendra-mariadassou/phyloseq-extended/master/R/load-extra-functions.R\")\n",
"\n",
"# Loading data\n",
paste0(
"load(\"",
paste("Easy16S-data", Sys.Date(), "RData", sep = "."),
"\") # if necessary, adapt the file path\n"
),
"\n",
"# View data\n",
"data\n",
"\n",
"# Plot barplot\n",
"p <- plot_bar(physeq = data",
ifelse(
is.null(checkNull(input$barFill)),
"",
paste0(",\n fill = \"", input$barFill, "\"")
),
ifelse(is.null(checkNull(input$barX)), "", paste0(",\n x = ", input$barX)),
ifelse(
is.null(checkNull(input$barTitle)),
"",
paste0(",\n title = \"", input$barTitle, "\"")
),
")\n",
ifelse(
is.null(checkNull(input$barGrid)),
"",
paste0(
"p <- p + facet_grid(\". ~ ",
input$barGrid,
"\", scales = \"free_x\")\n"
)
),
"\n",
"plot(p)"
)
})
output$histo <- renderPlot({
validate(need(data16S(),
"Requires an abundance dataset"))
......@@ -854,7 +904,11 @@ shinyServer
axes = as.numeric(input$acpAxes),
title = checkNull(input$acpTitle),
color = checkNull(input$acpCol),
replicate = if (is.null(checkNull(input$acpRep))) { NULL } else { checkNull(input$acpRep) },
replicate = if (is.null(checkNull(input$acpRep))) {
NULL
} else {
checkNull(input$acpRep)
},
shape = checkNull(input$acpShape),
label = checkNull(input$acpLabel)
)
......
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