Commit ece485db authored by Midoux Cedric's avatar Midoux Cedric
Browse files

richnessAScript

No related merge requests found
Showing with 64 additions and 4 deletions
+64 -4
...@@ -258,12 +258,13 @@ shinyServer ...@@ -258,12 +258,13 @@ shinyServer
is.null(checkNull(input$barGrid)), is.null(checkNull(input$barGrid)),
"", "",
glue( glue(
"p <- p + facet_grid(\". ~ {input$barGrid}\", scales = \"free_x\")" "p <- p + facet_grid(\". ~ {input$barGrid}\", scales = \"free_x\")
"
) )
), ),
"\n", "\n",
"plot(p)" "plot(p)"
) )
}) })
output$histo <- renderPlot({ output$histo <- renderPlot({
...@@ -530,7 +531,65 @@ shinyServer ...@@ -530,7 +531,65 @@ shinyServer
"richnessShape", "richnessShape",
label = "Shape : ", label = "Shape : ",
choices = c("..." = 0, sample_variables(data16S())) 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 ...@@ -565,6 +624,7 @@ shinyServer
}) })
output$richnessBUI <- renderUI({ output$richnessBUI <- renderUI({
validate(need(data16S(), ""))
box( box(
title = "Setting : " , title = "Setting : " ,
width = NULL, width = NULL,
......
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