Computes cell-level estimates of cytokine activity for a scRNA-seq Seurat
count matrix using the scapeForSeurat method. SCAPE activity estimates are computed by scoring weighted gene
sets from the CytoSig or Reactome databases using the Variance-adjusted Mahalanobis (VAM) method
as implemented in the VAM::vamForSeurat() 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
- seurat.object
Seurat counts matrix.
- database
Database used for gene set construction and set scoring. * "cytosig" (default) 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.- normalize
Boolean indicator for whether normalization should be performed before performing gene set scoring.
Value
Seurat object consisting of cell-level cytokine activity scores returned as a separate assay (scape for scoring via the CytoSig database and VAMcdf for scoring via the Reactome database).
Examples
# \donttest{
library(SeuratObject)
CytoSig.score.output.all <- scapeForSeurat(seurat.object = pbmc_small,
database = "cytosig", cytokine = "all", normalize = TRUE)
#> Error: The `slot` argument of `SetAssayData()` was deprecated in SeuratObject
#> 5.0.0 and is now defunct.
#> i Please use the `layer` argument instead.
head(as.data.frame(GetAssayData(CytoSig.score.output.all, assay = "scape", layer = "data")))[1:6,1:3]
#> Error: object 'CytoSig.score.output.all' not found
CytoSig.score.output.specific <- scapeForSeurat(seurat.object = pbmc_small,
database = "cytosig", cytokine = c("IL4", "IL13"), normalize = TRUE)
#> Error: The `slot` argument of `SetAssayData()` was deprecated in SeuratObject
#> 5.0.0 and is now defunct.
#> i Please use the `layer` argument instead.
head(as.data.frame(GetAssayData(CytoSig.score.output.specific, assay = "scape", layer = "data")))[,1:3]
#> Error: object 'CytoSig.score.output.specific' not found
# }