From 9a231d5907ea93ead52f9706bdcce60724f4bd9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Pag=C3=A8s?= Date: Tue, 16 Jul 2024 16:43:24 -0700 Subject: [PATCH] Resync the package with the most recent developments in packages SparseArray and DelayedArray --- DESCRIPTION | 10 ++++++---- NAMESPACE | 8 +++++--- R/getVarianceExplained.R | 5 +++-- R/nexprs.R | 2 +- R/plotGroupedHeatmap.R | 2 +- R/plotHeatmap.R | 2 +- man/plotHeatmap.Rd | 2 +- 7 files changed, 18 insertions(+), 13 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 123513b..33198f5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -12,8 +12,8 @@ Authors@R: c( person("Leo", "Lahti", role=c("ctb"), email="leo.lahti@utu.fi", comment = c(ORCID = "0000-0001-5537-637X")), person("Tuomas", "Borman", role = c("ctb"), comment = c(ORCID = "0000-0002-8563-8884")) ) -Version: 1.33.2 -Date: 2024-06-21 +Version: 1.33.3 +Date: 2024-07-16 License: GPL-3 Title: Single-Cell Analysis Toolkit for Gene Expression Data in R Description: A collection of tools for doing various analyses of @@ -31,8 +31,9 @@ Imports: BiocGenerics, S4Vectors, SummarizedExperiment, - DelayedArray, MatrixGenerics, + SparseArray, + DelayedArray, beachmat, BiocNeighbors, BiocSingular, @@ -49,6 +50,7 @@ Imports: ggrastr Suggests: BiocStyle, + DelayedMatrixStats, snifter, densvis, cowplot, @@ -66,6 +68,6 @@ biocViews: ImmunoOncology, SingleCell, RNASeq, QualityControl, Preprocessing, No GeneExpression, Sequencing, Software, DataImport, DataRepresentation, Infrastructure, Coverage Encoding: UTF-8 -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 URL: http://bioconductor.org/packages/scater/ BugReports: https://support.bioconductor.org/ diff --git a/NAMESPACE b/NAMESPACE index 7d0186c..ff7590b 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -104,6 +104,8 @@ import(scuttle) importClassesFrom(BiocParallel,MulticoreParam) importClassesFrom(S4Vectors,DataFrame) importClassesFrom(SingleCellExperiment,SingleCellExperiment) +importClassesFrom(SparseArray,COO_SparseMatrix) +importClassesFrom(SparseArray,SVT_SparseMatrix) importClassesFrom(SummarizedExperiment,SummarizedExperiment) importFrom(BiocGenerics,"counts<-") importFrom(BiocGenerics,colnames) @@ -123,15 +125,15 @@ importFrom(BiocSingular,runPCA) importFrom(DelayedArray,DelayedArray) importFrom(DelayedArray,getAutoBPPARAM) importFrom(DelayedArray,setAutoBPPARAM) -importFrom(Matrix,colSums) -importFrom(Matrix,rowMeans) -importFrom(Matrix,rowSums) importFrom(Matrix,t) importFrom(MatrixGenerics,colQuantiles) +importFrom(MatrixGenerics,colSums) importFrom(MatrixGenerics,colSums2) importFrom(MatrixGenerics,colVars) +importFrom(MatrixGenerics,rowMeans) importFrom(MatrixGenerics,rowMeans2) importFrom(MatrixGenerics,rowMedians) +importFrom(MatrixGenerics,rowSums) importFrom(MatrixGenerics,rowSums2) importFrom(MatrixGenerics,rowVars) importFrom(S4Vectors,DataFrame) diff --git a/R/getVarianceExplained.R b/R/getVarianceExplained.R index d443888..025c824 100644 --- a/R/getVarianceExplained.R +++ b/R/getVarianceExplained.R @@ -55,10 +55,11 @@ NULL #' @importFrom MatrixGenerics rowVars #' @importFrom stats model.matrix +#' @importClassesFrom SparseArray COO_SparseMatrix SVT_SparseMatrix #' @importFrom scuttle fitLinearModel .get_variance_explained_internal <- function(block, variables) { - if (is(block, "SparseArraySeed")) { - block <- as(block, "dgCMatrix") + if (is(block, "COO_SparseMatrix")) { + block <- as(block, "SVT_SparseMatrix") } rsquared_mat <- matrix(NA_real_, nrow(block), ncol(variables), dimnames=list(NULL, colnames(variables))) diff --git a/R/nexprs.R b/R/nexprs.R index ca3b7fd..c66cae6 100644 --- a/R/nexprs.R +++ b/R/nexprs.R @@ -36,7 +36,7 @@ NULL #' @importFrom BiocParallel SerialParam -#' @importFrom Matrix rowSums colSums +#' @importFrom MatrixGenerics rowSums colSums #' @importFrom DelayedArray getAutoBPPARAM setAutoBPPARAM .nexprs <- function(x, byrow=FALSE, detection_limit=0, subset_row=NULL, subset_col=NULL, BPPARAM=SerialParam()) { if (!is.null(subset_row)) { diff --git a/R/plotGroupedHeatmap.R b/R/plotGroupedHeatmap.R index b58b7b9..32c8548 100644 --- a/R/plotGroupedHeatmap.R +++ b/R/plotGroupedHeatmap.R @@ -50,7 +50,7 @@ #' #' @export #' @importFrom SummarizedExperiment assay -#' @importFrom Matrix rowMeans +#' @importFrom MatrixGenerics rowMeans #' @importFrom scuttle summarizeAssayByGroup plotGroupedHeatmap <- function(object, features, group, block = NULL, columns=NULL, exprs_values = "logcounts", center = FALSE, scale = FALSE, diff --git a/R/plotHeatmap.R b/R/plotHeatmap.R index 1bf0f23..550f7fa 100644 --- a/R/plotHeatmap.R +++ b/R/plotHeatmap.R @@ -47,7 +47,7 @@ #' \code{column_annotation_colors}, \code{color_rows_by}, #' \code{row_annotation_colors}. #' @param exprs_values Alias to \code{assay.type}. -#' @param by_exprs_values Alias to {by.assay.type}. +#' @param by_exprs_values Alias to \code{by.assay.type}. #' #' @details #' Setting \code{center=TRUE} is useful for examining log-fold changes of each cell's expression profile from the average across all cells. diff --git a/man/plotHeatmap.Rd b/man/plotHeatmap.Rd index 609d3f9..0646cc1 100644 --- a/man/plotHeatmap.Rd +++ b/man/plotHeatmap.Rd @@ -84,7 +84,7 @@ Each entry of the list can be any acceptable input to the \code{by} argument in A character vector can also be supplied and will be treated as a list of strings. This argument is automatically appended to \code{colour_columns_by}.} -\item{by_exprs_values}{Alias to {by.assay.type}.} +\item{by_exprs_values}{Alias to \code{by.assay.type}.} \item{show_colnames, cluster_cols, ...}{Additional arguments to pass to \code{\link[pheatmap]{pheatmap}}.}