getFeatureSpace: Get informative principal components

Description Usage Arguments Value Author(s) Examples

View source: R/getFeatureSpace.R

Description

Given a prediction variable, finds a feature set of class-informative principal components. A Wilcoxon rank sum test is used to determine a difference between the score distributions of cell classes from the prediction variable.

Usage

1
2
getFeatureSpace(object, pVar, varLim = 0.01, correction = "fdr",
  sig = 0.05)

Arguments

object

An scPred or seurat object

pVar

Prediction variable corresponding to a column in metadata slot

varLim

Threshold to filter principal components based on variance explained.

correction

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

sig

Significance level to determine principal components explaining class identity

Value

An scPred object with two additional filled slots:

Author(s)

Jos<c3><a9> Alquicira Hern<c3><a1>ndez

Examples

1
2
3
4
5
6
7
8
9
# Assign cell information to scPred object
# Cell information must be a data.frame with rownames as cell ids matching the eigendecomposed 
gene expression matrix rownames.

metadata(object) <- cellInfo

# Get feature space for column "cellType" in metadata slot

object <- getFeatureSpace(object = object, pVar = "cellType")

IMB-Computational-Genomics-Lab/scPred documentation built on Jan. 11, 2020, 7:37 a.m.