View source: R/Seurat.Utils.Visualization.R
scPlotPCAvarExplained | R Documentation |
This function plots the percentage of variation explained by each principal
component (PC) in a Seurat object. It allows for a visual assessment of how much variance is
captured by each PC, which is crucial for dimensionality reduction analyses. Users can choose
between two plotting methods: one using MarkdownReports
and the other using ggExpress
.
scPlotPCAvarExplained(
obj = combined.obj,
plotname = "Variance Explained by Principal Components",
sub = paste(ncol(obj), "cells, ", nrow(obj), "features."),
caption = "hline at 1%",
use.MarkdownReports = FALSE,
...
)
obj |
A Seurat object from which to plot the percentage of variation explained by each PC.
Default: |
plotname |
The title of the plot to be generated. Default: "Variance Explained by Principal Components". |
sub |
Subtitle for the plot, typically including information about the number of cells and
features analyzed. Default: A string generated from |
caption |
A caption for the plot. Default: "hline at 1%". |
use.MarkdownReports |
Boolean indicating whether to use |
... |
Additional arguments to be passed to |
Generates a plot showing the percent of variation each PC accounts for. This function does not return a value but instead generates a plot directly.
## Not run:
if (interactive()) {
data("combined.obj") # Example Seurat object
scPlotPCAvarExplained(combined.obj, use.MarkdownReports = TRUE)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.