diff --git a/DESCRIPTION b/DESCRIPTION index a8cf861..ae2cd5c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -4,6 +4,7 @@ Version: 2.5.3 Authors@R: c( person(given = "Nick", family = "Borcherding", role = c("aut", "cre"), email = "ncborch@gmail.com"), person(given = "Jared", family = "Andrews", role = c("aut"), email = "jared.andrews07@gmail.com"), + person(given = "Tobias", family = "Hoch", role = c("ctb"), email = "tobias@hoch.earth"), person(given = "Alexei", family = "Martsinkovskiy", role = c("ctb"), email = "alexei.martsinkovskiy@gmail.com") ) Description: A bridging R package to facilitate gene set enrichment analysis (GSEA) in the context of single-cell RNA sequencing. Using raw count information, Seurat objects, or SingleCellExperiment format, users can perform and visualize ssGSEA, GSVA, AUCell, and UCell-based enrichment calculations across individual cells. Alternatively, escape supports use of rank-based GSEA, such as the use of differential gene expression via fgsea. diff --git a/R/utils.R b/R/utils.R index cb64637..793217c 100644 --- a/R/utils.R +++ b/R/utils.R @@ -57,7 +57,7 @@ df <- cbind(value = cnts[gene.set, ], meta) colnames(df)[1] <- gene.set } else { - df <- cbind(t(cnts[gene.set, , drop = FALSE]), meta) + df <- cbind(Matrix::t(cnts[gene.set, , drop = FALSE]), meta) } df } @@ -194,7 +194,7 @@ SeuratObject::CreateAssayObject } suppressWarnings( - sc[[name]] <- fn(data = as.matrix(t(enrichment))) + sc[[name]] <- fn(data = as.matrix(Matrix::t(enrichment))) ) } else { warning("SeuratObject package is required to add enrichment to Seurat object.") @@ -204,7 +204,7 @@ if (requireNamespace("SummarizedExperiment", quietly = TRUE) && requireNamespace("SingleCellExperiment", quietly = TRUE)) { alt <- SummarizedExperiment::SummarizedExperiment( - assays = list(data = t(enrichment)) + assays = list(data = Matrix::t(enrichment)) ) SingleCellExperiment::altExp(sc, name) <- alt } else { @@ -226,7 +226,7 @@ } else if (.is_sce(sc)) { if (requireNamespace("SummarizedExperiment", quietly = TRUE) && requireNamespace("SingleCellExperiment", quietly = TRUE)) { - t(SummarizedExperiment::assay(SingleCellExperiment::altExp(sc)[[name]])) + Matrix::t(SummarizedExperiment::assay(SingleCellExperiment::altExp(sc)[[name]])) } else { stop("SummarizedExperiment and SingleCellExperiment packages are required to pull enrichment from SCE object.") } @@ -342,7 +342,7 @@ }, "UCELL" = { .load_backend("UCell") - t(UCell::ScoreSignatures_UCell(matrix = expr, + Matrix::t(UCell::ScoreSignatures_UCell(matrix = expr, features = gene_sets, name = NULL, BPPARAM = BPPARAM,