Given a prediction variable, finds a feature set of class-informative principal components that explain variance differences between cell types.

getFeatureSpace(object, pvar, correction = "fdr", sig = 1, reduction = "pca")

Arguments

object

A seurat object

pvar

Column in meta.data slot containing the cell-type labels of each single cell

correction

Multiple testing correction method used. Default: false discovery rate. See p.adjust function

sig

Significance level to determine principal components explaining class identity

reduction

Name of reduction in Seurat objet to be used to determine the feature space. Default: "pca"

Value

An Seurat object along with a scPred object stored in the @misc slot containing a data.frame of significant features with the following columns:

  • PC: Principal component

  • pValue: p-value obtained from Wilcoxon rank sum test

  • pValueAdj: Adjusted p-value according to correction parameter

  • expVar: Explained variance for each principal component

  • cumExpVar: All principal components are ranked according to their significance and variance explained. This column contains the cumulative variance explained across the ranked principal components

Author

Jose Alquicira Hernandez

Examples

library(scPred) pbmc_small <- getFeatureSpace(pbmc_small, "RNA_snn_res.0.8")
#> Error in is(object, "Seurat"): object 'pbmc_small' not found