Description Usage Arguments Details Value Examples
Compute matrix of individual-specific allele frequencies via PCA
1 |
X |
a matrix of SNP genotypes, i.e. an integer matrix of 0's, 1's, and 2's. Sparse matrices of class Matrix are not supported (yet). |
d |
number of logistic factors, including the intercept |
override |
optional boolean to bypass Lanczos bidiagonalization SVD. Usually not advised unless encountering a bug in the SVD code. |
This corresponds to algorithm 1 in the paper. Only used for comparison purposes.
Matrix of individual-specific allele frequencies.
1 2 3 4 | LF = lfa(hgdp_subset, 4)
allele_freqs_lfa = af(hgdp_subset, LF)
allele_freqs_pca = pca_af(hgdp_subset, 4, LF)
summary(abs(allele_freqs_lfa-allele_freqs_pca))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.