mirror of
https://github.com/johrpan/geposanui.git
synced 2025-10-26 11:17:24 +01:00
server: Cache analysis transiently
This commit is contained in:
parent
0ca4063429
commit
40164ebf84
1 changed files with 9 additions and 10 deletions
17
R/server.R
17
R/server.R
|
|
@ -22,21 +22,20 @@ server <- function(input, output, session) {
|
|||
|
||||
# Compute the results according to the preset.
|
||||
analysis <- reactive({
|
||||
preset <- preset()
|
||||
|
||||
# Perform the analysis cached based on the preset's hash.
|
||||
analysis <- withProgress(
|
||||
withProgress(
|
||||
message = "Analyzing genes",
|
||||
value = 0.0,
|
||||
{ # nolint
|
||||
geposan::analyze(preset, function(progress) {
|
||||
geposan::analyze(
|
||||
preset(),
|
||||
progress = function(progress) {
|
||||
setProgress(progress)
|
||||
})
|
||||
},
|
||||
include_results = FALSE
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
analysis
|
||||
})
|
||||
}) |> bindCache(preset())
|
||||
|
||||
# Rank the results.
|
||||
ranking <- methods_server("methods", analysis, comparison_gene_ids)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue