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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Miroslav Kratochvil
shinyscreen
Commits
a2eed0ac
Commit
a2eed0ac
authored
2 years ago
by
Todor Kondic
Browse files
Options
Downloads
Patches
Plain Diff
app: shiny-ui-base: extraction and prescreen reactivity works alongside status reporting
parent
50042118
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
R/shiny-ui-base.R
+39
-28
39 additions, 28 deletions
R/shiny-ui-base.R
inst/rmd/app.Rmd
+8
-10
8 additions, 10 deletions
inst/rmd/app.Rmd
with
47 additions
and
38 deletions
R/shiny-ui-base.R
+
39
−
28
View file @
a2eed0ac
...
...
@@ -658,10 +658,10 @@ mk_shinyscreen_server <- function(projects,init) {
server
<-
function
(
input
,
output
,
session
)
{
## REACTIVE VALUES
rv_extr_flag
<-
reactiveVal
(
F
)
rv_extr_fin_flag
<-
reactiveVal
(
0L
)
rv_presc_flag
<-
reactiveVal
(
0L
)
rv_extr_comp
<-
reactiveVal
(
NA
)
rv_presc_flag
<-
reactiveVal
(
F
)
rtimer_extr
<-
reactiveTimer
(
1000
)
rtimer_presc
<-
reactiveTimer
(
500
)
## REACTIVE FUNCTIONS
rf_compound_set
<-
reactive
({
req
(
rvs
$
gui
$
compounds
$
sets
,
...
...
@@ -819,51 +819,62 @@ mk_shinyscreen_server <- function(projects,init) {
rvs
$
status
$
rt_stat
=
m
$
conf
$
tolerance
[[
"rt"
]]
rvs
$
status
$
is_extracted_stat
=
"In progress."
## extract_q <<- T
rv_extr_flag
(
T
)
## rv_extr_flag(rv_extr_flag() + 1L)
})
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"
]]
rvs
$
status
$
ret_time_shift_tol_stat
=
rvs
$
m
$
conf
$
prescreen
[[
"ret_time_shift_tol"
]]
rvs
$
status
$
is_qa_stat
=
"In progress."
rv_presc_flag
(
T
)
})
observe
({
rtimer_extr
()
isolate
({
if
(
rv_extr_flag
())
{
rv_extr_flag
(
F
)
m
<-
rvs
$
m
promises
::
future_promise
(
run
(
m
=
m
,
phases
=
"extract"
))
%...>%
{
rvs
$
m
=
.
rvs
$
status
$
is_extracted_stat
=
"Yes."
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) Done extracting."
)
message
(
"(extract) Config written to "
,
fn_c_state
)
shinymsg
(
"Extraction has been completed."
)
}
rvs
$
status
$
is_extracted_stat
=
"Yes."
rv_extr_flag
(
F
)
}
})
})
## observeEvent(rv_extr_flag(),{
## shinymsg("Extraction has started. This may take a while.")
## rvs$m <- run(m=rvs$m,phases="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."
## },ignoreInit=T)
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"
]]
observe
({
rtimer_presc
()
isolate
({
if
(
rv_presc_flag
())
{
validate
(
need
(
NROW
(
rvs
$
m
$
extr
$
ms1
)
>
0L
,
"Must extract data first."
))
shinymsg
(
"Prescreening started. Please wait."
)
rv_presc_flag
(
F
)
m
<-
rvs
$
m
promises
::
future_promise
(
run
(
m
=
m
,
phases
=
"prescreen"
))
%...>%
{
rvs
$
m
=
.
rvs
$
status
$
is_qa_stat
=
"Yes."
rvs
$
status
$
is_qa_stat
=
"In progress."
rv_presc_flag
(
rv_presc_flag
()
+1L
)
}
}
})
})
observeEvent
(
rv_presc_flag
(),{
shinymsg
(
"Prescreening started. Please wait."
)
rvs
$
m
<-
run
(
m
=
rvs
$
m
,
phases
=
"prescreen"
)
message
(
"(prescreen) Done prescreening."
)
rvs
$
status
$
is_qa_stat
=
"Yes."
...
...
This diff is collapsed.
Click to expand it.
inst/rmd/app.Rmd
+
8
−
10
View file @
a2eed0ac
...
...
@@ -359,15 +359,17 @@ _Extraction_ tab, while the quality check parameters are located under
the _Prescreening_ tab.
After Shinyscreen is configured, the compound and setid lists loaded,
it is possible to proceed with extracting the data. After the
configuration changes have been be commited using the `Commit config`
button, the extraction process can start after pressing
`Extract`. Depending on the size of the commpound list and the
properties of the data files this may take a while.
it is possible to proceed with extracting the data. The extraction
process can start after pressing `Extract`. Depending on the size of
the commpound list and the properties of the data files this may take
a while.
Once the data is extracted, quality checking can be carried out using
the `Prescreen` button.
The parameters affecting current extraction are displayed in the
*Overview* section.
</details>
...
...
@@ -586,10 +588,6 @@ DT::DTOutput("summ_subset")
#### Control
<div style="display: flex;flex-flow: row wrap;">
```{r, echo=F}
actionButton(inputId= "commit_changes",
label = "Commit configuration")
```
```{r, echo=FALSE}
actionButton(inputId = "extract_b",
label = "Extract")
...
...
@@ -601,7 +599,7 @@ actionButton(inputId = "presc_b",
```
</div>
####
Status
####
Overview
- 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)`
...
...
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