This function performs principal component analyses (PCA).

perform.PCA(
  DEprot.object,
  sample.subset = NULL,
  which.data = "imputed",
  n.PCs = 50,
  center.data = TRUE,
  scale.data = TRUE
)

Arguments

DEprot.object

An object of class DEprot or DEprot.analyses.

sample.subset

String vector indicating the column names (samples) to keep in the counts table (the 'column.id' in the metadata table). Default: NULL (no subsetting).

which.data

String indicating which type of counts should be used. One among: 'raw', 'normalized', 'norm', 'imputed', 'imp'. Default: "imputed".

n.PCs

Integer number indicating the number of PCs to be computed. This is used only when NAs are present in the the data set. Default: 50.

center.data

Logical value indicating whether the data should be centered. Default: TRUE.

scale.data

Logical value indicating whether the data should be scaled. Default: TRUE.

Value

A DEprot.PCA, containing the PC values (PCs) and the importance summary (importance).

Author

Sebastian Gregoricchio

Examples

pca <- perform.PCA(DEprot.object = DEprot::test.toolbox$dpo.imp)