pep.pca.plot()
takes in a modified PCA object returned by pep.pca() and plots it.
Uses ggplot2.
1 2 3 | pep.pca.plot(pca, dim1 = 1, dim2 = 2, type = "density",
colors = c("#000000", "#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2",
"#D55E00", "#CC79A7"))
|
pca |
modified PCA object returned by pep.pca(). Can take up to 8 different HLA alleles. |
dim1 |
Index of PC to plot along the x-axis. Defaults to 1 |
dim2 |
Index of PC to plot along the y-axis. Defaults to 2 |
type |
Describes the type of plot to make. Either 'points' (default) for scatter plo,t or 'density' for a 2D KDE density graph. |
colors |
character that describes how each of the clusters should be colored. Defaults to the colorblind palette proposed by Okabe and Ito (2002) http://jfly.iam.u-tokyo.ac.jp/color/ |
type |
How the PCA should be plotted. Either 'points' for scatterplot or 'density' for an automated 2D KDE plot (default). |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.