makeZ: Make a centered (scaled) genetic marker matrix

Description Usage Arguments Value Examples

Description

Make a centered (scaled) genetic marker matrix

Usage

1
2
makeZ(M, bAlleleFrequency = NULL, scaled = TRUE, haploid = FALSE,
  SNPinRows = TRUE)

Arguments

M

matrix of genotypes in bi-allelic format (e.g. AA, AC, CC). Missing data is entered as NA.

bAlleleFrequency

vector of B allele frequencies for the markers. Default is NULL, which takes the column means of the M matrix or the column means divided by two in case of haplotypes.

scaled

logical whether scaling of genotype score need to be done. Default is TRUE.

haploid

logical wheter marker scores are haplotypes. Default is FALSE.

SNPinRows

logical whether markers are in rows. If FALSE markers are assumed to be present in columns. Default is TRUE.

Value

realization of the Z matrix in R matrix format

Examples

1
2
data(M)
head(makeZ(M))

digiYozhik/msc_thesis documentation built on May 14, 2019, 5:16 p.m.