Description Usage Arguments Value Examples
Read in SNP weightings, eigenvalues and SNP info.
SNP info must be in <fileroot>.afreq.gz Weights are read according to mode and transpose flag.
Plink weights are in <fileroot>.eigenvec.var.gz/<fileroot>.eigenvec.tvar.gz flashpca weights are in <fileroot>.tload.gz/<fileroot>.tload.gz
Plink (Eigen) values are in <fileroot>.eigenval flashpca (Singular) values are in <fileroot>.val
1 2 3 4 5 6 7 8 | readreference(
fileroot,
mode = "flashpca",
transpose = FALSE,
checkonly = FALSE,
minfreq = 0.001,
verbose = TRUE
)
|
fileroot |
fileset to read in |
mode |
Data mode; one of flashpca (default) or plink |
transpose |
Whether SNP weights are transposed (default FALSE) |
checkonly |
default FALSE. If TRUE, no file reading is done but the files are checked for existing |
minfreq |
(default 0.001) minimum allele frequency allowed in the normalisation phase, to prevent ultra-rare SNPs from being upweighted too much |
verbose |
default TRUE. Whether to output progress. |
An object of class "referencedata" which is a list containing:
snpweights (if !checkonly) The matrix of snp weights, with SNPs as rows and PCs as columns
snpstats (if !checkonly) The matrix of snp statistics, with SNPs as rows
pcvals (if !checkonly) A vector of PC Eigenvalues (plink) or SVD Singular vectors (flashpca) as appropriate.
mode As provided in the call.
transpose As provided in the call
minfreq As provided in the call
pcvalsfile The file intended to be used for pcvals
snpweightsfile The file intended to be used for snpweights
snpstatsfile The file intended to be used for snpstats
1 2 3 4 5 | ## Not run:
tfile=pcapred.ref::ukb_pcs_18()
ref=readreference(tfile)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.