GraphsPCA: Principal component analysis (PCA)

Description Usage Arguments Details Value References Examples

Description

Makes principal component analysis (PCA), displays score plots, loading plots, scree plots and biplots.

Usage

1
2
GraphsPCA(data, name, groupnames, type = "points", tsf = "clr",
  top = 20, QCs = TRUE, pairs = TRUE)

Arguments

data

Data table with variables (metabolites) in columns. Samples in rows are sorted according to specific groups.

name

A character string or expression indicating a name of data set. It occurs in names of every output.

groupnames

A character vector defining specific groups in data. Every string must be specific for each group and they must not overlap.

type

A type of plots must be defined by "points" (default), "names" or "both".

tsf

Data transformation must be defined by "clr" (default), "log", "log10", "PQN", "lnPQN", "pareto" or "none". See Details.

top

How many rays with highest lengths should be visualised in biplot? The default is 20.

QCs

logical. If TRUE (default) quality control samples (QCs) are automatically distinguished. See Details.

pairs

logical. If TRUE (default) PCAs of all combinations of pairs of specific groups are displayed.

Details

Data transformation: with "clr" clr trasformation is used (see References), with "log" natural logarithm is used, with "log10" decadic logarithm is used, with "pareto" data are only scaled by Pareto scaling, with "PQN" probabilistic quotient normalization is done, with "lnPQN" natural logarithm of PQN transformed data is done, with "none" no tranformation is done.

Up to twenty different groups can be distinguished in data (including QCs).

If quality control samples (QCs) are present in data and QCs=TRUE, versions with QCs and without them are displayed. If QCs=TRUE and QCs are not present in data, this step is automatically skipped.

Value

Score plot, scree plot and biplot of PCA.

Excel file with lengths of rays in biplot and degree of class separation (DCS) of all possible pairs of groups in data.

References

Aitchison, J. (1986) The Statistical Analysis of Compositional Data Monographs on Statistics and Applied Probability. Chapman & Hall Ltd., London (UK). p. 416.

Pierce, K.M. et al. (2005) Classification of gasoline data obtained by gas chromatography using a piecewise alignment algorithm combined with feature selection and principal component analysis, J CHROMATOGR A 1096, p. 101-110.

Examples

1
2
3
4
data=metabol
name="Metabolomics"    #name of the project
groupnames=c("Con","Pat","QC")
GraphsPCA(data,name,groupnames)

AlzbetaG/Metabol documentation built on May 31, 2019, 12:39 a.m.