pca: Principal Component Analysis

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Calculates the eigenvalues and eignevectors of a SeqVarGDSClass object with Principal Component Analysis

Usage

1
2
## S4 method for signature 'SeqVarGDSClass'
pca(gdsobj, eigen.cnt=32)

Arguments

gdsobj

A SeqVarGDSClass object with VCF data.

eigen.cnt

An integer indicating how many eigenvalues and eignvectors to return.

Details

Calculates the genetic covariance matrix and finds the eigen decomposition.

Value

A list with two elements:

eigenval

A vector of length eigen.cnt with eigenvalues

eigenvect

A matrix of dimension ("selected samples", eigen.cnt).

Author(s)

Xiuwen Zheng, Stephanie Gogarten

References

Patterson N, Price AL, Reich D (2006) Population structure and eigenanalysis. PLoS Genetics 2:e190.

See Also

SeqVarGDSClass, applyMethod

Examples

1
2
3
4
5
gds <- seqOpen(seqExampleFileName("gds"))
pca <- pca(gds)
pca$eigenval
head(pca$eigenvect)
seqClose(gds)

SeqVarTools documentation built on Nov. 22, 2020, 2 a.m.