bpFitCPCA {scPCA}R Documentation

Contrastive Principal Component Analysis in Parallel

Description

Given target and background dataframes or matrices, cPCA will perform contrastive principal component analysis (cPCA) of the target data for a given number of eigenvectors and a vector of real valued contrast parameters. This is identical to the implementation of cPCA method by Abid et al. Abid A, Zhang MJ, Bagaria VK, Zou J (2018). “Exploring patterns enriched in a dataset with contrastive principal component analysis.” Nature communications, 9(1), 2134.. Analogous to fitCPCA, but replaces all lapply calls by bplapply.

Usage

bpFitCPCA(target, center, scale, c_contrasts, contrasts, n_eigen, n_medoids)

Arguments

target

The target (experimental) data set, in a standard format such as a data.frame or matrix.

center

A logical indicating whether the target and background data sets should be centered to mean zero.

scale

A logical indicating whether the target and background data sets should be scaled to unit variance.

c_contrasts

A list of contrastive covariances.

contrasts

A numeric vector of the contrastive parameters used to compute the contrastive covariances.

n_eigen

A numeric indicating the number of eigenvectors to be computed.

n_medoids

A numeric indicating the number of medoids to consider.

Value

A list of lists containing the cPCA results for each contrastive parameter deemed to be a medoid.


[Package scPCA version 1.2.0 Index]