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
S
shiny-timecourse-inspector
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pertz-lab
shiny-timecourse-inspector
Commits
d216d802
Commit
d216d802
authored
Oct 08, 2019
by
dmattek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed checks for NULL data to validate-need syntax.
parent
653dfeba
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
75 deletions
+33
-75
modules/distPlot.R
modules/distPlot.R
+8
-19
modules/tabScatter.R
modules/tabScatter.R
+9
-25
modules/trajPlot.R
modules/trajPlot.R
+9
-16
modules/trajRibbonPlot.R
modules/trajRibbonPlot.R
+7
-15
No files found.
modules/distPlot.R
View file @
d216d802
...
...
@@ -168,12 +168,6 @@ modDistPlot = function(input, output, session,
# Boxplot - display
output
$
outPlotBox
=
renderPlot
({
locBut
=
input
$
butPlot
if
(
locBut
==
0
)
{
cat
(
file
=
stderr
(),
'boxPlot:Go button not pressed\n'
)
return
(
NULL
)
}
plotBox
()
...
...
@@ -181,12 +175,6 @@ modDistPlot = function(input, output, session,
output
$
outPlotBoxInt
=
renderPlotly
({
locBut
=
input
$
butPlot
if
(
locBut
==
0
)
{
cat
(
file
=
stderr
(),
'boxPlot:Go button not pressed\n'
)
return
(
NULL
)
}
# This is required to avoid
# "Warning: Error in <Anonymous>: cannot open file 'Rplots.pdf'"
...
...
@@ -222,14 +210,15 @@ modDistPlot = function(input, output, session,
plotBox
<-
function
()
{
cat
(
file
=
stderr
(),
'plotBox\n'
)
locBut
=
input
$
butPlot
loc.dt
=
in.data
()
cat
(
file
=
stderr
(),
"plotBox: on to plot\n\n"
)
if
(
is.null
(
loc.dt
))
{
cat
(
file
=
stderr
(),
'plotBox: dt is NULL\n'
)
return
(
NULL
)
}
# Check if main data exists
# Thanks to solate all mods in the left panel are delayed
# until clicking the Plot button
loc.dt
=
isolate
(
in.data
())
validate
(
need
(
!
is.null
(
loc.dt
),
"Nothing to plot. Load data first!"
)
)
cat
(
file
=
stderr
(),
'plotBox:dt not NULL\n'
)
...
...
modules/tabScatter.R
View file @
d216d802
...
...
@@ -130,7 +130,7 @@ tabScatterPlotUI <-
checkboxInput
(
ns
(
'plotInt'
),
'Interactive Plot'
,
value
=
FALSE
),
actionButton
(
ns
(
'but
GoScatter
'
),
'Plot!'
),
actionButton
(
ns
(
'but
Plot
'
),
'Plot!'
),
uiOutput
(
ns
(
"plotInt_ui"
)),
downPlotUI
(
ns
(
'downPlotScatter'
),
"Download Plot"
)
)
...
...
@@ -286,20 +286,18 @@ tabScatterPlot <-
plotScatter
<-
function
()
{
cat
(
file
=
stderr
(),
"plotScatter\n"
)
locBut
=
input
$
butPlot
# isolate because calculations & plotting take a while
# re-plotting done upon button press
loc.dt
=
isolate
(
data4scatterPlot
())
cat
(
"plotScatter on to plot\n\n"
)
if
(
is.null
(
loc.dt
))
{
cat
(
file
=
stderr
(),
'plotScatter: dt is NULL\n'
)
return
(
NULL
)
}
# Check if main data exists
# Thanks to solate all mods in the left panel are delayed
# until clicking the Plot button
loc.dt
=
isolate
(
in.data
())
validate
(
need
(
!
is.null
(
loc.dt
),
"Nothing to plot. Load data first!"
)
)
cat
(
file
=
stderr
(),
'plotScatter:dt not NULL\n'
)
p.out
=
LOCggplotScat
(
dt.arg
=
loc.dt
,
plotlab.arg
=
NULL
,
...
...
@@ -314,14 +312,6 @@ tabScatterPlot <-
# Plot rendering ----
output
$
outPlotScatter
<-
renderPlot
({
locBut
=
input
$
butGoScatter
if
(
locBut
==
0
)
{
cat
(
file
=
stderr
(),
'plotScatter: Go button not pressed\n'
)
return
(
NULL
)
}
plotScatter
()
})
...
...
@@ -331,12 +321,6 @@ tabScatterPlot <-
# 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
)
}
if
(
names
(
dev.cur
())
!=
"null device"
)
dev.off
()
pdf
(
NULL
)
...
...
modules/trajPlot.R
View file @
d216d802
...
...
@@ -79,6 +79,7 @@ modTrajPlotUI = function(id, label = "Plot Individual Time Series") {
uiOutput
(
ns
(
'uiPlotTraj'
)),
br
(),
modTrackStatsUI
(
ns
(
'dispTrackStats'
)),
br
(),
downPlotUI
(
ns
(
'downPlotTraj'
),
"Download Plot"
)
)
}
...
...
@@ -238,26 +239,20 @@ modTrajPlot = function(input, output, session,
plotTraj
<-
function
()
{
cat
(
file
=
stderr
(),
'plotTraj: in\n'
)
locBut
=
input
$
butPlotTraj
if
(
locBut
==
0
)
{
cat
(
file
=
stderr
(),
'plotTraj: Go button not pressed\n'
)
return
(
NULL
)
}
# make the f-n dependent on the button click
locBut
=
input
$
butPlotTraj
# check main data exists
# Check if main data exists
# Thanks to solate all mods in the left panel are delayed
# until clicking the Plot button
loc.dt
=
isolate
(
in.data
())
cat
(
"plotTraj: on to plot\n\n"
)
if
(
is.null
(
loc.dt
))
{
cat
(
file
=
stderr
(),
'plotTraj: dt is NULL\n'
)
return
(
NULL
)
}
validate
(
need
(
!
is.null
(
loc.dt
),
"Nothing to plot. Load data first!"
)
)
cat
(
file
=
stderr
(),
'plotTraj: dt not NULL\n'
)
# check if stim data exists
loc.dt.stim
=
isolate
(
in.data.stim
())
...
...
@@ -267,8 +262,6 @@ modTrajPlot = function(input, output, session,
cat
(
file
=
stderr
(),
'plotTraj: dt.stim not NULL\n'
)
}
# Future: change such that a column with colouring status is chosen by the user
# colour trajectories, if dataset contains mid.in column
# with filtering status of trajectory
...
...
modules/trajRibbonPlot.R
View file @
d216d802
...
...
@@ -68,7 +68,7 @@ modTrajRibbonPlotUI = function(id, label = "Plot Individual Time Series") {
uiOutput
(
ns
(
'uiPlotTraj'
)),
br
(),
modTrackStatsUI
(
ns
(
'dispTrackStats'
)),
br
(),
downPlotUI
(
ns
(
'downPlotTraj'
),
"Download Plot"
)
)
}
...
...
@@ -232,24 +232,16 @@ modTrajRibbonPlot = function(input, output, session,
cat
(
file
=
stderr
(),
'plotTrajRibbon: in\n'
)
locBut
=
input
$
butPlotTraj
if
(
locBut
==
0
)
{
cat
(
file
=
stderr
(),
'plotTrajRibbon: Go button not pressed\n'
)
return
(
NULL
)
}
# check if main data exists
# Check if main data exists
# Thanks to solate all mods in the left panel are delayed
# until clicking the Plot button
loc.dt
=
isolate
(
in.data
())
cat
(
"plotTrajRibbon: on to plot\n\n"
)
if
(
is.null
(
loc.dt
))
{
cat
(
file
=
stderr
(),
'plotTrajRibbon: dt is NULL\n'
)
return
(
NULL
)
}
validate
(
need
(
!
is.null
(
loc.dt
),
"Nothing to plot. Load data first!"
)
)
cat
(
file
=
stderr
(),
'plotTrajRibbon: dt not NULL\n'
)
# check if stim data exists
loc.dt.stim
=
isolate
(
in.data.stim
())
...
...
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