subPCA: PCA plot with class labels.

Description Usage Arguments Details Value See Also

View source: R/subPCA.R

Description

Principal component analysis (PCA) plot with class labels.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
subPCA(
  emat,
  class = NULL,
  keepN = TRUE,
  nGenes = 1000,
  normMethod = NULL,
  dim = c(1, 2),
  labelSamp = FALSE,
  legend = "topright",
  classConfusion = NULL,
  classCol = getOption("subClassCol"),
  ...
)

Arguments

emat

numeric matrix with row features and sample columns.

class

a factor vector specifying sample classes length(class)==ncol(emat).

keepN

a logical or numeric vector specifying which samples to keep.

nGenes

an integer specifying number of features to used for PCA.

normMethod

a character, passed to calcNormFactors if element in c("TMM","RLE", "upperquartile","none") or voom ("scale", "quantile", "cyclicloess").#'

dim

a numeric vector of length 2, specifying which principal components to plot.

labelSamp

a logical indicating whether points or colnames(emat) are plotted.

legend

a character specifying legend placement (e.g. "topleft", "bottomright").

classConfusion

a factor vector with same length and levels as class specifying alternative classifications.

classCol

a character vector of hexcolors with length(classCol)>=levels(class).

...

arguments to be passed to plot.

Details

plotPCA provides a PCA with points colored according to class labels. If classConfusion is specified, samples where class != classConfusion are highlighted.

Value

a labeled PCA plot and list of class prcomp passed from prcomp

See Also

prcomp, subMDS


peterawe/CMScaller documentation built on June 13, 2020, 4:49 a.m.