Runs a Principal Component Analysis on an omics dataset from a MultiDataSet
object. This is a wrapper function around the get_dataset_matrix()
and
run_pca_matrix()
functions.
Arguments
- mo_data
A MultiDataSet::MultiDataSet object.
- dataset_name
Character, name of the omics dataset on which a PCA should be run.
- 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.