Compute, for each principal component, the percentage of variance that is explained by one or more variables of interest.
A SingleCellExperiment object containing dimensionality reduction results.
String or integer scalar specifying the field in
Integer scalar specifying the number of the top principal components to use.
Additional arguments passed to
This function computes the percentage of variance in PC scores that is explained by variables in the sample-level metadata. It allows identification of important PCs that are driven by known experimental conditions, e.g., treatment, disease. PCs correlated with technical factors (e.g., batch effects, library size) can also be detected and removed prior to further analysis.
By default, the function will attempt to use pre-computed PCA results in
This is done by taking the top
n_dimred PCs from the matrix specified by
If these are not available or if
rerun=TRUE, the function will rerun the PCA using
however, this mode is deprecated and users are advised to explicitly call
A matrix containing the percentage of variance explained by each factor (column) and for each PC (row).
plotExplanatoryPCs, to plot the results.
getVarianceExplained, to compute the variance explained.
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.