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
f2b565a3
Commit
f2b565a3
authored
Jan 29, 2019
by
dmattek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added: multiple columns can be selected to add to track label and to create a unique track label ID
parent
e1b3f361
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
57 deletions
+13
-57
modules/selOutliers.R
modules/selOutliers.R
+3
-1
server.R
server.R
+10
-56
No files found.
modules/selOutliers.R
View file @
f2b565a3
...
...
@@ -58,11 +58,13 @@ modSelOutliers = function(input, output, session, in.data) {
id
=
NULL
)
# Display number of tracks and outliers
output
$
txtOutliersPerc
<-
renderText
({
cat
(
file
=
stderr
(),
'modSelOutliers: txtOutliersPerc\n'
)
sprintf
(
'<b>%d total track
s<br>%d outlier tracks<br>%d outlier points
</b><br>'
,
sprintf
(
'<b>%d total track
(s)<br>%d outlier track(s)<br>%d outlier point(s)
</b><br>'
,
nCellsCounter
[[
'nCellsOrig'
]],
nCellsCounter
[[
'nCellsOrig'
]]
-
nCellsCounter
[[
'nCellsAfter'
]],
nCellsCounter
[[
'nOutlierTpts'
]])
...
...
server.R
View file @
f2b565a3
...
...
@@ -153,7 +153,7 @@ shinyServer(function(input, output, session) {
selectInput
(
'inSelTrackLabel'
,
'Select Track Label
(e.g. objNuc_TrackObjects_Label)
:'
,
'Select Track Label:'
,
locCols
,
width
=
'100%'
,
selected
=
locColSel
...
...
@@ -206,7 +206,7 @@ shinyServer(function(input, output, session) {
#cat('UI varSelGroup::locColSel ', locColSel, '\n')
selectInput
(
'inSelGroup'
,
'Select
one or more facet groupings (e.g. Site, Well, Channel)
:'
,
'Select
columns for plot grouping
:'
,
locCols
,
width
=
'100%'
,
selected
=
locColSel
,
...
...
@@ -216,6 +216,8 @@ shinyServer(function(input, output, session) {
}
})
# UI for selecting grouping to add to track ID to make
# the track ID unique across entire dataset
output
$
varSelSite
=
renderUI
({
cat
(
file
=
stderr
(),
'UI varSelSite\n'
)
...
...
@@ -225,10 +227,11 @@ shinyServer(function(input, output, session) {
selectInput
(
'inSelSite'
,
'Select
FOV (e.g. Metadata_Site or Metadata_Series)
:'
,
'Select
grouping columns to add to track label
:'
,
locCols
,
width
=
'100%'
,
selected
=
locColSel
selected
=
locColSel
,
multiple
=
T
)
}
})
...
...
@@ -352,39 +355,6 @@ shinyServer(function(input, output, session) {
})
# UI-main-tab-remove-outliers ----
output
$
uiSlOutliers
=
renderUI
({
cat
(
file
=
stderr
(),
'UI uiSlOutliers\n'
)
if
(
input
$
chBoutliers
)
{
sliderInput
(
'slOutliersPerc'
,
label
=
'Percentage of middle data'
,
min
=
90
,
max
=
100
,
value
=
99.5
,
step
=
0.1
)
}
})
output
$
uiTxtOutliers
=
renderUI
({
cat
(
file
=
stderr
(),
'UI uiTxtOutliers\n'
)
if
(
input
$
chBoutliers
)
{
htmlOutput
(
'txtOutliersPerc'
)
}
})
output
$
txtOutliersPerc
<-
renderText
({
sprintf
(
'<b>#tracks: %d <br>#outliers: %d</b>'
,
nCellsCounter
[[
'nCellsOrig'
]],
nCellsCounter
[[
'nCellsOrig'
]]
-
nCellsCounter
[[
'nCellsAfterOutlierTrim'
]])
})
# Processing-data ----
...
...
@@ -456,26 +426,10 @@ shinyServer(function(input, output, session) {
return
(
NULL
)
if
(
input
$
chBtrackUni
)
{
loc.types
=
lapply
(
loc.dt
,
class
)
if
(
loc.types
[[
input
$
inSelTrackLabel
]]
%in%
c
(
'numeric'
,
'integer'
)
&
loc.types
[[
input
$
inSelSite
]]
%in%
c
(
'numeric'
,
'integer'
))
{
loc.dt
[,
trackObjectsLabelUni
:=
paste
(
sprintf
(
"%03d"
,
get
(
input
$
inSelSite
)),
sprintf
(
"%04d"
,
get
(
input
$
inSelTrackLabel
)),
sep
=
"_"
)]
}
else
if
(
loc.types
[[
input
$
inSelTrackLabel
]]
%in%
c
(
'numeric'
,
'integer'
))
{
loc.dt
[,
trackObjectsLabelUni
:=
paste
(
sprintf
(
"%s"
,
get
(
input
$
inSelSite
)),
sprintf
(
"%04d"
,
get
(
input
$
inSelTrackLabel
)),
sep
=
"_"
)]
}
else
if
(
loc.types
[[
input
$
inSelSite
]]
%in%
c
(
'numeric'
,
'integer'
))
{
loc.dt
[,
trackObjectsLabelUni
:=
paste
(
sprintf
(
"%03d"
,
get
(
input
$
inSelSite
)),
sprintf
(
"%s"
,
get
(
input
$
inSelTrackLabel
)),
sep
=
"_"
)]
}
else
{
loc.dt
[,
trackObjectsLabelUni
:=
paste
(
sprintf
(
"%s"
,
get
(
input
$
inSelSite
)),
sprintf
(
"%s"
,
get
(
input
$
inSelTrackLabel
)),
sep
=
"_"
)]
}
# create unique track ID based on columns specified in input$inSelSite field and combine with input$inSelTrackLabel
loc.dt
[,
trackObjectsLabelUni
:=
do.call
(
paste
,
c
(
.SD
,
sep
=
"_"
)),
.SDcols
=
c
(
input
$
inSelSite
,
input
$
inSelTrackLabel
)
]
}
else
{
# stay with track ID provided in the loaded dataset; has to be unique
loc.dt
[,
trackObjectsLabelUni
:=
get
(
input
$
inSelTrackLabel
)]
}
...
...
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