Description Usage Arguments Details Value References Examples
Function provided by GCTA maintainers (modified slightly) for accessing their recently introduced binary GRM format. The GRM is stored as a vector of numerics which correspond to the lower triangular elements including the diagonal. We simply read these, pull the diagonal elements, and inflate them into a full symmetric matrix. We add sample IDs to colnames and rownames for compatibility with other Kriging functions.
1 | read_GRMBin(prefix, size = 4)
|
prefix |
The file path prefix to GRM binary files (e.g., test.grm.bin, test.grm.N.bin, test.grm.id.) |
size |
The length (in bytes) of each value in the raw GRM vector. Default is 4, and matches GRM writen by GCTA 1.11. |
Note that the GRM is described by three files, and this function assumes that all have a common prefix that is passed in.
GRM of dim (N.samples x N.samples) with rownames and colnames as sample ID.
http://www.complextraitgenomics.com/software/gcta/estimate_grm.html
1 2 3 4 5 | ## read binary Genetic Relatedness Matrix (GRM) generated by GCTA
grmFile <- system.file(package = "OmicKriging",
"doc/vignette_data/ig_genotypes.grm.bin")
grmFileBase <- substr(grmFile,1, nchar(grmFile) - 4)
GRM <- read_GRMBin(grmFileBase)
|
Loading required package: doParallel
Loading required package: foreach
Loading required package: iterators
Loading required package: parallel
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.