plotPCA-methods {EDASeq} | R Documentation |
plotPCA
in Package EDASeq plotPCA
produces a Principal Component Analysis (PCA) plot of the counts in object
## S4 method for signature 'matrix' plotPCA(object, k=2, labels=TRUE, isLog=FALSE, ...) ## S4 method for signature 'SeqExpressionSet' plotPCA(object, k=2, labels=TRUE, ...)
object |
Either a numeric matrix or a |
k |
The number of principal components to be plotted. |
labels |
Logical. If |
isLog |
Logical. Set to |
... |
See |
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.
signature(x = "matrix")
signature(x = "SeqExpressionSet")
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))