Commit ece485db authored by Midoux Cedric's avatar Midoux Cedric

richnessAScript

parent d462227a
......@@ -258,12 +258,13 @@ shinyServer
is.null(checkNull(input$barGrid)),
"",
glue(
"p <- p + facet_grid(\". ~ {input$barGrid}\", scales = \"free_x\")"
"p <- p + facet_grid(\". ~ {input$barGrid}\", scales = \"free_x\")
"
)
),
),
"\n",
"plot(p)"
)
)
})
output$histo <- renderPlot({
......@@ -530,7 +531,65 @@ shinyServer
"richnessShape",
label = "Shape : ",
choices = c("..." = 0, sample_variables(data16S()))
)
),
collapsedBox(verbatimTextOutput("richnessAScript"), title = "RCode")
)
})
output$richnessAScript <- renderText({
paste0(
scriptHead,
"# Plot boxplot of alpha diversity\n",
"p <- plot_richness(physeq = data",
ifelse(
is.null(checkNull(input$richnessX)),
"",
glue(", x = \"{input$richnessX}\"")
),
ifelse(
is.null(checkNull(input$richnessColor)),
"",
glue(", color = \"{input$richnessColor}\"")
),
ifelse(
is.null(checkNull(input$richnessShape)),
"",
glue(", shape = \"{input$richnessShape}\"")
),
ifelse(
is.null(checkNull(input$richnessTitle)),
"",
glue(", title = \"{input$richnessTitle}\"")
),
ifelse(
is.null(checkNull(input$richnessMeasures)),
"",
glue(
", measures = c(\"{glue_collapse(input$richnessMeasures, sep='\", \"')}\")"
)
),
")\n",
ifelse((input$richnessBoxplot >= 2),
"p <- p + geom_boxplot()\n",
""),
ifelse((input$richnessBoxplot <= 2),
"p <- p + geom_point()\n",
""),
"\n",
"plot(p)",
"\n",
"\n",
"# Tables\n",
glue("t <- estimate_richness(data"),
ifelse(
is.null(checkNull(input$richnessMeasures)),
"",
glue(
", measures = c(\"{glue_collapse(input$richnessMeasures, sep='\", \"')}\")"
)
),
")\n",
"write.table(t, file = \"richness.tsv\", sep = \"\\t\", col.names = NA)"
)
})
......@@ -565,6 +624,7 @@ shinyServer
})
output$richnessBUI <- renderUI({
validate(need(data16S(), ""))
box(
title = "Setting : " ,
width = NULL,
......
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