Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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.")
Expand All @@ -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 {
Expand All @@ -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.")
}
Expand Down Expand Up @@ -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,
Expand Down