Computes cell-level estimates of cytokine activity for a normalized scRNA-seq
count matrix using the SCAPE method. SCAPE activity estimates are computed by scoring weighted genes
sets from the CytoSig or Reactome databases using the VAM::vamForCollection()
function. Individual gene sets for subsequent scoring can be reconstructed using
the genesetCytoSig and the genesetReactome functions
for the CytoSig and the Reactome database, respectively.
Arguments
- counts.matrix
A \(m x n\) normalized counts matrix with \(m\) samples and \(n\) genes.
- database
Database used for gene set construction and set scoring. * "cytosig" performs scoring for up to 41 cytokines using the CytoSig database. * "reactome" performs scoring for up to 30 cytokines using the Reactome database.
- cytokine
Vector of cytokine names to score for activity. The default value of "all" will score all 41 cytokines supported by CytoSig or 31 supported by Reactome. Please see function
supportedCytokinesto view all the CytoSig or the Reactome specific scored cytokines.
Examples
# \donttest{
library(Seurat)
#> Attaching SeuratObject
#> Seurat v4 was just loaded with SeuratObject v5; disabling v5 assays and
#> validation routines, and ensuring assays work in strict v3/v4
#> compatibility mode
library(SeuratObject)
# Note: NormalizeData usage depends on Seurat version
pbmc_small <- NormalizeData(pbmc_small)
#> Error: The `slot` argument of `SetAssayData()` was deprecated in SeuratObject
#> 5.0.0 and is now defunct.
#> i Please use the `layer` argument instead.
counts.matrix <- as.data.frame(t(as.matrix(GetAssayData(pbmc_small, layer = "data"))))
CytoSig.score.output <- scape(counts.matrix = counts.matrix,
database = "cytosig")
#> Computing VAM distances for 41 gene sets, 80 cells and 230 genes.
#> Min set size: 7, median size: 24
#> Computing VAM distances for 41 gene sets, 80 cells and 230 genes.
#> Min set size: 4, median size: 17
head(CytoSig.score.output)[,1:3]
#> ActivinA BDNF BMP2
#> ATGCCAGAACGACT 0.6231749 0.3273886 0.09077031
#> CATGGCCTGTGCAT 0.5251265 0.7156382 0.10266867
#> GAACCTGATGAACC 0.3226473 0.6604658 0.08830525
#> TGACTGGATTCTCA 0.6317740 0.6281195 0.03524962
#> AGTCAGACTGCACA 0.3634251 0.8475163 0.12676327
#> TCTGATACACGTGT 0.4554610 0.3332322 0.04168926
CytoSig.score.output.specific <- scape(counts.matrix = counts.matrix,
database = "cytosig", cytokine = c("IL4", "IL13"))
#> Computing VAM distances for 2 gene sets, 80 cells and 230 genes.
#> Min set size: 12, median size: 18
#> Computing VAM distances for 2 gene sets, 80 cells and 230 genes.
#> Min set size: 29, median size: 31
head(CytoSig.score.output.specific)
#> IL4 IL13
#> ATGCCAGAACGACT 0.8671020 0.4634521
#> CATGGCCTGTGCAT 0.5584015 0.6429553
#> GAACCTGATGAACC 0.8698480 0.3429301
#> TGACTGGATTCTCA 0.9145342 0.5689176
#> AGTCAGACTGCACA 0.7871834 0.6063585
#> TCTGATACACGTGT 0.6457457 0.6387887
# }