Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
pertz-lab
shiny-outlier-remove
Commits
176139a8
Commit
176139a8
authored
Jun 04, 2019
by
Maciej Dobrzynski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reorganized: split into ui, server, and global files.
parent
539be6e0
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
65 additions
and
70 deletions
+65
-70
global.R
global.R
+5
-0
modules/hierclustfunction.R
modules/hierclustfunction.R
+0
-0
modules/interpolCompleteFunc.R
modules/interpolCompleteFunc.R
+0
-0
modules/reacHierClustMODULE.R
modules/reacHierClustMODULE.R
+0
-0
modules/reacRollWinMODULE.R
modules/reacRollWinMODULE.R
+0
-0
modules/rolling_window_loop.R
modules/rolling_window_loop.R
+0
-0
server.R
server.R
+5
-70
ui.R
ui.R
+55
-0
No files found.
global.R
0 → 100644
View file @
176139a8
source
(
"modules/hierclustfunction.R"
)
source
(
"modules/interpolCompleteFunc.R"
)
source
(
"modules/reacRollWinMODULE.R"
)
source
(
"modules/reacHierClustMODULE.R"
)
source
(
'modules/rolling_window_loop.R'
)
hierclustfunction.R
→
modules/
hierclustfunction.R
View file @
176139a8
File moved
interpolCompleteFunc.R
→
modules/
interpolCompleteFunc.R
View file @
176139a8
File moved
reacHierClustMODULE.R
→
modules/
reacHierClustMODULE.R
View file @
176139a8
File moved
reacRollWinMODULE.R
→
modules/
reacRollWinMODULE.R
View file @
176139a8
File moved
rolling_window_loop.R
→
modules/
rolling_window_loop.R
View file @
176139a8
File moved
reacNewApproach
.R
→
server
.R
View file @
176139a8
...
...
@@ -3,7 +3,6 @@
#' Author: Mauro Gwerder
#'
#' In this main file, the input data is processed for feeding it into the modules.
#' UI & Server are combined in this file
#'
#' package requirements:
...
...
@@ -20,68 +19,6 @@ library(imputeTS) # for interpolating NAs
options
(
shiny.maxRequestSize
=
400
*
1024
^
2
)
source
(
"hierclustfunction.R"
)
source
(
"interpolCompleteFunc.R"
)
source
(
"reacRollWinMODULE.R"
)
source
(
"reacHierClustMODULE.R"
)
source
(
'rolling_window_loop.R'
)
ui
<-
dashboardPage
(
# starts shiny in dashboard
dashboardHeader
(
# Application title
title
=
"Outlier Detection"
),
dashboardSidebar
(
# dashboard-equivalent to "tabs" in normal shiny
sidebarMenu
(
# Every item stands for one tab. "Rolling Window" and "hierarchical clustering" will show outputs of the
# correspondent modules, whereas "Generate synthetic Data" & "Load Data" represent dropdown-menus that load
# or generate datasets.
menuItem
(
"Rolling Window"
,
tabName
=
"rollwindow"
,
icon
=
icon
(
"windows"
)),
menuItem
(
"hierarchical clustering"
,
tabName
=
"hiercluster"
,
icon
=
icon
(
"tree"
)),
menuItem
(
"Generate synthetic Data"
,
tabName
=
"synDataOpt"
,
icon
=
icon
(
"random"
),
# tab for synthetic Data options
sliderInput
(
"slider.syn"
,
"amount of outliers"
,
0
,
30
,
1
),
checkboxInput
(
"check.super"
,
"add innovative outliers"
),
actionButton
(
"b.syndata"
,
"generate synthetic data"
),
br
()),
menuItem
(
"Load Data"
,
tabName
=
" ownDataOpt"
,
icon
=
icon
(
"file"
),
fileInput
(
"file.name"
,
"file name:"
,
accept
=
c
(
'text/csv'
,
'text/comma-separated-values,text/plain'
)
),
# extracted columns from the loaded dataset will be displayed for selection
uiOutput
(
"uiOut.ID"
),
uiOutput
(
"uiOut.time"
),
uiOutput
(
"uiOut.meas"
),
uiOutput
(
"uiOut.FOV"
),
actionButton
(
"b.loaddata"
,
"load File"
),
br
())
)
),
dashboardBody
(
# Includes the usage of ShinyJS - not used in the app for now
useShinyjs
(),
tabItems
(
# references to the modules "RollWin" & "HierCluster"
tabItem
(
tabName
=
"rollwindow"
,
RollWinInput
(
"RollWin"
)
),
tabItem
(
tabName
=
"hiercluster"
,
HierClusterInput
(
"HierCluster"
)
)
)
)
)
server
<-
function
(
input
,
output
)
{
# clustering and generation of heatmap
...
...
@@ -190,7 +127,7 @@ server <- function(input, output) {
return
(
dm.out
)
})
# generates synthetic dataset.
# Function "LOCgenTraj" taken from Maciej Dobrzynski from his application "Timecourse inspector"
synData
<-
eventReactive
(
input
$
b.syndata
,
{
...
...
@@ -213,7 +150,7 @@ server <- function(input, output) {
# To enable this, button clicks will be registered so that only the last click decides on
# which source is piloted.
dataInBoth
<-
reactive
({
InLoadData
<-
input
$
b.loaddata
InSynData
<-
input
$
b.syndata
...
...
@@ -229,10 +166,10 @@ server <- function(input, output) {
# isolate the checks of counter reactiveValues
# as we set the values in this same reactive
if
(
InLoadData
!=
isolate
(
counter
$
loadData
))
{
if
(
InLoadData
!=
isolate
(
counter
$
loadData
))
{
cat
(
"dataInBoth if InLoadData\n"
)
dm
=
loadColData
()
dm
=
loadColData
()
counter
$
loadData
<-
InLoadData
}
else
if
(
InSynData
!=
isolate
(
counter
$
synData
))
{
...
...
@@ -250,5 +187,3 @@ server <- function(input, output) {
}
shinyApp
(
ui
,
server
)
ui.R
0 → 100644
View file @
176139a8
ui
<-
dashboardPage
(
# starts shiny in dashboard
dashboardHeader
(
# Application title
title
=
"Outlier Detection"
),
dashboardSidebar
(
# dashboard-equivalent to "tabs" in normal shiny
sidebarMenu
(
# Every item stands for one tab. "Rolling Window" and "hierarchical clustering" will show outputs of the
# correspondent modules, whereas "Generate synthetic Data" & "Load Data" represent dropdown-menus that load
# or generate datasets.
menuItem
(
"Rolling Window"
,
tabName
=
"rollwindow"
,
icon
=
icon
(
"windows"
)),
menuItem
(
"hierarchical clustering"
,
tabName
=
"hiercluster"
,
icon
=
icon
(
"tree"
)),
menuItem
(
"Generate synthetic Data"
,
tabName
=
"synDataOpt"
,
icon
=
icon
(
"random"
),
# tab for synthetic Data options
sliderInput
(
"slider.syn"
,
"amount of outliers"
,
0
,
30
,
1
),
checkboxInput
(
"check.super"
,
"add innovative outliers"
),
actionButton
(
"b.syndata"
,
"generate synthetic data"
),
br
()),
menuItem
(
"Load Data"
,
tabName
=
" ownDataOpt"
,
icon
=
icon
(
"file"
),
fileInput
(
"file.name"
,
"file name:"
,
accept
=
c
(
'text/csv'
,
'text/comma-separated-values,text/plain'
)
),
# extracted columns from the loaded dataset will be displayed for selection
uiOutput
(
"uiOut.ID"
),
uiOutput
(
"uiOut.time"
),
uiOutput
(
"uiOut.meas"
),
uiOutput
(
"uiOut.FOV"
),
actionButton
(
"b.loaddata"
,
"load File"
),
br
())
)
),
dashboardBody
(
# Includes the usage of ShinyJS - not used in the app for now
useShinyjs
(),
tabItems
(
# references to the modules "RollWin" & "HierCluster"
tabItem
(
tabName
=
"rollwindow"
,
RollWinInput
(
"RollWin"
)
),
tabItem
(
tabName
=
"hiercluster"
,
HierClusterInput
(
"HierCluster"
)
)
)
)
)
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