pca | R Documentation |
Calculates the eigenvalues and eignevectors of a SeqVarGDSClass object with Principal Component Analysis
## S4 method for signature 'SeqVarGDSClass'
pca(gdsobj, eigen.cnt=32)
gdsobj |
A |
eigen.cnt |
An integer indicating how many eigenvalues and eignvectors to return. |
Calculates the genetic covariance matrix and finds the eigen decomposition.
A list with two elements:
eigenval |
A vector of length |
eigenvect |
A matrix of dimension ("selected samples", |
Xiuwen Zheng, Stephanie Gogarten
Patterson N, Price AL, Reich D (2006) Population structure and eigenanalysis. PLoS Genetics 2:e190.
SeqVarGDSClass
,
applyMethod
gds <- seqOpen(seqExampleFileName("gds"))
pca <- pca(gds)
pca$eigenval
head(pca$eigenvect)
seqClose(gds)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.