plotPCA | R Documentation |
Compute and plot the results of a PCA analysis on gene expression data
plotPCA(edata, dims = c(1, 2), ...)
## S4 method for signature 'DGEList'
plotPCA(edata, dims, precomputed = NULL, rl = 1, ...)
## S4 method for signature 'ExpressionSet'
plotPCA(edata, dims, precomputed = NULL, rl = 1, ...)
## S4 method for signature 'SummarizedExperiment'
plotPCA(edata, dims, assay = 1, precomputed = NULL, rl = 1, ...)
## S4 method for signature 'SingleCellExperiment'
plotPCA(edata, dims, dimred = "PCA", rl = 1, ...)
## S4 method for signature 'SpatialExperiment'
plotPCA(edata, dims, dimred = "PCA", rl = 1, ...)
edata |
a DGEList, SummarizedExperiment or ExpressionSet object containing gene expression data. |
dims |
a numeric, containing 2 values specifying the dimensions to plot. |
... |
aesthetic mappings to pass to 'ggplot2::aes_string()'. |
precomputed |
a dimensional reduction results from 'stats::prcomp'. |
rl |
a numeric, specifying the relative scale factor to apply to text on the plot. |
assay |
a numeric or character, specifying the assay to use (for SummarizedExperiment). |
dimred |
a string or integer scalar indicating the reduced dimension result in 'reducedDims(object)' to plot. |
a ggplot2 object
se = emtdata::cursons2018_se()
dge = emtdata::asDGEList(se)
plotPCA(dge, colour = Subline)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.