Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
🚀
This server has been upgraded to GitLab release
15.7
.
🚀
Open sidebar
pertz-lab
shiny-timecourse-inspector
Commits
f43d2993
Commit
f43d2993
authored
Jun 19, 2017
by
dmattek
Browse files
Added (not completely): Bayesian clustering
parent
5a2e859f
Changes
5
Hide whitespace changes
Inline
Side-by-side
global.R
View file @
f43d2993
source
(
'modules/auxfunc.R'
)
source
(
'modules/downPlot.R'
)
source
(
'modules/downCellIDsCls.R'
)
source
(
'modules/tabScatter.R'
)
\ No newline at end of file
source
(
'modules/tabScatter.R'
)
source
(
'modules/tabClBay.R'
)
\ No newline at end of file
modules/auxfunc.R
View file @
f43d2993
...
...
@@ -145,14 +145,23 @@ userDataGen <- function() {
cat
(
file
=
stderr
(),
'userDataGen: in\n'
)
locNtp
=
40
locNtracks
=
5
locNtracks
=
100
locNsites
=
4
locNwells
=
2
locNwells
=
1
x.rand.1
=
c
(
rnorm
(
locNtp
*
locNtracks
*
locNsites
*
0.5
,
2
,
0.5
),
rnorm
(
locNtp
*
locNtracks
*
locNsites
*
0.5
,
2
,
0.5
))
x.rand.2
=
c
(
rnorm
(
locNtp
*
locNtracks
*
locNsites
*
0.5
,
0
,
0.1
),
rnorm
(
locNtp
*
locNtracks
*
locNsites
*
0.5
,
0
,
0.1
))
x.rand.3
=
rep
(
rnorm
(
locNtracks
,
2
,
0.5
),
1
,
each
=
locNtp
)
x.rand.4
=
rep
(
rnorm
(
locNtracks
,
1
,
0.1
),
1
,
each
=
locNtp
)
x.arg
=
rep
(
seq
(
0
,
locNtp
-1
)
/
locNtp
*
4
*
pi
,
locNtracks
*
locNsites
)
dt.nuc
=
data.table
(
Metadata_Site
=
rep
(
1
:
locNsites
,
each
=
locNtp
*
locNtracks
),
Metadata_Well
=
rep
(
1
:
locNwells
,
each
=
locNtp
*
locNsites
*
locNtracks
/
locNwells
),
Metadata_RealTime
=
rep
(
1
:
locNtp
,
locNsites
*
locNtracks
),
objCyto_Intensity_MeanIntensity_imErkCor
=
c
(
rnorm
(
locNtp
*
locNtracks
*
locNsites
*
0.5
,
.5
,
0.1
),
rnorm
(
locNtp
*
locNtracks
*
locNsites
*
0.5
,
1
,
0.2
)),
Metadata_RealTime
=
x.arg
,
# objCyto_Intensity_MeanIntensity_imErkCor = c(rnorm(locNtp * locNtracks * locNsites * 0.5, .5, 0.1), rnorm(locNtp * locNtracks * locNsites * 0.5, 1, 0.2)),
# objNuc_Intensity_MeanIntensity_imErkCor = c(rnorm(locNtp * locNtracks * locNsites * 0.5, .25, 0.1), rnorm(locNtp * locNtracks * locNsites * 0.5, .5, 0.2)),
objCyto_Intensity_MeanIntensity_imErkCor
=
x.rand.3
+
ifelse
(
x.arg
<
4
,
0
,
1
)
/
x.rand.3
,
objNuc_Intensity_MeanIntensity_imErkCor
=
c
(
rnorm
(
locNtp
*
locNtracks
*
locNsites
*
0.5
,
.25
,
0.1
),
rnorm
(
locNtp
*
locNtracks
*
locNsites
*
0.5
,
.5
,
0.2
)),
TrackLabel
=
rep
(
1
:
(
locNtracks
*
locNsites
),
each
=
locNtp
))
...
...
modules/tabScatter.R
View file @
f43d2993
# RShiny module for
performing hierarchical clustering
# RShiny module for
the scatter plot
# Use:
# in ui.R
# tabPanel(
...
...
@@ -28,7 +28,7 @@ tabScatterPlotUI <- function(id, label = "Comparing t-points") {
4
,
uiOutput
(
ns
(
'uiSelTptX'
)),
uiOutput
(
ns
(
'uiSelTptY'
)),
checkboxInput
(
ns
(
'chBfoldChange'
),
'Y-axis displays
fold chang
e between
the
two t-points'
),
checkboxInput
(
ns
(
'chBfoldChange'
),
'Y-axis displays
differenc
e between two t-points'
),
numericInput
(
ns
(
'inNeighTpts'
),
'#t-pts left & right'
,
value
=
0
,
step
=
1
,
min
=
0
),
radioButtons
(
ns
(
'rBstats'
),
'Operation:'
,
list
(
'Mean'
=
1
,
'Min'
=
2
,
'Max'
=
3
))
),
...
...
@@ -161,7 +161,7 @@ data4scatterPlot <- reactive({
setnames
(
loc.dt
,
c
(
'group.x'
,
'y.aggr.x'
,
'y.aggr.y'
),
c
(
'group'
,
'x'
,
'y'
))
if
(
input
$
chBfoldChange
)
{
loc.dt
[
,
y
:=
y
/
x
]
loc.dt
[
,
y
:=
y
-
x
]
}
return
(
loc.dt
)
...
...
@@ -233,6 +233,7 @@ output$outPlotScatterInt <- renderPlotly({
# When running on a server. Based on:
# https://github.com/ropensci/plotly/issues/494
locBut
=
input
$
butGoScatter
if
(
locBut
==
0
)
{
cat
(
file
=
stderr
(),
'plotScatterInt Go button not pressed\n'
)
return
(
NULL
)
...
...
server.R
View file @
f43d2993
...
...
@@ -1459,4 +1459,7 @@ shinyServer(function(input, output, session) {
labCol
=
loc.colnames
)
})
callModule
(
clustBay
,
'TabClustBay'
,
data4clust
)
})
ui.R
View file @
f43d2993
...
...
@@ -475,7 +475,12 @@ shinyUI(fluidPage(
actionButton
(
'butPlotHierSparClDist'
,
'Plot!'
),
plotOutput
(
'outPlotHierSparClDist'
))
)
)
),
tabPanel
(
'Bayesian Cl.'
,
clustBayUI
(
'TabClustBay'
))
))
)
))
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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