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

title

No related merge requests found
Showing with 57 additions and 23 deletions
+57 -23
...@@ -27,7 +27,7 @@ shinyServer ...@@ -27,7 +27,7 @@ shinyServer
options = list( options = list(
dom = "lBtip", dom = "lBtip",
pageLength = 10, pageLength = 10,
lengthMenu = list(c(10, 25, 50, 100,-1), list('10', '25', '50', '100', 'All')), lengthMenu = list(c(10, 25, 50, 100, -1), list('10', '25', '50', '100', 'All')),
buttons = list( buttons = list(
'colvis', 'colvis',
list( list(
...@@ -172,6 +172,9 @@ shinyServer ...@@ -172,6 +172,9 @@ shinyServer
choices = rank_names(data16S()), choices = rank_names(data16S()),
inline = TRUE inline = TRUE
), ),
textInput("barTitle",
label = "Title : ",
value = "OTU abundance barplot"),
selectInput( selectInput(
"barGrid", "barGrid",
label = "Subplot : ", label = "Subplot : ",
...@@ -192,7 +195,8 @@ shinyServer ...@@ -192,7 +195,8 @@ shinyServer
p <- plot_bar( p <- plot_bar(
physeq = data16S(), physeq = data16S(),
fill = input$barFill, fill = input$barFill,
x = ifelse(is.null(checkNull(input$barX)), "Sample", input$barX) x = ifelse(is.null(checkNull(input$barX)), "Sample", input$barX),
title = checkNull(input$barTitle)
) )
if (!is.null(checkNull(input$barGrid))) { if (!is.null(checkNull(input$barGrid))) {
p <- p <-
...@@ -349,6 +353,20 @@ shinyServer ...@@ -349,6 +353,20 @@ shinyServer
), ),
inline = TRUE inline = TRUE
), ),
radioButtons(
"richnessBoxplot",
label = "Representation : ",
choices = list(
"Dots only" = 1,
"Dots and boxplot" = 2,
"Boxplot only" = 3
),
selected = 2,
inline = TRUE
),
textInput("richnessTitle",
label = "Title : ",
value = "Alpha diversity graphics"),
selectInput( selectInput(
"richnessX", "richnessX",
label = "X : ", label = "X : ",
...@@ -363,17 +381,6 @@ shinyServer ...@@ -363,17 +381,6 @@ shinyServer
"richnessShape", "richnessShape",
label = "Shape : ", label = "Shape : ",
choices = c("..." = 0, sample_variables(data16S())) choices = c("..." = 0, sample_variables(data16S()))
),
radioButtons(
"richnessBoxplot",
label = "Representation : ",
choices = list(
"Dots only" = 1,
"Dots and boxplot" = 2,
"Boxplot only" = 3
),
selected = 2,
inline = TRUE
) )
) )
}) })
...@@ -388,6 +395,7 @@ shinyServer ...@@ -388,6 +395,7 @@ shinyServer
)), "samples", input$richnessX), )), "samples", input$richnessX),
color = checkNull(input$richnessColor), color = checkNull(input$richnessColor),
shape = checkNull(input$richnessShape), shape = checkNull(input$richnessShape),
title = checkNull(input$richnessTitle),
measures = checkNull(input$richnessMeasures) measures = checkNull(input$richnessMeasures)
) )
if (input$richnessBoxplot >= 2) { if (input$richnessBoxplot >= 2) {
...@@ -413,10 +421,13 @@ shinyServer ...@@ -413,10 +421,13 @@ shinyServer
width = NULL, width = NULL,
status = "primary", status = "primary",
selectInput( selectInput(
"richnessOrder", "richnessBOrder",
label = "Sorting sample : ", label = "Sorting sample : ",
choices = c("..." = 0, sample_variables(data16S())) choices = c("..." = 0, sample_variables(data16S()))
) ),
textInput("richnessBTitle",
label = "Title : ",
value = "Beta diversity heatmap")
) )
}) })
...@@ -426,11 +437,11 @@ shinyServer ...@@ -426,11 +437,11 @@ shinyServer
beta <- beta <-
melt(as(distance(data16S(), method = input$richnessBDist), "matrix")) melt(as(distance(data16S(), method = input$richnessBDist), "matrix"))
colnames(beta) <- c("x", "y", "distance") colnames(beta) <- c("x", "y", "distance")
if (!is.null(checkNull(input$richnessOrder))) if (!is.null(checkNull(input$richnessBOrder)))
{ {
new_factor = as.factor(get_variable(data16S(), input$richnessOrder)) new_factor = as.factor(get_variable(data16S(), input$richnessBOrder))
variable_sort <- variable_sort <-
as.factor(get_variable(data16S(), input$richnessOrder)[order(new_factor)]) as.factor(get_variable(data16S(), input$richnessBOrder)[order(new_factor)])
L = levels(reorder(sample_names(data16S()), as.numeric(new_factor))) L = levels(reorder(sample_names(data16S()), as.numeric(new_factor)))
beta$x <- factor(beta$x, levels = L) beta$x <- factor(beta$x, levels = L)
beta$y <- factor(beta$y, levels = L) beta$y <- factor(beta$y, levels = L)
...@@ -440,7 +451,7 @@ shinyServer ...@@ -440,7 +451,7 @@ shinyServer
} }
p <- p <-
ggplot(beta, aes(x = x, y = y, fill = distance)) + geom_tile() ggplot(beta, aes(x = x, y = y, fill = distance)) + geom_tile()
p <- p + theme( p <- p + ggtitle(input$richnessBTitle) + theme(
axis.text.x = element_text( axis.text.x = element_text(
angle = 90, angle = 90,
hjust = 1, hjust = 1,
...@@ -469,6 +480,9 @@ shinyServer ...@@ -469,6 +480,9 @@ shinyServer
checkboxInput("netwOrphan", checkboxInput("netwOrphan",
label = "Keep orphans", label = "Keep orphans",
value = TRUE), value = TRUE),
textInput("netwTitle",
label = "Title : ",
value = "Beta diversity network"),
selectInput( selectInput(
"netwCol", "netwCol",
label = "Color : ", label = "Color : ",
...@@ -507,7 +521,7 @@ shinyServer ...@@ -507,7 +521,7 @@ shinyServer
shape = checkNull(input$netwShape), shape = checkNull(input$netwShape),
label = checkNull(input$netwLabel), label = checkNull(input$netwLabel),
hjust = 2, hjust = 2,
title = NULL title = checkNull(input$netwTitle)
) )
return(p) return(p)
}) })
...@@ -530,6 +544,7 @@ shinyServer ...@@ -530,6 +544,7 @@ shinyServer
step = 100, step = 100,
#step = input$rarefactionStep, #step = input$rarefactionStep,
color = checkNull(input$rarefactionColor), color = checkNull(input$rarefactionColor),
label = checkNull(input$rarefactionLabel),
se = FALSE se = FALSE
) )
if (!is.null(checkNull(input$rarefactionGrid))) { if (!is.null(checkNull(input$rarefactionGrid))) {
...@@ -541,7 +556,7 @@ shinyServer ...@@ -541,7 +556,7 @@ shinyServer
p + geom_vline(xintercept = min(sample_sums(data16S())), p + geom_vline(xintercept = min(sample_sums(data16S())),
color = "gray60") color = "gray60")
} }
return(p) return(p + ggtitle(input$rarefactionTitle))
}) })
...@@ -559,11 +574,19 @@ shinyServer ...@@ -559,11 +574,19 @@ shinyServer
# value = 100 # value = 100
# ), # ),
checkboxInput("rarefactionMin", label = "Show min sample threshold", value = FALSE), checkboxInput("rarefactionMin", label = "Show min sample threshold", value = FALSE),
textInput("rarefactionTitle",
label = "Title : ",
value = "Rarefaction curves"),
selectInput( selectInput(
"rarefactionColor", "rarefactionColor",
label = "Color : ", label = "Color : ",
choices = c("..." = 0, sample_variables(data16S())) choices = c("..." = 0, sample_variables(data16S()))
), ),
selectInput(
"rarefactionLabel",
label = "Label : ",
choices = c("..." = 0, sample_variables(data16S()))
),
selectInput( selectInput(
"rarefactionGrid", "rarefactionGrid",
label = "Subplot : ", label = "Subplot : ",
...@@ -578,6 +601,9 @@ shinyServer ...@@ -578,6 +601,9 @@ shinyServer
title = "Setting : " , title = "Setting : " ,
width = NULL, width = NULL,
status = "primary", status = "primary",
textInput("heatmapTitle",
label = "Title : ",
value = "Taxa heatmap by samples"),
selectInput( selectInput(
"heatmapGrid", "heatmapGrid",
label = "Subplot : ", label = "Subplot : ",
...@@ -637,6 +663,7 @@ shinyServer ...@@ -637,6 +663,7 @@ shinyServer
)[1:input$heatmapTopOtu]), data16S()), )[1:input$heatmapTopOtu]), data16S()),
distance = input$heatmapDist, distance = input$heatmapDist,
method = input$heatmapMethod, method = input$heatmapMethod,
title = checkNull(input$heatmapTitle),
sample.order = checkNull(input$heatmapX), sample.order = checkNull(input$heatmapX),
low = "yellow", low = "yellow",
high = "red", high = "red",
...@@ -672,6 +699,9 @@ shinyServer ...@@ -672,6 +699,9 @@ shinyServer
), ),
checkboxInput("treeRadial", label = "Radial tree", value = FALSE), checkboxInput("treeRadial", label = "Radial tree", value = FALSE),
checkboxInput("treeSample", label = "Show samples", value = TRUE), checkboxInput("treeSample", label = "Show samples", value = TRUE),
textInput("treeTitle",
label = "Title : ",
value = "Phylogenetic tree"),
selectInput( selectInput(
"treeCol", "treeCol",
label = "Color : ", label = "Color : ",
...@@ -704,7 +734,8 @@ shinyServer ...@@ -704,7 +734,8 @@ shinyServer
label.tips = checkNull(input$treeRank), label.tips = checkNull(input$treeRank),
sizebase = 5, sizebase = 5,
ladderize = "left", ladderize = "left",
plot.margin = 0 plot.margin = 0,
title = checkNull(input$treeTitle)
) )
if (checkNull(input$treeRadial)) { if (checkNull(input$treeRadial)) {
return(p + coord_polar(theta = "y")) return(p + coord_polar(theta = "y"))
...@@ -746,6 +777,9 @@ shinyServer ...@@ -746,6 +777,9 @@ shinyServer
selected = "MDS", selected = "MDS",
choices = list("DCA", "CCA", "RDA", "CAP", "DPCoA", "NMDS", "MDS", "PCoA") choices = list("DCA", "CCA", "RDA", "CAP", "DPCoA", "NMDS", "MDS", "PCoA")
), ),
textInput("acpTitle",
label = "Title : ",
value = "Samples ordination graphic"),
selectInput( selectInput(
"acpLabel", "acpLabel",
label = "Label : ", label = "Label : ",
...@@ -787,7 +821,7 @@ shinyServer ...@@ -787,7 +821,7 @@ shinyServer
distance = input$acpDist distance = input$acpDist
), ),
axes = as.numeric(input$acpAxes), axes = as.numeric(input$acpAxes),
#c(1, 2), title = checkNull(input$acpTitle),
color = checkNull(input$acpCol), color = checkNull(input$acpCol),
replicate = checkNull(input$acpRep), replicate = checkNull(input$acpRep),
shape = checkNull(input$acpShape), shape = checkNull(input$acpShape),
......
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