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
654106c4
Commit
654106c4
authored
2 years ago
by
Todor Kondic
Browse files
Options
Downloads
Patches
Plain Diff
...
parent
9ff8dc2d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
R/shiny-state.R
+6
-0
6 additions, 0 deletions
R/shiny-state.R
R/shiny-ui-base.R
+73
-27
73 additions, 27 deletions
R/shiny-ui-base.R
inst/rmd/app.Rmd
+21
-1
21 additions, 1 deletion
inst/rmd/app.Rmd
with
100 additions
and
28 deletions
R/shiny-state.R
+
6
−
0
View file @
654106c4
...
...
@@ -28,6 +28,8 @@ GUI_ALL_INPUTS <- c(GUI_SELECT_INPUTS,
GUI_TEXT_INPUTS
,
GUI_RADIO_INPUTS
)
#' @export
create_stub_gui
<-
function
()
{
gui
<-
list
()
...
...
@@ -298,3 +300,7 @@ pre_extr_val_block <- function(m) {
return
(
T
)
}
commit_val_block
<-
function
(
gui
)
{
}
This diff is collapsed.
Click to expand it.
R/shiny-ui-base.R
+
73
−
27
View file @
654106c4
...
...
@@ -430,7 +430,18 @@ mk_shinyscreen_server <- function(projects,init) {
## The reactive world.
rvs
<-
reactiveValues
(
m
=
def_state
,
gui
=
create_gui
())
gui
=
create_gui
(),
status
=
reactiveValues
(
is_extracted_stat
=
NA_character_
,
is_qa_stat
=
NA_character_
,
ms1_coarse_stat
=
NA_character_
,
ms1_fine_stat
=
NA_character_
,
ms1_eic_stat
=
NA_character_
,
rt_stat
=
NA_character_
,
ms1_int_thresh_stat
=
NA_character_
,
ms2_int_thresh_stat
=
NA_character_
,
s2n_stat
=
NA_character_
,
ret_time_shift_tol_stat
=
NA_character_
))
compl_sets
<-
eventReactive
(
rvs
$
m
$
input
$
tab
$
setid
,
rvs
$
m
$
input
$
tab
$
setid
[,
unique
(
set
)])
...
...
@@ -744,60 +755,89 @@ mk_shinyscreen_server <- function(projects,init) {
message
(
"project: "
,
rvs
$
gui
$
project
())
},
label
=
"project-b"
)
observe
({
rvs
$
gui
$
paths
$
project
rvs
$
gui
$
paths
$
data
rvs
$
gui
$
datatab
$
file
rvs
$
gui
$
datatab
$
tag
rvs
$
gui
$
datatab
$
set
rvs
$
gui
$
datatab
$
adduct
rvs
$
gui
$
compounds
$
lists
rvs
$
gui
$
compounds
$
sets
input
$
missingprec
##
observe({
##
rvs$gui$paths$project
##
rvs$gui$paths$data
##
rvs$gui$datatab$file
##
rvs$gui$datatab$tag
##
rvs$gui$datatab$set
##
rvs$gui$datatab$adduct
##
rvs$gui$compounds$lists
##
rvs$gui$compounds$sets
##
input$missingprec
input
$
ms1_fine
input
$
ms1_fine_unit
##
input$ms1_fine
##
input$ms1_fine_unit
input
$
ms1_coarse
input
$
ms1_coarse_unit
##
input$ms1_coarse
##
input$ms1_coarse_unit
input
$
ms1_eic
input
$
ms1_eic_unit
##
input$ms1_eic
##
input$ms1_eic_unit
input
$
ms1_rt_win
input
$
ms1_rt_win_unit
##
input$ms1_rt_win
##
input$ms1_rt_win_unit
input
$
missingprec
##
input$missingprec
isolate
({
rvs
$
m
$
conf
<-
input2conf_setup
(
gui
=
rvs
$
gui
,
conf
=
rvs
$
m
$
conf
,
input
=
input
)
})
##
isolate({
##
rvs$m$conf <- input2conf_setup(gui=rvs$gui,conf=rvs$m$conf,input=input)
##
})
message
(
"Initial parameters updated."
)
},
label
=
"gen-setup-state"
)
## message("Initial parameters updated.")
## }, label = "gen-setup-state")
observeEvent
(
input
$
commit_changes
,{
rvs
$
m
$
conf
<-
input2conf_setup
(
input
=
input
,
gui
=
rvs
$
gui
,
conf
=
rvs
$
conf
)
rvs
$
m
$
conf
<-
input2conf_prescreen
(
input
=
input
,
conf
=
rvs
$
conf
)
},
label
=
"comm-changes"
)
observeEvent
(
input
$
extract_b
,{
req
(
isTruthy
(
pre_extr_val_block
(
rvs
$
m
)))
rvs
$
status
$
ms1_coarse
=
rvs
$
m
$
conf
$
tolerance
[[
"ms1 coarse"
]]
rvs
$
status
$
ms1_fine
=
rvs
$
m
$
conf
$
tolerance
[[
"ms1 fine"
]]
rvs
$
status
$
ms1_eic_stat
=
rvs
$
m
$
conf
$
tolerance
[[
"eic"
]]
rvs
$
status
$
rt_stat
=
rvs
$
m
$
conf
$
tolerance
[[
"rt"
]]
rvs
$
status
$
is_extracted_stat
=
"In process."
})
observeEvent
(
input
$
extract_b
,{
req
(
isTruthy
(
pre_extr_val_block
(
rvs
$
m
)))
shinymsg
(
"Extraction has started. This may take a while."
)
rvs
$
m
<-
run
(
m
=
rvs
$
m
,
phases
=
"extract"
)
rvs
$
m
<-
run
(
m
=
rvs
$
m
,
phases
=
c
(
"setup"
,
"extract"
)
)
message
(
"(extract) Done extracting."
)
fn_c_state
<-
file.path
(
rvs
$
m
$
run
$
paths
$
project
,
paste0
(
"extract."
,
shinyscreen
:::
FN_CONF
))
yaml
::
write_yaml
(
x
=
rvs
$
m
$
conf
,
file
=
fn_c_state
)
message
(
"(extract) Config written to "
,
fn_c_state
)
shinymsg
(
"Extraction has been completed."
)
rvs
$
status
$
is_extracted_stat
=
"Yes."
})
observeEvent
(
input
$
presc_b
,{
rvs
$
status
$
ms1_int_thresh_stat
=
rvs
$
m
$
conf
$
prescreen
[[
"ms1_int_thresh_stat"
]]
rvs
$
status
$
ms2_int_thresh_stat
=
rvs
$
m
$
conf
$
prescreen
[[
"ms2_int_thresh_stat"
]]
rvs
$
status
$
s2n_stat
=
rvs
$
m
$
conf
$
prescreen
[[
"s2n"
]]
rs
$
status
$
ret_time_shift_tol_stat
=
rvs
$
m
$
conf
$
prescreen
[[
"ret_time_shift_tol"
]]
rvs
$
status
$
is_qa_stat
=
"No."
})
observeEvent
(
input
$
presc_b
,{
shinymsg
(
"Prescreening started. Please wait."
)
rvs
$
m
<-
r
f_
prescreen
_state
(
)
rvs
$
m
<-
r
un
(
m
=
rvs
$
m
,
phases
=
"
prescreen
"
)
message
(
"(prescreen) Done prescreening."
)
shinymsg
(
"Prescreening completed."
)
## TODO TODO TODO see also rvs statuses.
})
...
...
@@ -988,6 +1028,12 @@ mk_shinyscreen_server <- function(projects,init) {
deferRender
=
T
,
scroller
=
T
))
})
output
$
is_extracted_txt
<-
renderText
({
"No."
})
output
$
is_qa_txt
<-
renderText
({
"No."
})
}
...
...
This diff is collapsed.
Click to expand it.
inst/rmd/app.Rmd
+
21
−
1
View file @
654106c4
...
...
@@ -585,7 +585,7 @@ DT::DTOutput("summ_subset")
<div style="padding-left: 3em">
#### Control
<div style="display: flex;flex-flow: row
no
wrap;">
<div style="display: flex;flex-flow: row wrap;">
```{r, echo=F}
actionButton(inputId= "commit_changes",
label = "Commit configuration")
...
...
@@ -600,6 +600,26 @@ actionButton(inputId = "presc_b",
label = "Prescreen")
```
</div>
#### Status
- Has the data been extracted? `r htmlOutput("is_extracted_stat", inline=T)`
- Has the data been auto-quality checked? `r htmlOutput("is_qa_stat", inline=T)`
##### Extraction
- MS1 coarse: `r htmlOutput("ms1_coarse_stat", inline=T)`
- MS1 fine: `r htmlOutput("ms1_fine_stat", inline=T)`
- MS1 eic: `r htmlOutput("ms1_eic_stat", inline=T)`
- Retention time window: `r htmlOutput("rt_stat", inline=T)`
##### Prescreening
- Intensity Threshold (MS1): `r htmlOutput("ms1_int_thresh_stat", inline=T)`
- Intensity Threshold (MS2): `r htmlOutput("ms2_int_thresh_stat", inline=T)`
- Retention time shift: `r htmlOutput("s2n_stat", inline=T)`
- Signal-to-noise ratio: `r htmlOutput("ret_time_shift_tol_unit_stat", inline=T)`
</div>
</div>
...
...
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