Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Guillaume Perréal
easy16S
Commits
7882da3a
Commit
7882da3a
authored
Sep 12, 2018
by
Midoux Cedric
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rework histFocusScript
parent
a36798bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
24 deletions
+27
-24
server.R
server.R
+27
-24
No files found.
server.R
View file @
7882da3a
...
...
@@ -343,36 +343,39 @@ shinyServer
})
output
$
histFocusScript
<-
renderText
({
paste0
(
scriptHead
,
"# Plot filtered barplot\n"
,
"p <- plot_composition(physeq = data"
,
glue
(
", taxaRank1 = \"{input$focusRank}\""
),
glue
(
", taxaSet1 = \"{input$focusTaxa}\""
),
scriptArgs
<-
c
(
"physeq = data"
,
glue
(
"taxaRank1 = \"{input$focusRank}\""
),
glue
(
"taxaSet1 = \"{input$focusTaxa}\""
),
glue
(
"
,
taxaRank2 = \"{rank_names(data16S())[which(rank_names(data16S()) == input$focusRank) + 1]}\""
"taxaRank2 = \"{rank_names(data16S())[which(rank_names(data16S()) == input$focusRank) + 1]}\""
),
glue
(
"
,
numberOfTaxa = {input$focusNbTaxa}"
),
glue
(
"numberOfTaxa = {input$focusNbTaxa}"
),
glue
(
", fill = \"{rank_names(data16S())[which(rank_names(data16S()) == input$focusRank) + 1]}\""
),
ifelse
(
is.null
(
checkNull
(
input
$
focusX
)),
""
,
glue
(
", x = \"{input$focusX}\""
)),
")\n"
,
ifelse
(
is.null
(
checkNull
(
input
$
focusGrid
)),
""
,
"fill = \"{rank_names(data16S())[which(rank_names(data16S()) == input$focusRank) + 1]}\""
)
)
if
(
!
is.null
(
checkNull
(
input
$
focusX
)))
{
scriptArgs
<-
c
(
scriptArgs
,
glue
(
"x = \"{input$focusX}\""
))
}
script
<-
c
(
scriptHead
,
"# Plot filtered barplot"
,
glue
(
"p <- plot_composition({glue_collapse(scriptArgs, sep=', ')})"
)
)
if
(
!
is.null
(
checkNull
(
input
$
focusGrid
)))
{
script
<-
c
(
script
,
glue
(
"p <- p + facet_grid(\". ~ {input$focusGrid}\", scales = \"free_x\")"
)
),
###
# x = ifelse(is.null(checkNull(input$focusX)), "Sample", input$focusX)
###
"\n"
,
"plot(p)"
)
)
}
script
<-
c
(
script
,
""
,
"plot(p)"
)
return
(
glue_collapse
(
script
,
sep
=
"\n"
))
})
output
$
histFocus
<-
renderPlot
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment