pcaEnrichment: Density plot of the principal components

Description Usage Arguments Value See Also Examples

View source: R/visualizations.R

Description

Density plot of the principal components

Usage

1
2
3
4
5
6
7
8
pcaEnrichment(
  PCAout,
  PCx,
  PCy,
  colors = c("#0348A6", "#7AC5FF", "#C6FDEC", "#FFB433", "#FF4B20"),
  contours = TRUE,
  facet = NULL
)

Arguments

PCAout

The output of performPCA

PCx

The principal component graphed on the x-axis

PCy

The principal component graphed on the y-axis

colors

The color palette for the density plot

contours

Binary classifier to add contours to the density plot

facet

A parameter to separate the graph

Value

ggplot2 object of the results of PCA for the enrichment scores

See Also

performPCA for generating PCA results.

Examples

1
2
3
4
ES2 <- readRDS(url(
"https://ncborcherding.github.io/vignettes/escape_enrichment_results.rds"))
PCA <- performPCA(enriched = ES2, groups = c("Type", "Cluster"))
pcaEnrichment(PCA, PCx = "PC1", PCy = "PC2", contours = TRUE)

escape documentation built on Nov. 8, 2020, 8:21 p.m.