Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add waiters show/hide to all R Code Download #351

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions program/shinyApp/R/enrichment_analysis/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ enrichment_analysis_geneset_server <- function(
paste0("ShinyOmics_Rcode2Reproduce_", Sys.Date(), ".zip")
},
content = function(file){
waiter$show()
# tmp <- getUserReactiveValues(input)
# par_tmp$Enrichment[names(tmp)] <<- tmp
envList <- list(
Expand Down Expand Up @@ -81,6 +82,7 @@ enrichment_analysis_geneset_server <- function(
files = dir(temp_directory),
root = temp_directory
)
waiter$hide()
},
contentType = "application/zip"
)
Expand Down
2 changes: 2 additions & 0 deletions program/shinyApp/R/heatmap/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ heatmap_server <- function(id, data, params, updates){
paste0("ShinyOmics_Rcode2Reproduce_", Sys.Date(), ".zip")
},
content = function(file){
waiter$show()
envList <- list(
res_tmp = res_tmp[[session$token]],
par_tmp = par_tmp[[session$token]]
Expand Down Expand Up @@ -311,6 +312,7 @@ heatmap_server <- function(id, data, params, updates){
files = dir(temp_directory),
root = temp_directory
)
waiter$hide()
},
contentType = "application/zip"
)
Expand Down
11 changes: 9 additions & 2 deletions program/shinyApp/R/pca/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -472,13 +472,12 @@ pca_Server <- function(id, data, params, row_select){
par_tmp[[session$token]]$PCA[names(tmp)] <<- tmp
par_tmp[[session$token]]$PCA$colorTheme <<- colorTheme



output$getR_Code_PCA <- downloadHandler(
filename = function(){
paste0("ShinyOmics_Rcode2Reproduce_", Sys.Date(), ".zip")
},
content = function(file){
waiter$show()
envList <- list(
res_tmp = res_tmp[[session$token]],
par_tmp = par_tmp[[session$token]]
Expand All @@ -494,7 +493,9 @@ pca_Server <- function(id, data, params, row_select){
files = dir(temp_directory),
root = temp_directory
)
waiter$hide()
},

contentType = "application/zip"
)

Expand Down Expand Up @@ -574,6 +575,7 @@ pca_Server <- function(id, data, params, row_select){
paste0("ShinyOmics_Rcode2Reproduce_", Sys.Date(), ".zip")
},
content = function(file){
waiter$show()

envList <- list(
res_tmp = res_tmp[[session$token]],
Expand All @@ -592,6 +594,7 @@ pca_Server <- function(id, data, params, row_select){
files = dir(temp_directory),
root = temp_directory
)
waiter$hide()
},
contentType = "application/zip"
)
Expand Down Expand Up @@ -651,6 +654,7 @@ pca_Server <- function(id, data, params, row_select){
paste0("ShinyOmics_Rcode2Reproduce_", Sys.Date(), ".zip")
},
content = function(file){
waiter$show()
envList <- list(

res_tmp = res_tmp[[session$token]],
Expand All @@ -669,6 +673,7 @@ pca_Server <- function(id, data, params, row_select){
files = dir(temp_directory),
root = temp_directory
)
waiter$hide()
},
contentType = "application/zip"
)
Expand Down Expand Up @@ -736,6 +741,7 @@ pca_Server <- function(id, data, params, row_select){
paste0("ShinyOmics_Rcode2Reproduce_", Sys.Date(), ".zip")
},
content = function(file){
waiter$show()
envList <- list(

res_tmp = res_tmp[[session$token]],
Expand All @@ -754,6 +760,7 @@ pca_Server <- function(id, data, params, row_select){
files = dir(temp_directory),
root = temp_directory
)
waiter$hide()
},
contentType = "application/zip"
)
Expand Down
2 changes: 2 additions & 0 deletions program/shinyApp/R/sample_correlation/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ sample_correlation_server <- function(id, data, params){
output$getR_SampleCorrelation <- downloadHandler(
filename = function(){ paste0("ShinyOmics_Rcode2Reproduce_", Sys.Date(), ".zip")},
content = function(file){
waiter$show()
envList <- list(

res_tmp = res_tmp[[session$token]],
Expand All @@ -183,6 +184,7 @@ sample_correlation_server <- function(id, data, params){
files = dir(temp_directory),
root = temp_directory
)
waiter$hdie()
},
contentType = "application/zip"
)
Expand Down
2 changes: 2 additions & 0 deletions program/shinyApp/R/significance_analysis/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ significance_analysis_server <- function(id, data, params){
paste0("ShinyOmics_Rcode2Reproduce_", Sys.Date(), ".zip")
},
content = function(file){
waiter$show()
tmp <- getUserReactiveValues(input)
par_tmp[[session$token]]$SigAna[names(tmp)] <<- tmp

Expand Down Expand Up @@ -579,6 +580,7 @@ significance_analysis_server <- function(id, data, params){
files = dir(temp_directory),
root = temp_directory
)
waiter$hide()
},
contentType = "application/zip"
)
Expand Down
8 changes: 8 additions & 0 deletions program/shinyApp/R/significance_analysis/util.R
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ create_new_tab_manual <- function(title, targetPanel, result, contrast, alpha, n
paste0("ShinyOmics_Rcode2Reproduce_", Sys.Date(), ".zip")
},
content = function(file){
waiter$show()
tmp <- getUserReactiveValues(input)
par_tmp[[session$token]]$SigAna[names(tmp)] <<- tmp
par_tmp[[session$token]]$SigAna$contrast <<- contrast
Expand Down Expand Up @@ -441,6 +442,7 @@ create_new_tab_manual <- function(title, targetPanel, result, contrast, alpha, n
files = dir(temp_directory),
root = temp_directory
)
waiter$hide()
},
contentType = "application/zip"
)
Expand All @@ -451,6 +453,7 @@ create_new_tab_manual <- function(title, targetPanel, result, contrast, alpha, n
paste0("ShinyOmics_Rcode2Reproduce_", Sys.Date(), ".zip")
},
content = function(file){
waiter$show()
tmp <- getUserReactiveValues(input)
par_tmp[[session$token]]$SigAna[names(tmp)] <<- tmp
par_tmp[[session$token]]$SigAna$contrast <<- contrast
Expand Down Expand Up @@ -494,6 +497,7 @@ create_new_tab_manual <- function(title, targetPanel, result, contrast, alpha, n
files = dir(temp_directory),
root = temp_directory
)
waiter$hide()
},
contentType = "application/zip"
)
Expand Down Expand Up @@ -930,6 +934,7 @@ create_new_tab_DESeq <- function(title, targetPanel, result, contrast, alpha, ns
paste0("ShinyOmics_Rcode2Reproduce_", Sys.Date(), ".zip")
},
content = function(file){
waiter$show()
tmp <- getUserReactiveValues(input)
par_tmp[[session$token]]$SigAna[names(tmp)] <<- tmp
par_tmp[[session$token]]$SigAna$contrast <<- contrast
Expand Down Expand Up @@ -973,6 +978,7 @@ create_new_tab_DESeq <- function(title, targetPanel, result, contrast, alpha, ns
files = dir(temp_directory),
root = temp_directory
)
waiter$hide()
},
contentType = "application/zip"
)
Expand All @@ -983,6 +989,7 @@ create_new_tab_DESeq <- function(title, targetPanel, result, contrast, alpha, ns
paste0("ShinyOmics_Rcode2Reproduce_", Sys.Date(), ".zip")
},
content = function(file){
waiter$show()
tmp <- getUserReactiveValues(input)
par_tmp[[session$token]]$SigAna[names(tmp)] <<- tmp
par_tmp[[session$token]]$SigAna$contrast <<- contrast
Expand Down Expand Up @@ -1026,6 +1033,7 @@ create_new_tab_DESeq <- function(title, targetPanel, result, contrast, alpha, ns
files = dir(temp_directory),
root = temp_directory
)
waiter$hide()
},
contentType = "application/zip"
)
Expand Down
2 changes: 2 additions & 0 deletions program/shinyApp/R/single_gene_visualisation/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ single_gene_visualisation_server <- function(id, data){
paste0("ShinyOmics_Rcode2Reproduce_", Sys.Date(), ".zip")
},
content = function(file){
waiter$show()
envList <- list(

res_tmp = res_tmp[[session$token]],
Expand All @@ -281,6 +282,7 @@ single_gene_visualisation_server <- function(id, data){
files = dir(temp_directory),
root = temp_directory
)
waiter$hide()
},
contentType = "application/zip"
)
Expand Down
2 changes: 2 additions & 0 deletions program/shinyApp/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,7 @@ server <- function(input,output,session){
paste0("ShinyOmics_Rcode2Reproduce_", Sys.Date(), ".zip")
},
content = function(file) {
waiter$show()
envList <- list(
res_tmp = res_tmp[[session$token]],
par_tmp = par_tmp[[session$token]]
Expand All @@ -1266,6 +1267,7 @@ server <- function(input,output,session){
files = dir(temp_directory),
root = temp_directory
)
waiter$hide()
},
contentType = "application/zip"
)
Expand Down
Loading