View source: R/pcaEnrichment.R
pcaEnrichment | R Documentation |
This function allows to the user to examine the distribution of principal components run on the enrichment values.
pcaEnrichment(
input.data,
dimRed = NULL,
x.axis = "PC1",
y.axis = "PC2",
facet.by = NULL,
style = "point",
add.percent.contribution = TRUE,
display.factors = FALSE,
number.of.factors = 10,
palette = "inferno"
)
input.data |
PCA from |
dimRed |
Name of the dimensional reduction to plot if data is a single-cell object. |
x.axis |
Component to plot on the x.axis. |
y.axis |
Component set to plot on the y.axis. |
facet.by |
Variable to facet the plot into n distinct graphs. |
style |
Return a "hex" bin plot or a "point"-based plot. |
add.percent.contribution |
Add the relative percent of contribution of the selected components to the axis labels. |
display.factors |
Add an arrow overlay to show the direction and magnitude of individual gene sets on the PCA dimensions. |
number.of.factors |
The number of gene.sets to display on the overlay. |
palette |
Colors to use in visualization - input any hcl.pals. |
ggplot2 object with PCA distribution
GS <- list(Bcells = c("MS4A1", "CD79B", "CD79A", "IGH1", "IGH2"),
Tcells = c("CD3E", "CD3D", "CD3G", "CD7","CD8A"))
pbmc_small <- SeuratObject::pbmc_small
pbmc_small <- runEscape(pbmc_small,
gene.sets = GS,
min.size = NULL)
pbmc_small <- performPCA(pbmc_small,
assay = "escape")
pcaEnrichment(pbmc_small,
x.axis = "PC1",
y.axis = "PC2",
dimRed = "escape.PCA")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.