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.
|
# Compute the results according to the preset.
|
||||||
analysis <- reactive({
|
analysis <- reactive({
|
||||||
preset <- preset()
|
withProgress(
|
||||||
|
|
||||||
# Perform the analysis cached based on the preset's hash.
|
|
||||||
analysis <- withProgress(
|
|
||||||
message = "Analyzing genes",
|
message = "Analyzing genes",
|
||||||
value = 0.0,
|
value = 0.0,
|
||||||
{ # nolint
|
{ # nolint
|
||||||
geposan::analyze(preset, function(progress) {
|
geposan::analyze(
|
||||||
|
preset(),
|
||||||
|
progress = function(progress) {
|
||||||
setProgress(progress)
|
setProgress(progress)
|
||||||
})
|
},
|
||||||
|
include_results = FALSE
|
||||||
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
}) |> bindCache(preset())
|
||||||
analysis
|
|
||||||
})
|
|
||||||
|
|
||||||
# Rank the results.
|
# Rank the results.
|
||||||
ranking <- methods_server("methods", analysis, comparison_gene_ids)
|
ranking <- methods_server("methods", analysis, comparison_gene_ids)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue