pca_plot {gwaRs} | R Documentation |
PCA Plot
Description
Creates a PCA plot
Usage
pca_plot(
data,
xComponent = "PC1",
yComponent = "PC2",
legendPos = "right",
soft = "PLINK",
colPalette = "Accent",
title = NULL
)
Arguments
data |
PLINK pca or EIGENSTRAT smartpca output, (or any tab-delimited file or data.frame with the same format as PLINK pca or EIGENSTRAT smartpca output) |
xComponent |
A character vector indicating the principal component value to use for the x-axis. Default is "PC1" |
yComponent |
A character vector indicating the principal component value to use for the x-axis. Default is "PC2" |
legendPos |
A character vector indicating the legend position. Default is "right". |
soft |
A character vector indicating the software output format. Default is "PLINK". If you have a tab-delimited file or data.frame with the same format as EIGENSTRAT output, use "EIGENSTRAT" |
colPalette |
A character vector indicating the color palette to use. Default is "Accent". |
title |
A string denoting the title to use for the plot. Default is 'PCA Plot' |
Details
Creates a PCA plot from PLINK pca output, EIGENSTRAT smartpca, (or any tab-delimited file or data.frame with the same format as PLINK pca or EIGENSTRAT smartpca output).
Value
A PCA plot.
Author(s)
Lindokuhle Nkambule
Examples
pca_plot(pcaData)