Description Usage Arguments Details Examples
View source: R/genoscape_pca.R
This just does all the legwork to do a PCA using SNPRelate, and then it does what it takes to plot every PC against every other using facet_grid. It doesn't make the plots, but it prepares the data.
1 2 3 4 5 6 7 | genoscape_pca(
dat012,
samples_to_remove = character(0),
num_pcs = 6,
sample_groups = NULL,
plot_facet_free = FALSE
)
|
dat012 |
an 012 matrix like that you get from read_012. missing data should be denoted -1. |
samples_to_remove |
the names of the samples that should be removed before doing the PCA. This does not check to make sure that the samples requested to be dropped actually exist in dat012. |
num_pcs |
number of principal components to retain in output. Default = 6 |
sample_groups |
If not NULL, this should be a tibble with a column "sample" and another column "group", by which the points will be colored. |
plot_facet_free |
if TRUE then the pca-pairs plot scales are free to encompass less area. |
This function lets you say which individuals you want to drop which makes it easy to iteratively remove outliers.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.