Description Usage Arguments Value Author(s) Examples
View source: R/getFeatureSpace.R
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.
1 2 | getFeatureSpace(object, pVar, varLim = 0.01, correction = "fdr",
sig = 0.05)
|
object |
An |
pVar |
Prediction variable corresponding to a column in |
varLim |
Threshold to filter principal components based on variance explained. |
correction |
Multiple testing correction method. Default: false discovery rate. See |
sig |
Significance level to determine principal components explaining class identity |
An scPred
object with two additional filled slots:
features
: A data frame with significant principal components the following information:
PC: Principal component
pValue: p-value obtained from Mann-Whitney test
pValueAdj: Adjusted p-value according to correction
parameter
expVar: Explained variance by the principal component
cumExpVar: All principal components are ranked accoriding to their frequency of ocurrence and their variance explained. This column contains the cumulative variance explained across the ranked principal components
pVar
: Column name from metadata to use as the variable to predict using
the informative principal components. Informative principal components are selected based on this variable.
Jos<c3><a9> Alquicira Hern<c3><a1>ndez
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.