Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
shinyscreen
Manage
Activity
Members
Labels
Plan
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Environmental Cheminformatics
shinyscreen
Commits
fec4858e
Commit
fec4858e
authored
2 years ago
by
Todor Kondic
Browse files
Options
Downloads
Patches
Plain Diff
shiny-*, state: Streamline regeneration of m$run.
parent
9abcc7f2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
DESCRIPTION
+1
-1
1 addition, 1 deletion
DESCRIPTION
R/shiny-state.R
+5
-2
5 additions, 2 deletions
R/shiny-state.R
R/shiny-ui-base.R
+0
-9
0 additions, 9 deletions
R/shiny-ui-base.R
R/state.R
+2
-2
2 additions, 2 deletions
R/state.R
with
8 additions
and
14 deletions
DESCRIPTION
+
1
−
1
View file @
fec4858e
Package: shinyscreen
Title: Pre-screening of Mass Spectrometry Data
Version: 1.2
Version: 1.2
.1
Author: Todor Kondić
Maintainer: Todor Kondić <todor.kondic@uni.lu>
Authors@R:
...
...
This diff is collapsed.
Click to expand it.
R/shiny-state.R
+
5
−
2
View file @
fec4858e
...
...
@@ -167,7 +167,7 @@ unpack_app_state <- function(session,input,top_data_dir,project_path,packed_stat
selected
=
packed_state
$
input
[[
inp
]])
}
gui
<-
create_gui
(
project_path
)
gui
<-
create_gui
(
project_path
=
project_path
)
gui
$
compounds
$
lists
<-
packed_state
$
compounds
$
lists
gui
$
compounds
$
sets
<-
packed_state
$
compounds
$
sets
gui
$
datatab
$
file
<-
packed_state
$
datatab
$
file
...
...
@@ -240,11 +240,14 @@ input2conf <- function(input,gui,conf=list()) {
app_state2state
<-
function
(
input
,
gui
,
m
=
NULL
)
{
if
(
is.null
(
m
))
m
<-
new_project
(
gui
$
paths
$
project
)
m
$
run
$
paths
<-
shiny
::
reactiveValuesToList
(
gui
$
paths
)
##
m$run$paths <- shiny::reactiveValuesToList(gui$paths)
m
$
conf
<-
input2conf_setup
(
input
,
gui
=
gui
)
m
$
conf
<-
input2conf_prescreen
(
input
=
input
,
conf
=
m
$
conf
)
m
$
conf
<-
input2conf_figures
(
input
,
conf
=
m
$
conf
)
m
$
conf
<-
input2conf_report
(
input
,
conf
=
m
$
conf
)
m
$
conf
$
paths
$
data
<-
gui
$
paths
$
data
m
$
run
<-
new_runtime_state
(
project
=
gui
$
paths
$
project
,
conf
=
m
$
conf
)
m
$
input
$
tab
$
mzml
<-
gui2datatab
(
gui
)
m
}
...
...
This diff is collapsed.
Click to expand it.
R/shiny-ui-base.R
+
0
−
9
View file @
fec4858e
...
...
@@ -1004,10 +1004,6 @@ mk_shinyscreen_server <- function(projects,init) {
packed_state
=
pack
)
## Load computational state.
rvs
$
m
<-
readRDS
(
file
=
fn_state
)
rvs
$
m
$
run
<-
reinit_run_data
(
userdir
=
init
$
userdir
,
top_data_dir
=
init
$
indir
,
project
=
rvs
$
gui
$
project
(),
run
=
rvs
$
m
$
run
)
## If prescreen config invalid, reinit.
if
(
length
(
rvs
$
m
$
conf
$
prescreen
)
==
0
)
rvs
$
m
$
conf
<-
input2conf_prescreen
(
input
=
input
,
conf
=
rvs
$
m
$
conf
)
...
...
@@ -1028,11 +1024,6 @@ mk_shinyscreen_server <- function(projects,init) {
}
else
{
message
(
"Initialising project: "
,
wd
)
rvs
$
gui
<-
create_gui
(
project_path
=
fullwd
)
rvs
$
m
$
run
<-
new_runtime_state
(
fullwd
)
}
message
(
"project: "
,
rvs
$
gui
$
project
())
},
label
=
"project-b"
)
...
...
This diff is collapsed.
Click to expand it.
R/state.R
+
2
−
2
View file @
fec4858e
...
...
@@ -40,7 +40,7 @@ runtime_from_conf <- function(run,conf) {
run
}
reinit_run_data
<-
function
(
userdir
,
top_data_dir
,
project
,
run
)
{
reinit_run_data
<-
function
(
userdir
,
top_data_dir
,
project
,
run
=
NULL
)
{
if
(
!
is.null
(
run
))
{
olddata
<-
run
$
paths
$
data
oldproject
<-
basename
(
run
$
paths
$
project
)
...
...
@@ -48,8 +48,8 @@ reinit_run_data <- function(userdir,top_data_dir,project,run) {
message
(
"Project has been renamed to: "
,
project
)
message
(
"Old project name was: "
,
oldproject
)
}
if
(
isTruthy
(
olddata
))
run
$
paths
$
data
<-
file.path
(
top_user_dir
,
basename
(
olddata
))
}
if
(
isTruthy
(
olddata
))
run
$
paths
$
data
<-
file.path
(
top_user_dir
,
basename
(
olddata
))
run
$
project
<-
project
run
$
paths
$
project
<-
file.path
(
userdir
,
project
)
run
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment