Skip to content
Snippets Groups Projects
Unverified Commit 9cecee9f authored by Todor Kondic's avatar Todor Kondic
Browse files

shiny-ui-config: Implement reactive state build-up

From the beginning, the intention was to follow the simple signal
passing paradigm, where a single state object is being passed from
function to function. With a GUI this is complicated by continuously
changing state and in a reactive paradigm of Shiny, additional
complication arises from inability to distinguish between different
inputs for the same destination observer, or reactive function.

But, now that the problem has been solved by adding new reactive state
variables for the project path and the data file control, it was
possible to emulate the streamlined signal processing flow by adding a
few new reactive functions.

Here they are.

* R/shiny-ui-config.R(m_conf,m_input,m): New reactive functions. Each
  builds its part of the m object. Each calls the preceeding one.
parent d677fe60
No related branches found
No related tags found
No related merge requests found
......@@ -148,7 +148,34 @@ react_conf_f <- function(input,output,session,rv,rf) {
})
rf$get_all_sets <- react_e(rv$m$input$tab$setid,unique(rv$m$input$tab$setid$set))
rf$m_conf <- react_f({
m <- list()
m$conf$project <- rv$project_path
m$conf$compounds$known <- input$known
m$conf$compounds$unknown <- input$unknown
m$conf$compounds$sets <- input$sets
m$conf$data <- input$datafiles
verify_compounds(m$conf)
m
})
rf$m_input_cmpds <- react_f({
m <- rf$m_conf()
load_compound_input(m)
})
rf$m_input <- react_f({
m <- rf$m_input_cmpds()
mzml <- rf$ctrl2mzml()
verify_data_df(mzml=mzml,all_sets=rf$get_all_sets())
m$input$tab$mzml <- mzml
m
})
rf$m <- react_f(rf$m_input())
rf
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment