diff --git a/DESCRIPTION b/DESCRIPTION index d003835..211d320 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -7,6 +7,14 @@ Authors@R: person( given = "Constantin", family = "Zackl", role = c("aut", "cre"), email = "zacklcon@uni-mainz.de", comment = c(ORCID = "0000-0003-1991-6943") + ), + person( + given = "Alexander", family = "Dietrich", role = c("aut"), + email = "alex.dietrich@tum.de", comment = c(ORCID = "0000-0002-8661-0453") + ), + person( + given = "Lorenzo", family = "Merotto", role = c("aut"), + email = "lorenzo.merotto@uibk.ac.at", comment = c(ORCID = "0009-0006-0637-8436") ), person( given = "Federico", family = "Marini", role = c("aut"), diff --git a/NAMESPACE b/NAMESPACE index 11bd072..ed72727 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -18,7 +18,8 @@ export(returnSelectedDeconvolutions) export(selectGenesByScore) import(omnideconv) import(shiny, except = c(renderDataTable, dataTableOutput)) -import(shinyBS) +importFrom(BioQC,entropySpecificity) +importFrom(BioQC,gini) importFrom(ComplexHeatmap,Heatmap) importFrom(ComplexHeatmap,UpSet) importFrom(ComplexHeatmap,comb_size) @@ -43,6 +44,7 @@ importFrom(ggplot2,aes_string) importFrom(ggplot2,coord_cartesian) importFrom(ggplot2,coord_flip) importFrom(ggplot2,element_blank) +importFrom(ggplot2,element_rect) importFrom(ggplot2,element_text) importFrom(ggplot2,facet_wrap) importFrom(ggplot2,geom_abline) @@ -55,6 +57,7 @@ importFrom(ggplot2,geom_rect) importFrom(ggplot2,geom_text) importFrom(ggplot2,geom_tile) importFrom(ggplot2,ggplot) +importFrom(ggplot2,ggsave) importFrom(ggplot2,guide_colorbar) importFrom(ggplot2,guides) importFrom(ggplot2,labs) @@ -66,6 +69,8 @@ importFrom(ggplot2,theme_minimal) importFrom(ggplot2,ylim) importFrom(ggpubr,stat_cor) importFrom(grDevices,colorRampPalette) +importFrom(grDevices,dev.off) +importFrom(grDevices,pdf) importFrom(grid,gpar) importFrom(grid,unit) importFrom(plotly,config) @@ -79,6 +84,8 @@ importFrom(rintrojs,introjs) importFrom(rintrojs,introjsUI) importFrom(rintrojs,readCallback) importFrom(rlang,.data) +importFrom(shiny,addResourcePath) +importFrom(shinyBS,bsPopover) importFrom(shinycssloaders,withSpinner) importFrom(shinydashboard,box) importFrom(shinydashboard,dashboardBody) @@ -97,7 +104,10 @@ importFrom(shinydashboard,valueBoxOutput) importFrom(shinyjs,hide) importFrom(shinyjs,show) importFrom(shinyjs,useShinyjs) +importFrom(stats,complete.cases) importFrom(stats,cor.test) +importFrom(stats,dist) +importFrom(stats,hclust) importFrom(stats,sd) importFrom(stringr,str_split) importFrom(stringr,str_to_title) @@ -106,3 +116,7 @@ importFrom(utils,read.delim) importFrom(utils,write.csv) importFrom(utils,write.table) importFrom(waiter,Waitress) +importFrom(waiter,waiter_hide) +importFrom(waiter,waiter_show) +importFrom(waiter,waiter_show_on_load) +importFrom(waiter,waiter_update) diff --git a/R/DeconvExplorer-pkg.R b/R/DeconvExplorer-pkg.R index f7d65bf..2e50d0d 100644 --- a/R/DeconvExplorer-pkg.R +++ b/R/DeconvExplorer-pkg.R @@ -8,31 +8,37 @@ #' dashboardSidebar dropdownMenu menuItem notificationItem sidebarMenu valueBox valueBoxOutput renderValueBox #' tabItem tabItems #' @importFrom plotly ggplotly plotlyOutput renderPlotly plot_ly layout config -#' @importFrom ggplot2 aes aes_ aes_string coord_cartesian coord_flip element_text -#' facet_wrap geom_abline geom_boxplot geom_col geom_jitter geom_point -#' geom_tile ggplot guide_colorbar guides labs scale_fill_gradient theme geom_text element_blank -#' geom_hline scale_colour_brewer scale_fill_brewer ylim theme_minimal geom_rect +#' @importFrom ggplot2 aes aes_ aes_string coord_cartesian coord_flip +#' element_rect element_text facet_wrap geom_abline geom_boxplot geom_col +#' geom_jitter geom_point geom_tile ggplot guide_colorbar guides labs +#' scale_fill_gradient theme geom_text element_blank geom_hline ggsave +#' scale_colour_brewer scale_fill_brewer ylim theme_minimal geom_rect #' @importFrom shinycssloaders withSpinner -#' @importFrom waiter Waitress +#' @importFrom waiter Waitress waiter_hide waiter_show waiter_show_on_load +#' waiter_update #' @importFrom rlang .data #' @importFrom rintrojs introBox introjs introjsUI readCallback -#' @importFrom DT datatable dataTableOutput renderDataTable formatRound formatPercentage +#' @importFrom DT datatable dataTableOutput renderDataTable formatRound +#' formatPercentage #' @importFrom shinyjs useShinyjs hide show #' @importFrom utils write.csv write.table read.delim #' @importFrom stringr str_to_title str_split #' @importFrom tidyr pivot_longer -#' @importFrom stats sd cor.test -#' @importFrom ComplexHeatmap Heatmap make_comb_mat UpSet comb_size upset_top_annotation extract_comb +#' @importFrom stats sd cor.test complete.cases dist hclust +#' @importFrom ComplexHeatmap Heatmap make_comb_mat UpSet comb_size +#' upset_top_annotation extract_comb #' @importFrom grid gpar unit -#' @importFrom InteractiveComplexHeatmap InteractiveComplexHeatmapOutput makeInteractiveComplexHeatmap +#' @importFrom InteractiveComplexHeatmap InteractiveComplexHeatmapOutput +#' makeInteractiveComplexHeatmap #' @importFrom RColorBrewer brewer.pal #' @importFrom circlize colorRamp2 #' @importFrom ggforce facet_grid_paginate -#' @importFrom grDevices colorRampPalette +#' @importFrom grDevices colorRampPalette dev.off pdf #' @importFrom ggpubr stat_cor #' @importFrom corrplot corrplot #' @importFrom SummarizedExperiment assays -#' @import shinyBS +#' @importFrom BioQC entropySpecificity gini +#' @importFrom shinyBS bsPopover #' #' @name DeconvExplorer-pkg #' @docType package diff --git a/R/DeconvExplorer.R b/R/DeconvExplorer.R index e077b79..47f01a9 100644 --- a/R/DeconvExplorer.R +++ b/R/DeconvExplorer.R @@ -739,7 +739,7 @@ DeconvExplorer <- function(deconvexp_bulk = NULL, shinyBS::bsPopover( id = "refUnspecificQ", title = "", - content = "The overall expression is binned into “high”, “medium” and “low expression” for each gene. The number of cell types the gene has to be in the “high” bin can be modified and defaults to 1. Each gene expressed “high” in more cell types than this parameter is removed. " + content = "The overall expression is binned into 'high', 'medium' and 'low expression' for each gene. The number of cell types the gene has to be in the 'high' bin can be modified and defaults to 1. Each gene expressed 'high' in more cell types than this parameter is removed. " ) refinementBestNBox <- shinydashboard::box( diff --git a/R/Global.R b/R/Global.R index 8d0fde6..1cc321a 100644 --- a/R/Global.R +++ b/R/Global.R @@ -29,7 +29,8 @@ returnSelectedDeconvolutions <- function(deconv_select, deconv_list) { #' Modal window to print error messages or other warnings #' -#' @param error_message +#' @param error_message Character string, with the content of the error to +#' display #' #' @return NULL #' @export diff --git a/R/zzz.R b/R/zzz.R new file mode 100644 index 0000000..2153ae0 --- /dev/null +++ b/R/zzz.R @@ -0,0 +1,5 @@ +#' @importFrom shiny addResourcePath + +.onLoad <- function(libname, pkgname) { + shiny::addResourcePath("sbs", system.file("www", package = "shinyBS")) +} diff --git a/man/DeconvExplorer-pkg.Rd b/man/DeconvExplorer-pkg.Rd index d0e4a81..47586f5 100644 --- a/man/DeconvExplorer-pkg.Rd +++ b/man/DeconvExplorer-pkg.Rd @@ -21,6 +21,8 @@ Useful links: Authors: \itemize{ + \item Alexander Dietrich \email{your@email.here} (\href{https://orcid.org/0000-0002-8661-0453}{ORCID}) + \item Lorenzo Merotto \email{lorenzo.merotto@uibk.ac.at} (\href{https://orcid.org/0009-0006-0637-8436}{ORCID}) \item Federico Marini \email{marinif@uni-mainz.de} (\href{https://orcid.org/0000-0003-3252-7758}{ORCID}) } diff --git a/man/errorModal.Rd b/man/errorModal.Rd index 2b3c3de..aee2db2 100644 --- a/man/errorModal.Rd +++ b/man/errorModal.Rd @@ -7,7 +7,8 @@ errorModal(error_message = NULL) } \arguments{ -\item{error_message}{} +\item{error_message}{Character string, with the content of the error to +display} } \description{ Modal window to print error messages or other warnings diff --git a/tests/testthat/test-signatures.R b/tests/testthat/test-signatures.R index 2d540cd..a08428e 100644 --- a/tests/testthat/test-signatures.R +++ b/tests/testthat/test-signatures.R @@ -52,8 +52,4 @@ test_that("Signature refinement operations are correct", { max_count = 3, labels = c("A", "B", "C", "D") )) - - - entropy_calc <- scoreEntropy(signature_list$bisque[1, ]) - expect_true(is.numeric(entropy_calc)) })