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
09033ebd
Commit
09033ebd
authored
Jun 11, 2019
by
majpark21
Browse files
Working PSD in main tab and hierarchical tab
parent
899e0590
Changes
6
Hide whitespace changes
Inline
Side-by-side
global.R
View file @
09033ebd
...
...
@@ -6,6 +6,7 @@ source('modules/dispStats.R')
source
(
'modules/dispTrackStats.R'
)
source
(
'modules/trajPlot.R'
)
source
(
'modules/trajRibbonPlot.R'
)
source
(
'modules/trajPsdPlot.R'
)
source
(
'modules/boxPlot.R'
)
source
(
'modules/tabAUC.R'
)
source
(
'modules/clDistPlot.R'
)
...
...
modules/auxfunc.R
View file @
09033ebd
...
...
@@ -53,6 +53,7 @@ FCSVOUTLIERS = 'outliers.csv'
FCSVTCCLEAN
=
'tCoursesSelected_clean.csv'
FPDFTCMEAN
=
"tCoursesMeans.pdf"
FPDFTCSINGLE
=
"tCourses.pdf"
FPDFTCPSD
=
'tCoursesPsd.pdf'
FPDFBOXAUC
=
'boxplotAUC.pdf'
FPDFBOXTP
=
'boxplotTP.pdf'
FPDFSCATTER
=
'scatter.pdf'
...
...
modules/tabClHier.R
View file @
09033ebd
...
...
@@ -172,6 +172,9 @@ clustHierUI <- function(id, label = "Hierarchical CLustering") {
tabPanel
(
'Time-courses'
,
modTrajPlotUI
(
ns
(
'modPlotHierTraj'
))),
tabPanel
(
'PSD'
,
modPSDPlotUI
(
ns
(
'modPlotHierPsd'
))),
tabPanel
(
'Cluster dist.'
,
modClDistPlotUI
(
ns
(
'hierClDistPlot'
),
'xxx'
))
...
...
@@ -528,13 +531,22 @@ clustHier <- function(input, output, session, in.data4clust, in.data4trajPlot, i
'.pdf'
)
})
createFnamePsdPlot
=
reactive
({
paste0
(
'clust_hierch_tCoursesPsd_'
,
s.cl.diss
[
as.numeric
(
input
$
selectPlotHierDiss
)],
'_'
,
s.cl.linkage
[
as.numeric
(
input
$
selectPlotHierLinkage
)],
'.pdf'
)
})
createFnameDistPlot
=
reactive
({
paste0
(
'clust_hierch_clDist_'
,
s.cl.diss
[
as.numeric
(
input
$
selectPlotHierDiss
)],
'_'
,
s.cl.linkage
[
as.numeric
(
input
$
selectPlotHierLinkage
)],
'.pdf'
)
})
s.cl.linkage
[
as.numeric
(
input
$
selectPlotHierLinkage
)],
'.pdf'
)
})
# Hierarchical - Heat Map - download pdf
...
...
@@ -556,6 +568,13 @@ clustHier <- function(input, output, session, in.data4clust, in.data4trajPlot, i
in.facet.color
=
getClColHier
,
in.fname
=
createFnameRibbonPlot
)
# plot cluster PSD
callModule
(
modPSDPlot
,
'modPlotHierPsd'
,
in.data
=
data4trajPlotCl
,
in.facet
=
'cl'
,
in.facet.color
=
getClColHier
,
in.fname
=
createFnamePsdPlot
)
# plot distribution barplot
callModule
(
modClDistPlot
,
'hierClDistPlot'
,
in.data
=
data4clDistPlot
,
...
...
modules/trajPsdPlot.R
View file @
09033ebd
require
(
DT
)
# UI ----
modPSDPlotUI
=
function
(
id
,
label
=
"Plot PSD of average trajectory."
)
{
ns
<-
NS
(
id
)
...
...
@@ -44,12 +45,14 @@ modPSDPlotUI = function(id, label = "Plot PSD of average trajectory.") {
)
}
# Server ----
modPSDPlot
=
function
(
input
,
output
,
session
,
in.data
,
in.data
,
in.fname
,
in.facet
=
'group'
,
in.facet.color
=
NULL
,
in.fname
)
{
in.facet.color
=
NULL
)
{
ns
<-
session
$
ns
...
...
@@ -105,7 +108,7 @@ modPSDPlot = function(input, output, session,
in.fname
=
in.fname
,
plotTraj
,
TRUE
)
plot
PSD
<-
function
()
{
plot
Traj
<-
function
()
{
cat
(
file
=
stderr
(),
'plotPSD: in\n'
)
locBut
=
input
$
butPlotTraj
...
...
server.R
View file @
09033ebd
...
...
@@ -823,6 +823,11 @@ shinyServer(function(input, output, session) {
in.data.stim
=
data4stimPlot
,
in.fname
=
function
()
{
return
(
FPDFTCSINGLE
)})
# Trajectory plotting - PSD
callModule
(
modPSDPlot
,
'modPSDPlot'
,
in.data
=
data4trajPlotNoOut
,
in.fname
=
function
()
{
return
(
FPDFTCPSD
)})
# Tabs ----
###### AUC calculation and plotting
...
...
ui.R
View file @
09033ebd
...
...
@@ -118,6 +118,12 @@ shinyUI(fluidPage(
uiOutput
(
'varSelHighlight'
),
br
(),
modTrajPlotUI
(
'modTrajPlot'
)
),
tabPanel
(
"Power Spectral Density"
,
br
(),
modPSDPlotUI
(
'modPSDPlot'
)
)
)
),
...
...
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