diff --git a/DESCRIPTION b/DESCRIPTION index 5b4d7de..fa16bc4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -18,6 +18,6 @@ Imports: pkgload Encoding: UTF-8 LazyData: true -RoxygenNote: 7.1.0 +RoxygenNote: 7.1.1 Suggests: testthat diff --git a/NAMESPACE b/NAMESPACE index 03ce723..d5e2863 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,6 +1,7 @@ # Generated by roxygen2: do not edit by hand export(run_app) +import(magrittr) import(shiny) importFrom(config,get) importFrom(golem,activate_js) diff --git a/R/mod_dot_plot.R b/R/mod_dot_plot.R index 72b8367..faef3c9 100644 --- a/R/mod_dot_plot.R +++ b/R/mod_dot_plot.R @@ -10,7 +10,7 @@ mod_dot_plot_ui <- function(id){ ns <- NS(id) tagList( - plotOutput(ns("dot_plot")) %>% withSpinner(color="#ffbd40", + plotOutput(ns("dot_plot")) %>% shinycssloaders::withSpinner(color="#ffbd40", type = 4, size = 0.8) ) @@ -26,11 +26,11 @@ mod_dot_plot_server <- function(input, output, session, dot_plot_para_ui_1, sele enrichment_object <- MODifieRDB::enrichment_object_from_db(selected$selected_object, con) - p <- clusterProfiler::dotplot(enrichment_object, + p <- try(clusterProfiler::dotplot(enrichment_object, x=dot_plot_para_ui_1$xaxis, showCategory = dot_plot_para_ui_1$showcategory, color = dot_plot_para_ui_1$color, - title = dot_plot_para_ui_1$plot_title) + title = dot_plot_para_ui_1$plot_title)) return(p) }) diff --git a/R/mod_enrichment_map.R b/R/mod_enrichment_map.R index 3821122..c185f60 100644 --- a/R/mod_enrichment_map.R +++ b/R/mod_enrichment_map.R @@ -10,7 +10,7 @@ mod_enrichment_map_ui <- function(id){ ns <- NS(id) tagList( - plotOutput(ns("enrichment_map")) %>% withSpinner(color= "#ffbd40", + plotOutput(ns("enrichment_map")) %>% shinycssloaders::withSpinner(color= "#ffbd40", type = 4, size = 0.8) ) @@ -27,11 +27,11 @@ mod_enrichment_map_server <- function(input, output, session, enrichment_map_par enrichment_object <- MODifieRDB::enrichment_object_from_db(selected$selected_object, con) - p <- enrichplot::emapplot(x = enrichment_object, + p <- try(enrichplot::emapplot(x = enrichment_object, showCategory = enrichment_map_para_ui_1$showcategory, color = enrichment_map_para_ui_1$color, layout = enrichment_map_para_ui_1$layout - ) + ggplot2::ggtitle(enrichment_map_para_ui_1$title) + ) + ggplot2::ggtitle(enrichment_map_para_ui_1$title)) return(p) }) diff --git a/R/mod_enrichment_results.R b/R/mod_enrichment_results.R index 1154f24..71d05bc 100644 --- a/R/mod_enrichment_results.R +++ b/R/mod_enrichment_results.R @@ -10,7 +10,7 @@ mod_enrichment_results_ui <- function(id){ ns <- NS(id) tagList( - DT::dataTableOutput(ns("enrichment_results")) %>% withSpinner(color="#ffbd40", + DT::dataTableOutput(ns("enrichment_results")) %>% shinycssloaders::withSpinner(color="#ffbd40", type = 4, size = 0.8), @@ -27,7 +27,7 @@ mod_enrichment_results_server <- function(input, output, session, selected, con) MODifieRDB::enrichment_object_from_db(selected$selected_object,con)@result[c("Description", "GeneRatio", "BgRatio", "pvalue", "p.adjust", "qvalue", "Count")] }) - output$enrichment_results <- DT::renderDataTable({object()}, + output$enrichment_results <- try(DT::renderDataTable({object()}, rownames = FALSE, filter = "top", class = 'compact cell-border hover', @@ -42,7 +42,7 @@ mod_enrichment_results_server <- function(input, output, session, selected, con) autoWidth = FALSE, ordering = TRUE, dom = "lfrtipB", - buttons = c('copy', 'csv', 'excel'))) + buttons = c('copy', 'csv', 'excel')))) } ## To be copied in the UI diff --git a/R/mod_visual.R b/R/mod_visual.R index 3f84370..3c528b0 100644 --- a/R/mod_visual.R +++ b/R/mod_visual.R @@ -7,6 +7,8 @@ #' @noRd #' #' @importFrom shiny NS tagList +#' @import magrittr +#' mod_visual_ui <- function(id){ ns <- NS(id) tagList(