PCAKneePlot {karyotapR} | R Documentation |
Plot of PCA proportion of variance explained
Description
Draws "knee plot" of PCA proportion of variance explained to determine which principal components (PCs) to include for downstream applications e.g. clustering. Variance explained for each PC is indicated by the line. Cumulative variance explained is indicated by the bars.
Usage
PCAKneePlot(TapestriExperiment, alt.exp = "alleleFrequency", n.pcs = 10)
Arguments
TapestriExperiment |
|
alt.exp |
Character, |
n.pcs |
Numeric, number of PCs to plot, starting at 1. Default 10. |
Value
ggplot2 object, combined line plot and bar graph
Examples
tap.object <- newTapestriExperimentExample() # example TapestriExperiment object
tap.object <- runPCA(tap.object, alt.exp = "alleleFrequency")
PCAKneePlot(tap.object, n.pcs = 5)
[Package karyotapR version 1.0.1 Index]