matPCs {scReClassify}R Documentation

matPCs function

Description

Performs PCA on a given matrix and returns a dimension reduced matrix which captures at least 80% (default) of overall variability.

Usage

matPCs(data, assay = NULL, percentVar = 0.8)

Arguments

data

An expression matrix or a SingleCellExperiment object.

assay

An assay to select if data is a SingleCellExperiment object

percentVar

The percentage of variance threshold. This is used to select number of Principal Components.

Details

This function performs PCA to reduce the dimension of the gene expression matrix limited from 10 to 20 PCs.

Value

Dimensionally reduced matrix.

Author(s)

Pengyi Yang, Taiyun Kim

Examples

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)


[Package scReClassify version 1.0.0 Index]