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.
read_GRMBin(prefix, size = 4)
The file path prefix to GRM binary files (e.g., test.grm.bin, test.grm.N.bin, test.grm.id.)
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.
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.