R: Estimate relationship matrix based on pedigree or genomic...
GetRelMatrix
R Documentation
Estimate relationship matrix based on pedigree or genomic data
Description
Estimate relationship matrix based on pedigree or genomic data.
This function can use either Plink files as input (for both
pedigree-based and genomic relationship matrix calculation), or
genetic data in GenABEL format (for genomic relationships).
character, "pedigree" or "genomic".
Estimate the relationship matrix using either pedigree
information or genotype data
plinkbasefile
character, path to files in plink format. E.g.
if you have files test.ped and test.map,
plinkbasefile should be test. More details are also given in the vignette.
is.binary
logical, indicate whether the plink files are in
binary format (.bed/.bim/.fam)
transpose
logical, indicate whether the plink text files are
transposed or not (.tped and .tfam files)
header
logical, indicate whether the input text files have
header or not
path2Plink
character, path to the binary (executable file)
of plink_1.90 or later (the Plink_1.90 binary is used for
efficient computation of the relationship matrix). More details are also given in the
vignette.
weight
character, either "no" or "freq". We
suggest to use weight="freq", which weighs by allelic
frequency assuming HWE. See help for the ibs() function
of the
GenABEL
package
gwaa.data
object, name of object gwaa.data-class, which is
GenABEL genotype/phenotype data format
pedigreefile
reserved for future development
Details
Note that, with respect to the input parameters it is important to
distinguish the two options of datatype. If
datatype is equal to "pedigree" the user should
specify the options plinkbasefile, is.binary,
transpose, header and path2Plink. In that
case, the kinship will be estimated based on the pedigree data
in the Plink files. If, however, datatype is equal to
"genomic", there are two options: either one uses the
parameter gwaa.data to tell this function to compute the
genomics relationship matrix from a previously stored GenABEL
data object. Or, if gwaa.data is empty, the
Plink-related parameters have to be specified and the genomics
relationship matrix will be computed based on the genetic data
in the Plink file.
Value
matrix object which contains the estimated relationship
matrix