Methods for Function plotPCA in Package EDASeq

Share:

Description

plotPCA produces a Principal Component Analysis (PCA) plot of the counts in object

Usage

1
2
3
4
## S4 method for signature 'matrix'
plotPCA(object, k=2, labels=TRUE, isLog=FALSE, ...)
## S4 method for signature 'SeqExpressionSet'
plotPCA(object, k=2, labels=TRUE, ...)

Arguments

object

Either a numeric matrix or a SeqExpressionSet object containing the gene expression.

k

The number of principal components to be plotted.

labels

Logical. If TRUE, and k=2, it plots the colnames of object as point labels.

isLog

Logical. Set to TRUE if the data are already on the log scale.

...

See par

Details

The Principal Component Analysis (PCA) plot is a useful diagnostic plot to highlight differences in the distribution of replicate samples, by projecting the samples into a lower dimensional space.

If there is strong differential expression between two classes, one expects the samples to cluster by class in the first few Principal Components (PCs) (usually 2 or 3 components are enough). This plot also highlights possible batch effects and/or outlying samples.

Methods

signature(x = "matrix")
signature(x = "SeqExpressionSet")

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(yeastRNASeq)
data(geneLevelData)

mat <- as.matrix(geneLevelData)

data <- newSeqExpressionSet(mat,
                            phenoData=AnnotatedDataFrame(
                                      data.frame(conditions=factor(c("mut", "mut", "wt", "wt")),
                                                 row.names=colnames(geneLevelData))))

plotPCA(data, col=rep(1:2, each=2))