Commit a146766f authored by Midoux Cedric's avatar Midoux Cedric

rework clustScript

parent 7882da3a
......@@ -444,21 +444,22 @@ shinyServer
})
output$clustScript <- renderText({
paste0(
scriptArgs <- c(
"physeq = data",
glue("dist = \"{input$clustDist}\""),
glue("method = \"{input$clustMethod}\"")
)
if (!is.null(checkNull(input$clustCol))) {
scriptArgs <- c(scriptArgs, glue("col = \"{input$clustCol}\""))
}
script <- c(
scriptHead,
"# Plot barplot\n",
"p <- plot_clust(physeq = data",
glue(", dist = \"{input$clustDist}\""),
glue(", method = \"{input$clustMethod}\""),
ifelse(
is.null(checkNull(input$clustCol)),
"",
glue(", color = \"{input$clustCol}\"")
),
")\n",
"\n",
"plot(p)"
"# Plot samples clustering",
glue("p <- plot_clust({glue_collapse(scriptArgs, sep=', ')})")
)
script <- c(script, "", "plot(p)")
return(glue_collapse(script, sep = "\n"))
})
output$clust <- renderPlot({
......
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