transform_pcs: Create direct SNP weights from a reference

Description Usage Arguments Value See Also

View source: R/mappingfunctions.R

Description

PCA can be represented in an a number of different ways, provided that the structure $$Y = U D V^T$$ flashpca uses this canonical form but the weights are out by a factor √{2} due to diploid genomes. Plink-like loadings instead scale U by the square root of the eigenvalues.

Usage

1
transform_pcs(snpweights, pcvals, mode)

Arguments

snpweights

A weighting matrix of dimension L by K

pcvals

Eigenvalues from the original PCA

mode

"plink" pr "flashpca"

Value

a canonical scaled version of the snpweights matrix

See Also

transform.plinkref


danjlawson/pcapred documentation built on Oct. 7, 2021, 3:47 p.m.