plotPCA: Performa PCA analysis and plot PCA figure

plotPCAR Documentation

Performa PCA analysis and plot PCA figure

Description

Performa PCA analysis and plot PCA figure

Usage

plotPCA(para, pcaMethod = "svdImpute", valueID = "valueNorm",
  label = "order", pointLabel = NULL, pointSize = 1.4,
  labelSize = 4, rmQC = TRUE, batch = FALSE, showCircle = TRUE,
  showClass = TRUE, scale = "none", center = FALSE, saveRds = TRUE,
  legendRowBatch = NULL, legendRowClass = NULL,
  legendPosition = "top", classColor = NULL, pdfWidth = 4.38,
  pdfHeight = 3.7, pngWidth = 4, pngHeight = 4.2, res = 120,
  plot3d = FALSE, reverse = FALSE, ...)

Arguments

para

A metaXpara object

pcaMethod

See pca in pcaMethods

valueID

The name of the column which will be used

label

The label used for plot PCA figure, default is "order". This value can be "order" or "sample". If the value of this parameter is NA or NULL, then no label will be shown for each point.

pointLabel

The labels for each point, default is NULL. When users want to highlight some samples, this parameter is useful.

pointSize

The size of the point, default is 1.4

labelSize

The size of the label, default is 4

rmQC

A logical indicates whether remove QC data

batch

A logical indicates whether output batch information

showCircle

Whether or not to show circle for each class, default is TRUE.

showClass

Whether or not to show class information, default is TRUE. This parameter is useful when users want to check the batch effect.

scale

Scaling, see pca in pcaMethods

center

Centering, see pca in pcaMethods

saveRds

Boolean, setting the argument to TRUE to save some objects to disk for debug. Only useful for developer. Default is TRUE.

legendRowBatch

Specify the number of column of legend for batch. Default is NULL and use the default setting.

legendRowClass

Specify the number of column of legend for group. Default is NULL and use the default setting.

classColor

A data frame for color setting of class

pdfWidth

Width for PDF, default is 4.38

pdfHeight

Height for PDF, default is 3.7

pngWidth

Width for PNG, default is 4 inch

pngHeight

Height for PNG, default is 4.2 inch

res

resolution for PNG, default is 120

reverse

Default is FALSE. Change type between class and batch.

...

Additional parameter

Value

none

Author(s)

Bo Wen wenbostar@gmail.com

Examples

para <- new("metaXpara")
pfile <- system.file("extdata/MTBLS79.txt",package = "metaX")
sfile <- system.file("extdata/MTBLS79_sampleList.txt",package = "metaX")
rawPeaks(para) <- read.delim(pfile,check.names = FALSE)
sampleListFile(para) <- sfile
para <- reSetPeaksData(para)
para <- missingValueImpute(para)
para <- transformation(para,valueID = "value")
metaX::plotPCA(para,valueID="value",scale="uv",center=TRUE)

wenbostar/metaX documentation built on July 4, 2023, 7:50 p.m.