Learn R Programming

plinkFile (version 0.1.0)

readGRM: 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 = ".")

Value

matrix of relatedness with sample ID in row and column names.

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.

Examples

Run this code
pfx <- file.path(system.file("extdata", package="plinkFile"), "m20")
(readGRM(pfx))

Run the code above in your browser using DataLab