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
e9de9648
Commit
e9de9648
authored
Sep 05, 2018
by
Midoux Cedric
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
histScript
parent
226dc4d6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
3 deletions
+57
-3
server.R
server.R
+57
-3
No files found.
server.R
View file @
e9de9648
...
...
@@ -210,13 +210,63 @@ shinyServer
"barGrid"
,
label
=
"Subplot : "
,
choices
=
c
(
"..."
=
0
,
sample_variables
(
data16S
()))
)
,
),
selectInput
(
"barX"
,
label
=
"X : "
,
choices
=
c
(
"..."
=
0
,
sample_variables
(
data16S
()))
),
box
(
title
=
"RCode"
,
width
=
NULL
,
status
=
"primary"
,
collapsible
=
TRUE
,
collapsed
=
TRUE
,
verbatimTextOutput
(
"histScript"
)
)
)
})
output
$
histScript
<-
renderText
({
paste0
(
"# Loading packages\n"
,
"source(\"https://raw.githubusercontent.com/mahendra-mariadassou/phyloseq-extended/master/R/load-extra-functions.R\")\n"
,
"\n"
,
"# Loading data\n"
,
paste0
(
"load(\""
,
paste
(
"Easy16S-data"
,
Sys.Date
(),
"RData"
,
sep
=
"."
),
"\") # if necessary, adapt the file path\n"
),
"\n"
,
"# View data\n"
,
"data\n"
,
"\n"
,
"# Plot barplot\n"
,
"p <- plot_bar(physeq = data"
,
ifelse
(
is.null
(
checkNull
(
input
$
barFill
)),
""
,
paste0
(
",\n fill = \""
,
input
$
barFill
,
"\""
)
),
ifelse
(
is.null
(
checkNull
(
input
$
barX
)),
""
,
paste0
(
",\n x = "
,
input
$
barX
)),
ifelse
(
is.null
(
checkNull
(
input
$
barTitle
)),
""
,
paste0
(
",\n title = \""
,
input
$
barTitle
,
"\""
)
),
")\n"
,
ifelse
(
is.null
(
checkNull
(
input
$
barGrid
)),
""
,
paste0
(
"p <- p + facet_grid(\". ~ "
,
input
$
barGrid
,
"\", scales = \"free_x\")\n"
)
),
"\n"
,
"plot(p)"
)
})
...
...
@@ -854,7 +904,11 @@ shinyServer
axes
=
as.numeric
(
input
$
acpAxes
),
title
=
checkNull
(
input
$
acpTitle
),
color
=
checkNull
(
input
$
acpCol
),
replicate
=
if
(
is.null
(
checkNull
(
input
$
acpRep
)))
{
NULL
}
else
{
checkNull
(
input
$
acpRep
)
},
replicate
=
if
(
is.null
(
checkNull
(
input
$
acpRep
)))
{
NULL
}
else
{
checkNull
(
input
$
acpRep
)
},
shape
=
checkNull
(
input
$
acpShape
),
label
=
checkNull
(
input
$
acpLabel
)
)
...
...
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