View source: R/ScoreSignature.R
ScoreSignatures | R Documentation |
This function scores multiple signatures at the single cell level on a Seurat object (sum of the expression for each cell and signature). By default, the score is computed as the average expression of the features as normalized in the "data" layer (i.e. log-normalized typically). Can be overrun by setting the layer.use parameter. Any feature can be set as a negative marker in the scoring by prefixing it with a minus sign, e.g. "-EPCAM". If imputed data is available (assay "imputed"), the imputed data will be used. Otherwise, data from the RNA assay will be used. This can be overrun by setting the assay paramter.
ScoreSignatures(object, signature.list, assay.use = NA, layer.use = "data")
object |
Seurat object. |
signature.list |
The named list of signatures. Each element of the list is a signature (character vector), the names of the elements in the list will be used as signature names. |
assay.use |
The assay within the Seurat object to use for signature scoring. If NA (default), it will use the "imputed" assay if it is present, or the "RNA" assay otherwise. |
layer.use |
The layer to use within the assay to get data for signature scoring. By default, using the "data" assay. |
Seurat object with additional metadata layers containing signature scores.
signature.list <- list(EpithelialSignature=c("EPCAM","CDH1","ITGA6"), FibroSignature=c("VIM","COL1A1","ITGA1","-EPCAM"))
MySeuratObject <- Impute(MySeuratObject,signature.list)
MySeuratObject <- ScoreSignatures(MySeuratObject,signature.list)
head(MySeuratObject$EpithelialSignature)
head(MySeuratObject$FibroSignature)
FeaturePlot(MySeuratObject,c("EpithelialSignature","FibroSignature"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.