matPCs {scReClassify} | R Documentation |
Performs PCA on a given matrix and returns a dimension reduced matrix which captures at least 80% (default) of overall variability.
matPCs(data, assay = NULL, percentVar = 0.8)
data |
An expression matrix or a SingleCellExperiment object. |
assay |
An assay to select if |
percentVar |
The percentage of variance threshold. This is used to select number of Principal Components. |
This function performs PCA to reduce the dimension of the gene expression matrix limited from 10 to 20 PCs.
Dimensionally reduced matrix.
Pengyi Yang, Taiyun Kim
data("gse87795_subset_sce") mat.expr <- gse87795_subset_sce mat.pc <- matPCs(mat.expr, assay = "logNorm") # to capture at least 70% of overall variability in the dataset, mat.dim.reduct.70 <- matPCs(mat.expr, assay = "logNorm", 0.7)