readGRM {plinkFile} | R Documentation |
Read Genetic Related Matrix (GRM) of GCTA
Description
GRM is the core formt of GCTA, which is an binary symmetric matrix with an extra variant count matrix (VCM), this function reads the binary sysmmetric matrix.
Usage
readGRM(pfx, fid = NULL)
Arguments
pfx |
prefix of GRM file set |
fid |
separator after family ID (def=NULL, use IID only) |
Details
GCTA GRM is represented by a set of three files:
- .grm.bin :
GRM matrix in binary
- .grm.id :
sample FID and IID in text
- .grm.N.bin :
number of valid variants for each GRM entry
and it always uses single precision (4 bytes per entry).
To read the extra the extra VCM (grm.N.bin), use readVCM
.
Value
matrix of relatedness with sample ID in row and column names.
Examples
pfx <- file.path(system.file("extdata", package="plinkFile"), "m20")
(readGRM(pfx))
[Package plinkFile version 0.2.1 Index]