Commit 8f94943f authored by Midoux Cedric's avatar Midoux Cedric
Browse files

rarefactionCurveScript

No related merge requests found
Showing with 40 additions and 2 deletions
+40 -2
...@@ -762,7 +762,6 @@ shinyServer ...@@ -762,7 +762,6 @@ shinyServer
color = "gray60") color = "gray60")
} }
return(p + ggtitle(input$rarefactionTitle)) return(p + ggtitle(input$rarefactionTitle))
}) })
output$rarefactionCurveUI <- renderUI({ output$rarefactionCurveUI <- renderUI({
...@@ -796,8 +795,47 @@ shinyServer ...@@ -796,8 +795,47 @@ shinyServer
"rarefactionGrid", "rarefactionGrid",
label = "Subplot : ", label = "Subplot : ",
choices = c("..." = 0, sample_variables(data16S())) choices = c("..." = 0, sample_variables(data16S()))
) ),
collapsedBox(verbatimTextOutput("rarefactionCurveScript"), title = "RCode")
)
})
output$rarefactionCurveScript <- renderText({
scriptArgs <- c("physeq = data",
"step = 100",
"se = FALSE")
if (!is.null(checkNull(input$rarefactionColor))) {
scriptArgs <-
c(scriptArgs,
glue("color = \"{input$rarefactionColor}\""))
}
if (!is.null(checkNull(input$rarefactionLabel))) {
scriptArgs <-
c(scriptArgs,
glue("label = \"{input$rarefactionLabel}\""))
}
script <- c(
scriptHead,
"# Plot filtered barplot",
glue("p <- ggrare({glue_collapse(scriptArgs, sep=', ')})")
) )
if (!is.null(checkNull(input$rarefactionGrid))) {
script <- c(script,
glue("p <- p + facet_grid(\". ~ {input$rarefactionGrid}\")"))
}
if (input$rarefactionMin) {
script = c(
script,
"p <- p + geom_vline(xintercept = min(sample_sums(data)), color = \"gray60\")"
)
}
if (!is.null(checkNull(input$rarefactionTitle))) {
script <- c(script,
glue("p <- p + ggtitle({input$rarefactionTitle})"))
}
script <- c(script, "", "plot(p)")
return(glue_collapse(script, sep = "\n"))
}) })
output$HeatmapUI <- renderUI({ output$HeatmapUI <- renderUI({
......
Supports Markdown
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