Commit 79834835 authored by Midoux Cedric's avatar Midoux Cedric

physeq_data -> data

parent 00d7d137
...@@ -75,6 +75,7 @@ output$barplotUI <- renderUI({ ...@@ -75,6 +75,7 @@ output$barplotUI <- renderUI({
output$barplot <- metaRender2(renderPlot, { output$barplot <- metaRender2(renderPlot, {
validate(need(physeq(), "Requires an abundance dataset"), validate(need(physeq(), "Requires an abundance dataset"),
need(input$barplotShowRank, "")) need(input$barplotShowRank, ""))
data <- physeq()
barplotGrid <- if (!is.null(checkNull(input$barplotGrid))) { barplotGrid <- if (!is.null(checkNull(input$barplotGrid))) {
metaExpr({ metaExpr({
...@@ -83,9 +84,8 @@ output$barplot <- metaRender2(renderPlot, { ...@@ -83,9 +84,8 @@ output$barplot <- metaRender2(renderPlot, {
} }
metaExpr({ metaExpr({
physeq_data <- physeq()
p <- plot_composition( p <- plot_composition(
physeq = physeq_data, physeq = data,
taxaRank1 = ..(checkNull(input$barplotFilterRank)), taxaRank1 = ..(checkNull(input$barplotFilterRank)),
taxaSet1 = ..(input$barplotTaxa), taxaSet1 = ..(input$barplotTaxa),
taxaRank2 = ..(input$barplotShowRank), taxaRank2 = ..(input$barplotShowRank),
...@@ -102,7 +102,7 @@ observeEvent(input$barplot_output_code, ...@@ -102,7 +102,7 @@ observeEvent(input$barplot_output_code,
expandChain( expandChain(
quote(library(phyloseq)), quote(library(phyloseq)),
quote(library(phyloseq.extended)), quote(library(phyloseq.extended)),
"# Replace `physeq_data` with you own data.", "# Replace `data` with you own data.",
output$barplot() output$barplot()
) )
) )
......
...@@ -59,6 +59,7 @@ output$heatmapUI <- renderUI({ ...@@ -59,6 +59,7 @@ output$heatmapUI <- renderUI({
output$heatmap <- metaRender2(renderPlot, { output$heatmap <- metaRender2(renderPlot, {
validate(need(physeq(), "Requires an abundance dataset")) validate(need(physeq(), "Requires an abundance dataset"))
data <- physeq()
heatmapGrid <- if (!is.null(checkNull(input$heatmapGrid))) { heatmapGrid <- if (!is.null(checkNull(input$heatmapGrid))) {
metaExpr({ metaExpr({
...@@ -67,10 +68,9 @@ output$heatmap <- metaRender2(renderPlot, { ...@@ -67,10 +68,9 @@ output$heatmap <- metaRender2(renderPlot, {
} }
metaExpr({ metaExpr({
physeq_data <- physeq() data_select <- prune_taxa(names(sort(taxa_sums(data), decreasing = TRUE)[1:..(input$heatmapTopOtu)]), data)
physeq_select <- prune_taxa(names(sort(taxa_sums(physeq_data), decreasing = TRUE)[1:..(input$heatmapTopOtu)]), physeq_data)
p <- plot_heatmap( p <- plot_heatmap(
physeq = physeq_select, physeq = data_select,
distance = ..(input$heatmapDist), distance = ..(input$heatmapDist),
method = ..(input$heatmapMethod), method = ..(input$heatmapMethod),
title = ..(checkNull(input$heatmapTitle)), title = ..(checkNull(input$heatmapTitle)),
...@@ -89,7 +89,7 @@ observeEvent(input$heatmap_output_code, ...@@ -89,7 +89,7 @@ observeEvent(input$heatmap_output_code,
expandChain( expandChain(
quote(library(phyloseq)), quote(library(phyloseq)),
quote(library(phyloseq.extended)), quote(library(phyloseq.extended)),
"# Replace `physeq_data` with you own data.", "# Replace `data` with you own data.",
output$heatmap() output$heatmap()
) )
) )
......
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