plotPCA: Compute and plot the results of a PCA analysis on gene...

plotPCAR Documentation

Compute and plot the results of a PCA analysis on gene expression data

Description

Compute and plot the results of a PCA analysis on gene expression data

Usage

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, ...)

Arguments

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.

Value

a ggplot2 object

Examples

se = emtdata::cursons2018_se()
dge = emtdata::asDGEList(se)
plotPCA(dge, colour = Subline)


bhuvad/restools documentation built on June 16, 2024, 12:44 a.m.