Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guillaume Perréal
easy16S
Commits
8f94943f
Commit
8f94943f
authored
Sep 13, 2018
by
Midoux Cedric
Browse files
rarefactionCurveScript
parent
c5257146
Changes
1
Hide whitespace changes
Inline
Side-by-side
server.R
View file @
8f94943f
...
...
@@ -762,7 +762,6 @@ shinyServer
color
=
"gray60"
)
}
return
(
p
+
ggtitle
(
input
$
rarefactionTitle
))
})
output
$
rarefactionCurveUI
<-
renderUI
({
...
...
@@ -796,8 +795,47 @@ shinyServer
"rarefactionGrid"
,
label
=
"Subplot : "
,
choices
=
c
(
"..."
=
0
,
sample_variables
(
data16S
()))
)
),
collapsedBox
(
verbatimTextOutput
(
"rarefactionCurveScript"
),
title
=
"RCode"
)
)
})
output
$
rarefactionCurveScript
<-
renderText
({
scriptArgs
<-
c
(
"physeq = data"
,
"step = 100"
,
"se = FALSE"
)
if
(
!
is.null
(
checkNull
(
input
$
rarefactionColor
)))
{
scriptArgs
<-
c
(
scriptArgs
,
glue
(
"color = \"{input$rarefactionColor}\""
))
}
if
(
!
is.null
(
checkNull
(
input
$
rarefactionLabel
)))
{
scriptArgs
<-
c
(
scriptArgs
,
glue
(
"label = \"{input$rarefactionLabel}\""
))
}
script
<-
c
(
scriptHead
,
"# Plot filtered barplot"
,
glue
(
"p <- ggrare({glue_collapse(scriptArgs, sep=', ')})"
)
)
if
(
!
is.null
(
checkNull
(
input
$
rarefactionGrid
)))
{
script
<-
c
(
script
,
glue
(
"p <- p + facet_grid(\". ~ {input$rarefactionGrid}\")"
))
}
if
(
input
$
rarefactionMin
)
{
script
=
c
(
script
,
"p <- p + geom_vline(xintercept = min(sample_sums(data)), color = \"gray60\")"
)
}
if
(
!
is.null
(
checkNull
(
input
$
rarefactionTitle
)))
{
script
<-
c
(
script
,
glue
(
"p <- p + ggtitle({input$rarefactionTitle})"
))
}
script
<-
c
(
script
,
""
,
"plot(p)"
)
return
(
glue_collapse
(
script
,
sep
=
"\n"
))
})
output
$
HeatmapUI
<-
renderUI
({
...
...
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