Description Usage Arguments Value Examples
Plot the PCA results from a DGEList
1 2 3 4 5 6 7 | plotExpressionPCA(object, ...)
## S4 method for signature 'DGEList'
plotExpressionPCA(object, ..., .center = TRUE, .scale = FALSE)
## S4 method for signature 'SummarizedExperiment'
plotExpressionPCA(object, i = NULL, ..., .center = TRUE, .scale = FALSE)
|
object |
An object containing expression values (i.e. counts) |
... |
Used for passing parameters to autoplot.prcomp. These should be column names and can be passed to plotting aesthetics such as colour, shape and size. |
.center |
passed to |
.scale |
passed to |
i |
Identifies the assay to use in a SummarizedExperiment. Any assay other than counts will be used as provided, whilst the counts assay will be transformed into logCPM before performing the PCA. |
A ggplot2 object
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(edgeR)
y <- matrix(rnbinom(10000,mu=5,size=2), ncol=4)
d <- DGEList(counts=y, group=rep(1:2, each=2))
plotExpressionPCA(d, colour = "group")
library(SummarizedExperiment)
nrows <- 200; ncols <- 6
counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
colData <- DataFrame(Treatment=rep(c("ChIP", "Input"), 3),
row.names=LETTERS[1:6])
se0 <- SummarizedExperiment(assays=SimpleList(counts=counts),
colData=colData)
plotExpressionPCA(se0, colour = "Treatment")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.