Runs a Principal Component Analysis on an omics matrix, using the
pcaMethods::pca()
function.
Arguments
- mat
Matrix of omics measurement, with features as rows and samples as columns.
- n_pcs
numeric, number of Principal Components to compute. Default value is 10.
- scale
character, type of scaling that should be applied to the dataset before running the PCA. Should be one of
'none'
,'pareto'
,'vector'
,'uv'
(seepcaMethods::pca()
). Default value is'none'
.- center
boolean, should the dataset be centred prior to running the PCA? Default value is
TRUE
.- method
character, type of PCA that should be applied to the dataset. See
pcaMethods::listPcaMethods()
. for a list of available methods. Default value is'svd'
for datasets with no missing value, and'nipals'
for datasets with missing values.
Value
A pcaMethods::pcaRes object containing the result from the
PCA analysis. The attribute dataset_name
specifies the name of the
dataset analysed.