Learn R Programming

EDASeq (version 2.6.2)

plotPCA-methods: Methods for Function plotPCA in Package EDASeq

Description

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

Usage

"plotPCA"(object, k=2, labels=TRUE, isLog=FALSE, ...) "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

Methods

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

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.

Examples

Run this code
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))

Run the code above in your browser using DataLab