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
d462227a
Commit
d462227a
authored
Sep 11, 2018
by
Midoux Cedric
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
histFocusScript
parent
cbcf74eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
16 deletions
+60
-16
server.R
server.R
+58
-5
ui.R
ui.R
+2
-11
No files found.
server.R
View file @
d462227a
...
...
@@ -28,7 +28,7 @@ shinyServer
options
=
list
(
dom
=
"lBtip"
,
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
(
'colvis'
,
list
(
...
...
@@ -293,7 +293,8 @@ shinyServer
})
output
$
histFocusUIfocusTaxa
<-
renderUI
({
validate
(
need
(
data16S
(),
""
))
validate
(
need
(
data16S
(),
""
),
need
(
input
$
focusRank
,
""
))
selectInput
(
"focusTaxa"
,
label
=
"Selected taxa : "
,
...
...
@@ -330,9 +331,61 @@ shinyServer
choices
=
c
(
"..."
=
0
,
sample_variables
(
data16S
())))
})
output
$
histoFocus
<-
renderPlot
({
validate
(
need
(
data16S
(),
"Requires an abundance dataset"
))
output
$
histFocusUI
<-
renderUI
({
validate
(
need
(
data16S
(),
""
))
box
(
title
=
"Setting : "
,
width
=
NULL
,
status
=
"primary"
,
uiOutput
(
"histFocusUIfocusRank"
),
uiOutput
(
"histFocusUIfocusTaxa"
),
uiOutput
(
"histFocusUIfocusNbTaxa"
),
uiOutput
(
"histFocusUIfocusGrid"
),
uiOutput
(
"histFocusUIfocusX"
),
collapsedBox
(
verbatimTextOutput
(
"histFocusScript"
),
title
=
"RCode"
)
)
})
output
$
histFocusScript
<-
renderText
({
paste0
(
scriptHead
,
"# Plot filtered barplot\n"
,
"p <- plot_composition(physeq = data"
,
glue
(
", taxaRank1 = \"{input$focusRank}\""
),
glue
(
", taxaSet1 = \"{input$focusTaxa}\""
),
glue
(
", taxaRank2 = \"{rank_names(data16S())[which(rank_names(data16S()) == input$focusRank) + 1]}\""
),
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
)),
""
,
glue
(
"p <- p + facet_grid(\". ~ {input$focusGrid}\", scales = \"free_x\")"
)
),
###
# x = ifelse(is.null(checkNull(input$focusX)), "Sample", input$focusX)
###
"\n"
,
"plot(p)"
)
})
output
$
histFocus
<-
renderPlot
({
validate
(
need
(
data16S
(),
"Requires an abundance dataset"
),
need
(
input
$
focusRank
,
""
),
need
(
input
$
focusTaxa
,
""
)
)
p
<-
plot_composition
(
physeq
=
data16S
(),
taxaRank1
=
input
$
focusRank
,
...
...
ui.R
View file @
d462227a
...
...
@@ -104,17 +104,8 @@ shinyUI(dashboardPage(
uiOutput
(
"histUI"
)),
tabPanel
(
"Filtered barplot"
,
withLoader
(
plotOutput
(
"histoFocus"
,
height
=
700
)),
box
(
title
=
"Paramètres"
,
width
=
NULL
,
status
=
"primary"
,
uiOutput
(
"histFocusUIfocusRank"
),
uiOutput
(
"histFocusUIfocusTaxa"
),
uiOutput
(
"histFocusUIfocusNbTaxa"
),
uiOutput
(
"histFocusUIfocusGrid"
),
uiOutput
(
"histFocusUIfocusX"
)
)
withLoader
(
plotOutput
(
"histFocus"
,
height
=
700
)),
uiOutput
(
"histFocusUI"
)
),
tabPanel
(
"Heatmap"
,
withLoader
(
plotOutput
(
"Heatmap"
,
height
=
700
)),
...
...
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