Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
easy16S
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Midoux Cedric
easy16S
Commits
f945b1b6
Commit
f945b1b6
authored
Apr 02, 2020
by
Midoux Cedric
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rework beta-cluster with shinymeta
parent
01e86b13
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
77 deletions
+42
-77
panels/cluster-server.R
panels/cluster-server.R
+0
-71
panels/cluster-ui.R
panels/cluster-ui.R
+0
-2
panels/richnessB-server.R
panels/richnessB-server.R
+42
-2
server.R
server.R
+0
-1
ui.R
ui.R
+0
-1
No files found.
panels/cluster-server.R
deleted
100644 → 0
View file @
01e86b13
output
$
clustUI
<-
renderUI
({
validate
(
need
(
data16S
(),
""
))
box
(
title
=
"Setting : "
,
width
=
NULL
,
status
=
"primary"
,
selectInput
(
"clustDist"
,
label
=
"Distance : "
,
choices
=
list
(
"bray"
,
"jaccard"
,
"unifrac"
,
"wunifrac"
,
"dpcoa"
,
"jsd"
,
"euclidean"
)
),
selectInput
(
"clustMethod"
,
label
=
"Method : "
,
choices
=
list
(
"ward.D2"
,
"ward.D"
,
"single"
,
"complete"
,
"average"
,
"mcquitty"
,
"median"
,
"centroid"
)
),
selectInput
(
"clustCol"
,
label
=
"Color : "
,
choices
=
c
(
"..."
=
0
,
sample_variables
(
data16S
()))
),
collapsedBox
(
verbatimTextOutput
(
"clustScript"
),
title
=
"RCode"
)
)
})
output
$
clustScript
<-
renderText
({
scriptArgs
<-
c
(
"physeq = data"
,
glue
(
"dist = \"{input$clustDist}\""
),
glue
(
"method = \"{input$clustMethod}\""
)
)
if
(
!
is.null
(
checkNull
(
input
$
clustCol
)))
{
scriptArgs
<-
c
(
scriptArgs
,
glue
(
"color = \"{input$clustCol}\""
))
}
script
<-
c
(
scriptHead
,
"# Plot samples clustering"
,
glue
(
"p <- plot_clust({glue_collapse(scriptArgs, sep=', ')})"
)
)
script
<-
c
(
script
,
""
,
"plot(p)"
)
return
(
glue_collapse
(
script
,
sep
=
"\n"
))
})
output
$
clust
<-
renderPlot
({
validate
(
need
(
data16S
(),
"Requires an abundance dataset"
))
plot_clust
(
physeq
=
data16S
(),
dist
=
input
$
clustDist
,
method
=
input
$
clustMethod
,
color
=
checkNull
(
input
$
clustCol
)
)
})
panels/cluster-ui.R
deleted
100644 → 0
View file @
01e86b13
cluster
<-
fluidPage
(
withLoader
(
plotOutput
(
"clust"
,
height
=
700
)),
uiOutput
(
"clustUI"
))
panels/richnessB-server.R
View file @
f945b1b6
# output$betaClusterUI
# output$betaCluster
output
$
betaClusterUI
<-
renderUI
({
validate
(
need
(
physeq
(),
""
))
box
(
title
=
"Setting : "
,
width
=
NULL
,
status
=
"primary"
,
selectInput
(
"betaClusterMethod"
,
label
=
"Method : "
,
choices
=
list
(
"ward.D2"
,
"ward.D"
,
"single"
,
"complete"
,
"average"
,
"mcquitty"
,
"median"
,
"centroid"
)),
selectInput
(
"betaClusterCol"
,
label
=
"Color : "
,
choices
=
c
(
"..."
=
0
,
sample_variables
(
physeq
())))
)
})
output
$
betaCluster
<-
metaRender2
(
renderPlot
,
{
validate
(
need
(
physeq
(),
"Requires an abundance dataset"
))
data
<-
physeq
()
metaExpr
({
p
<-
plot_clust
(
physeq
=
data
,
dist
=
..
(
input
$
betaDistance
),
method
=
..
(
input
$
betaClusterMethod
),
color
=
..
(
checkNull
(
input
$
betaClusterCol
))
)
p
})
})
observeEvent
(
input
$
betaCluster_output_code
,
{
displayCodeModal
(
expandChain
(
quote
(
library
(
phyloseq
)),
quote
(
library
(
phyloseq.extended
)),
"# Replace `data` with you own data."
,
output
$
betaCluster
()
)
)
}
)
output
$
betaHeatmapUI
<-
renderUI
({
validate
(
need
(
physeq
(),
""
))
...
...
server.R
View file @
f945b1b6
...
...
@@ -24,7 +24,6 @@ shinyServer
source
(
"panels/mds-server.R"
,
local
=
TRUE
)
source
(
"panels/pca-server.R"
,
local
=
TRUE
)
source
(
"panels/tree-server.R"
,
local
=
TRUE
)
source
(
"panels/cluster-server.R"
,
local
=
TRUE
)
physeq
<-
reactiveVal
()
...
...
ui.R
View file @
f945b1b6
...
...
@@ -10,7 +10,6 @@ source("panels/richnessB-ui.R", local = TRUE)
source
(
"panels/mds-ui.R"
,
local
=
TRUE
)
source
(
"panels/pca-ui.R"
,
local
=
TRUE
)
source
(
"panels/tree-ui.R"
,
local
=
TRUE
)
source
(
"panels/cluster-ui.R"
,
local
=
TRUE
)
source
(
"panels/Help-ui.R"
,
local
=
TRUE
)
shinyUI
(
dashboardPage
(
...
...
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