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
5f86a0fd
Commit
5f86a0fd
authored
Jun 14, 2019
by
Maciej Dobrzynski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fixes in UI
parent
ffab21c1
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
58 additions
and
57 deletions
+58
-57
modules/auxfunc.R
modules/auxfunc.R
+15
-8
modules/boxPlot.R
modules/boxPlot.R
+2
-2
modules/clDistPlot.R
modules/clDistPlot.R
+2
-2
modules/clHeatmapPlot.R
modules/clHeatmapPlot.R
+0
-11
modules/selOutliers.R
modules/selOutliers.R
+1
-1
modules/tabScatter.R
modules/tabScatter.R
+1
-1
modules/trajPlot.R
modules/trajPlot.R
+5
-6
modules/trajPsdPlot.R
modules/trajPsdPlot.R
+27
-20
modules/trajRibbonPlot.R
modules/trajRibbonPlot.R
+4
-5
ui.R
ui.R
+1
-1
No files found.
modules/auxfunc.R
View file @
5f86a0fd
...
...
@@ -25,15 +25,22 @@ DEB = T
# PLOTFONTFACETSTRIP = 10
# PLOTFONTLEGEND = 8
PLOTFONTBASE
=
12
PLOTFONTAXISTEXT
=
12
PLOTFONTAXISTITLE
=
12
PLOTFONTFACETSTRIP
=
16
PLOTFONTLEGEND
=
12
PLOTFONTBASE
=
16
PLOTFONTAXISTEXT
=
16
PLOTFONTAXISTITLE
=
16
PLOTFONTFACETSTRIP
=
20
PLOTFONTLEGEND
=
16
# height (in pixels) of ribbon and single traj. plots
PLOTRIBBONHEIGHT
=
500
# in pixels
PLOTTRAJHEIGHT
=
500
# in pixels
PLOTPSDHEIGHT
=
500
# in pixels
PLOTBOXHEIGHT
=
500
# in pixels
PLOTSCATTERHEIGHT
=
500
# in pixels
PLOTWIDTH
=
85
# in percent
# default number of facets in plots
PLOTNFACETDEFAULT
=
2
PLOTNFACETDEFAULT
=
3
# internal column names
COLRT
=
'realtime'
...
...
@@ -499,7 +506,7 @@ LOCrotatedAxisElementText = function(angle, position='x', size = 12){
rads
=
(
-
angle
-
positions
[[
position
]])
*
pi
/
180
hjust
=
round
((
1
-
sin
(
rads
)))
/
2
vjust
=
round
((
1
+
cos
(
rads
)))
/
2
element_text
(
size
=
12
,
angle
=
angle
,
vjust
=
vjust
,
hjust
=
hjust
)
element_text
(
size
=
size
,
angle
=
angle
,
vjust
=
vjust
,
hjust
=
hjust
)
}
# Plot individual time series
...
...
modules/boxPlot.R
View file @
5f86a0fd
...
...
@@ -43,7 +43,7 @@ modBoxPlotUI = function(id, label = "Plot Box-plots") {
numericInput
(
ns
(
'inPlotBoxWidth'
),
'Width [%]:'
,
value
=
100
,
value
=
PLOTWIDTH
,
min
=
10
,
width
=
'100px'
,
step
=
10
...
...
@@ -51,7 +51,7 @@ modBoxPlotUI = function(id, label = "Plot Box-plots") {
numericInput
(
ns
(
'inPlotBoxHeight'
),
'Height [px]:'
,
value
=
800
,
value
=
PLOTBOXHEIGHT
,
min
=
100
,
width
=
'100px'
,
step
=
50
...
...
modules/clDistPlot.R
View file @
5f86a0fd
...
...
@@ -7,7 +7,7 @@ modClDistPlotUI = function(id, label = "Plot Fractions WIthin Clusters") {
"45 deg"
=
45
,
"90 deg"
=
90
)),
actionButton
(
ns
(
'butPlotClDist'
),
'Plot!'
),
plotOutput
(
ns
(
'outPlotClDist'
),
height
=
'800px'
,
width
=
'auto'
),
plotOutput
(
ns
(
'outPlotClDist'
),
height
=
PLOTBOXHEIGHT
,
width
=
'auto'
),
downPlotUI
(
ns
(
'downPlotClDist'
),
"Download PDF"
)
)
}
...
...
@@ -63,7 +63,7 @@ modClDistPlot = function(input, output, session, in.data, in.cols = NULL, in.fna
in.font.strip
=
PLOTFONTFACETSTRIP
,
in.font.legend
=
PLOTFONTLEGEND
)
+
theme
(
axis.text.x
=
LOCrotatedAxisElementText
(
as.numeric
(
input
$
rBAxisLabelsRotate
))
axis.text.x
=
LOCrotatedAxisElementText
(
as.numeric
(
input
$
rBAxisLabelsRotate
)
,
size
=
PLOTFONTAXISTEXT
)
)
return
(
p.out
)
...
...
modules/clHeatmapPlot.R
deleted
100644 → 0
View file @
ffab21c1
modHeatmapPlotUI
=
function
(
id
,
label
=
"Plot Heatmap"
)
{
ns
<-
NS
(
id
)
}
modHeatmapPlot
=
function
(
input
,
output
,
session
,
in.data
)
{
ns
<-
session
$
ns
}
\ No newline at end of file
modules/selOutliers.R
View file @
5f86a0fd
...
...
@@ -67,7 +67,7 @@ modSelOutliers = function(input, output, session, in.data) {
output
$
txtOutliersPerc
<-
renderText
({
cat
(
file
=
stdout
(),
'modSelOutliers: txtOutliersPerc\n'
)
sprintf
(
'<b>%d total track(s)<br>%d
outlier track(s)<br>%d outlier
point(s)</b><br>'
,
sprintf
(
'<b>%d total track(s)<br>%d
removed track(s)<br>%d removed
point(s)</b><br>'
,
nCellsCounter
[[
'nCellsOrig'
]],
nCellsCounter
[[
'nCellsOrig'
]]
-
nCellsCounter
[[
'nCellsAfter'
]],
nCellsCounter
[[
'nOutlierTpts'
]])
...
...
modules/tabScatter.R
View file @
5f86a0fd
...
...
@@ -41,7 +41,7 @@ tabScatterPlotUI <- function(id, label = "Comparing t-points") {
numericInput
(
ns
(
'inPlotHeight'
),
'Display plot height [px]'
,
value
=
1000
,
value
=
PLOTSCATTERHEIGHT
,
min
=
100
,
step
=
100
),
...
...
modules/trajPlot.R
View file @
5f86a0fd
...
...
@@ -16,7 +16,7 @@ modTrajPlotUI = function(id, label = "Plot Individual Time Series") {
tagList
(
fluidRow
(
column
(
3
,
2
,
numericInput
(
ns
(
'inPlotTrajFacetNcol'
),
'#Columns:'
,
...
...
@@ -29,7 +29,7 @@ modTrajPlotUI = function(id, label = "Plot Individual Time Series") {
actionButton
(
ns
(
'butPlotTraj'
),
'Plot!'
)
),
column
(
3
,
2
,
checkboxGroupInput
(
ns
(
'chBPlotTrajStat'
),
'Stats:'
,
list
(
'Mean'
=
'mean'
,
'95% conf. interv.'
=
'CI'
,
'Std. error'
=
'SE'
))
),
column
(
...
...
@@ -48,20 +48,19 @@ modTrajPlotUI = function(id, label = "Plot Individual Time Series") {
),
column
(
3
,
2
,
numericInput
(
ns
(
'inPlotTrajWidth'
),
'Width [%]:'
,
value
=
100
,
value
=
PLOTWIDTH
,
min
=
10
,
max
=
100
,
width
=
'100px'
,
step
=
10
),
numericInput
(
ns
(
'inPlotTrajHeight'
),
'Height [px]:'
,
value
=
800
,
value
=
PLOTTRAJHEIGHT
,
min
=
100
,
width
=
'100px'
,
step
=
50
...
...
modules/trajPsdPlot.R
View file @
5f86a0fd
...
...
@@ -8,36 +8,43 @@ modPSDPlotUI = function(id, label = "Plot PSD of average trajectory.") {
tagList
(
fluidRow
(
column
(
3
,
2
,
radioButtons
(
ns
(
'rBPSDmethod'
),
'Method for PSD estimation:'
,
list
(
'Smoothed Fourier'
=
'pgram'
,
'AR Fit'
=
'ar'
)),
checkboxInput
(
ns
(
'chBplotTrajInt'
),
'Interactive Plot'
),
actionButton
(
ns
(
'butPlotTraj'
),
'Plot!'
)
),
column
(
3
,
2
,
selectInput
(
ns
(
'inPSDxchoice'
),
'X-axis:'
,
list
(
'Period'
=
TRUE
,
'Frequency'
=
FALSE
)),
numericInput
(
ns
(
'ninPSDsamplFreq'
),
'# time units between 2 points:'
,
value
=
1
,
min
=
0
,
step
=
1
)
),
column
(
3
,
selectInput
(
ns
(
'inPSDlogtype'
),
'Transformation:'
,
list
(
'1/x'
=
'inverse_trans'
,
'log2'
=
'log2'
,
'log10'
=
'log10'
,
'ln'
=
'log'
)),
checkboxGroupInput
(
ns
(
'chBGPSDlogaxis'
),
'Transform the axis:'
,
list
(
'x'
=
'x'
,
'y'
=
'y'
),
inline
=
TRUE
)
2
,
selectInput
(
ns
(
'inPSDtransXtype'
),
'Transform X-axis:'
,
list
(
'none'
=
'none'
,
'1/x'
=
'inverse_trans'
,
'log2'
=
'log2'
,
'log10'
=
'log10'
,
'ln'
=
'log'
)),
selectInput
(
ns
(
'inPSDtransYtype'
),
'Transform Y-axis:'
,
list
(
'none'
=
'none'
,
'1/y'
=
'inverse_trans'
,
'log2'
=
'log2'
,
'log10'
=
'log10'
,
'ln'
=
'log'
))
),
column
(
3
,
2
,
numericInput
(
ns
(
'inPlotTrajWidth'
),
'Width [%]:'
,
value
=
100
,
min
=
10
,
max
=
100
,
width
=
'100px'
,
step
=
10
),
numericInput
(
ns
(
'inPlotTrajHeight'
),
'Height [px]:'
,
value
=
800
,
value
=
PLOTPSDHEIGHT
,
min
=
100
,
width
=
'100px'
,
step
=
50
...
...
@@ -205,24 +212,24 @@ modPSDPlot = function(input, output, session,
in.font.axis.title
=
PLOTFONTAXISTITLE
,
in.font.strip
=
PLOTFONTFACETSTRIP
,
in.font.legend
=
PLOTFONTLEGEND
)
# TODO: Restore tick labels when using inverse transformation
# See: https://stackoverflow.com/questions/56130614/ggplot2-missing-labels-after-custom-scaling-of-axis
inverse_trans
<-
scales
::
trans_new
(
"myinverse"
,
transform
=
function
(
x
)
1
/
x
,
inverse
=
function
(
x
)
1
/
(
1
/
x
))
if
(
"x"
%in%
input
$
chBGPSDlogaxis
){
if
(
input
$
inPSDlogtype
==
"inverse_trans"
){
p.out
<-
p.out
+
scale_x_continuous
(
trans
=
inverse_trans
)
}
else
{
p.out
<-
p.out
+
scale_x_continuous
(
trans
=
input
$
inPSDlogtype
)
}
if
(
input
$
inPSDtransXtype
==
"inverse_trans"
){
p.out
<-
p.out
+
scale_x_continuous
(
trans
=
inverse_trans
)
}
else
if
(
!
(
input
$
inPSDtransXtype
==
"none"
))
{
p.out
<-
p.out
+
scale_x_continuous
(
trans
=
input
$
inPSDtransXtype
)
}
if
(
"y"
%in%
input
$
chBGPSDlogaxis
){
if
(
input
$
inPSDlogtype
==
"inverse_trans"
){
p.out
<-
p.out
+
scale_y_continuous
(
trans
=
inverse_trans
)
}
else
{
p.out
<-
p.out
+
scale_y_continuous
(
trans
=
input
$
inPSDlogtype
)
}
if
(
input
$
inPSDtransYtype
==
"inverse_trans"
){
p.out
<-
p.out
+
scale_y_continuous
(
trans
=
inverse_trans
)
}
else
if
(
!
(
input
$
inPSDtransYtype
==
"none"
))
{
p.out
<-
p.out
+
scale_y_continuous
(
trans
=
input
$
inPSDtransYtype
)
}
return
(
p.out
)
}
}
\ No newline at end of file
modules/trajRibbonPlot.R
View file @
5f86a0fd
...
...
@@ -6,7 +6,7 @@ modTrajRibbonPlotUI = function(id, label = "Plot Individual Time Series") {
tagList
(
fluidRow
(
column
(
3
,
2
,
checkboxInput
(
ns
(
'chBplotTrajInt'
),
'Interactive Plot'
),
radioButtons
(
ns
(
'rBlegendPos'
),
'Legend placement:'
,
list
(
'top'
=
'top'
,
'right'
=
'right'
)),
actionButton
(
ns
(
'butPlotTraj'
),
'Plot!'
)
...
...
@@ -16,20 +16,19 @@ modTrajRibbonPlotUI = function(id, label = "Plot Individual Time Series") {
sliderInput
(
ns
(
'sliPlotTrajSkip'
),
'Plot every n-th point:'
,
min
=
1
,
max
=
10
,
value
=
1
,
step
=
1
)
),
column
(
3
,
2
,
numericInput
(
ns
(
'inPlotTrajWidth'
),
'Width [%]:'
,
value
=
100
,
value
=
PLOTWIDTH
,
min
=
10
,
max
=
100
,
width
=
'100px'
,
step
=
10
),
numericInput
(
ns
(
'inPlotTrajHeight'
),
'Height [px]:'
,
value
=
800
,
value
=
PLOTRIBBONHEIGHT
,
min
=
100
,
width
=
'100px'
,
step
=
50
...
...
ui.R
View file @
5f86a0fd
...
...
@@ -18,7 +18,7 @@ shinyUI(fluidPage(
title
=
"Timecourse Inspector"
,
sidebarLayout
(
sidebarPanel
(
sidebarPanel
(
width
=
3
,
#Selector for file upload
fileInput
(
'inFileLoadNuc'
,
...
...
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