Wrapper for the Variance-adjusted Mahalanobis (VAM), which is a fast and accurate method for cell-specific gene set scoring of single cell data. This algorithm computes distance statistics and one-sided p-values for all cells in the specified single cell gene expression matrix. Gene sets should already be imported and stored in the meta data using functions such as importGeneSetsFromList or importGeneSetsFromMSigDB
runVAM( inSCE, geneSetCollectionName, useAssay, resultNamePrefix = NULL, center = TRUE, gamma = FALSE )
inSCE | Input SingleCellExperiment object. |
---|---|
geneSetCollectionName | Character. The name of the gene set collection to use. |
useAssay | Character. The name of the assay to use. This assay should contain log normalized counts. |
resultNamePrefix | Character. Prefix to the name the VAM results which will be stored in the reducedDim slot of |
center | Boolean. If |
gamma | Boolean. If |
A SingleCellExperiment object with VAM metrics stored in reducedDim
as VAM_NameOfTheGeneset_Distance
and VAM_NameOfTheGeneset_CDF
.
importGeneSetsFromList, importGeneSetsFromMSigDB, importGeneSetsFromGMT, importGeneSetsFromCollection for importing gene sets.
Nida Pervaiz
data(scExample, package = "singleCellTK") sce <- subsetSCECols(sce, colData = "type != 'EmptyDroplet'") sce <- scaterlogNormCounts(sce, assayName = "logcounts") gs1 <- rownames(sce)[seq(10)] gs2 <- rownames(sce)[seq(11,20)] gs <- list("geneset1" = gs1, "geneset2" = gs2) sce <- importGeneSetsFromList(inSCE = sce,geneSetList = gs, by = "rownames") sce <- runVAM(inSCE = sce, geneSetCollectionName = "GeneSetCollection", useAssay = "logcounts")#>#>