pca.plink: Perform PCA on genotypes with PLINK

Description Usage Arguments Details Value References See Also

Description

Perform PCA on genotypes with PLINK

Usage

1
2
3
## S3 method for class 'plink'
pca(x, flags = "--autosome", K = 20, by = c("indiv",
  "var"), ...)

Arguments

x

a pointer to a PLINK fileset (of class plink)

flags

command-line flags passed directly to underlying PLINK call

K

return the projection of samples onto the top K PCs

by

project individuals ("indiv") or markers ("var") onto PCs?

...

ignored

Details

See the relevant PLINK documentation for details of the underlying calculations. The default is to perform PCA on autosomal genotypes only. Scaled eigenvalues (ie. percent variance explained by each dimension) are provided in attr(,"eigvals").

A recently-proposed test for natural selection uses the squared loadings of each marker against the top PCs as an analog of F_st. To obtain those loadings use by = "var".

Value

When by = "indiv" (the default), a dataframe with individual IDs, family IDs, and then projections in columns "PC1"..."PCk". When by == "var", a dataframe with columns chromosome and marker name followed by PCs. The object inherits from pca.result so it can be autoploted with plot().

References

PLINK v1.9: https://www.cog-genomics.org/plink2

Purcell S et al. (2007) PLINK: a toolset for whole-genome association and population-based linkage analysis. Am J Hum Genet 81(3): 559-575. doi:10.1086/519795.

Duforet-Frebourg N et al. (2015) Detecting genomic signatures of natural selection with principal componentanalysis: application to the 1000 Genomes data http://arxiv.org/abs/1504.04543

See Also

mds.plink, plot.pca.result


andrewparkermorgan/argyle documentation built on May 10, 2019, 11:08 a.m.