get_pca: Perfors PCA analysis

Description Usage Arguments Details Value Author(s) References

View source: R/get_pca.R

Description

This function uses the pca function implemented in the mixOmics package for PCA analysis

Usage

1
2
3
4
5
get_pca(X, samplelabels, legendlocation = "topright", filename = NA, 
ncomp = 5, center = TRUE, scale = TRUE, legendcex = 0.5, 
outloc = getwd(), col_vec = NA, sample.col.opt = "default", 
alphacol = 0.3, class_levels = NA, pca.cex.val = 3,
pca.ellipse = TRUE, ellipse.conf.level = 0.5, samplenames = FALSE)

Arguments

X

Data matrix without m/z and time.

samplelabels

Vector with class label for each sample.

legendlocation

Location of the legend on PCA score plots

filename

eg: "all", "signficantfeats"

ncomp

Number of components; please use ?pca for more information

center

Should the data be centered?; please use ?pca for more information

scale

Should the data be scaled?; please use ?pca for more information

legendcex

Size of the legend text in the PCA score plots. e.g.: 0.5 or 0.7

outloc

Output folder location

col_vec

Provide vector of colors for each group. eg: NA or c("red","green") for cases and controls, respectively. This argument is ignored if sample.col.opt is provided

sample.col.opt

Select R color palette. eg: "rainbow", "terrain", "topo". "heat", "default"

alphacol

Semi-transparent colors eg: 0.2

class_levels

Vector with names of different sample groups. eg: c("case", "control") or NA

pca.cex.val

Size of dots in PCA score plots. eg: 0.4

pca.ellipse

Should the score confidence interval for each group be drawn? eg: TRUE or FALSE

ellipse.conf.level

Confidence interval level eg: 0.95

samplenames

Should the sample names be included in PCA plots? eg: TRUE or FALSE

Details

This function performs PCA analysis. The results are saved in a RDA file.

Value

The function returns PCA results as an object and generates pairwise score plots for the first three components

Author(s)

Karan Uppal

References

mixOmics


kuppal2/xmsPANDA documentation built on May 15, 2021, 5:48 a.m.