plotPCA: plotPCA

Description Usage Arguments Value Examples

View source: R/ascend_plots.R

Description

Plot two principal components (PCs) on a scatter plot. This plot corresponds more closely to the distance between points and therefore is good to use to review the effectiveness of clustering by the CORE algorithm.

Usage

1
plotPCA(object, PCX = 1, PCY = 2, group = NULL, density = FALSE)

Arguments

object

An EMSet object that has undergone PCA.

PCX

Principal component to plot on the x-axis.

PCY

Principal component to plot on the y-axis.

group

(Optional) Name of the column in colInfo that describe a set of conditions you would like to colour cells by.

density

Vary alpha by density (Default: FALSE)

Value

A ggplot glob that contains a scatter plot.

Examples

1
2
3
4
5
6
# Load EMSet
em_set <- ascend::analyzed_set

# Generate PCA plot
pca_plot <- plotPCA(em_set, PCX = 1, PCY = 2, 
group = "cluster", density = TRUE)

IMB-Computational-Genomics-Lab/ascend documentation built on Aug. 29, 2019, 4:10 a.m.