codeW.genomeSpecific: coding of genome specific design matrices for dominance...

Description Usage Arguments Value Note Author(s) See Also

View source: R/codeW.genomeSpecific.R

Description

This function codes design matrix [W1,W2]. An element of W1 will be 1 if the individual is heterozygous for this loci AND the SNP comes from genome 1, else it is 0. An element of W2 will be 1 if the individual is heterozygous for this loci AND the SNP comes from genome 2, else it is 0.

Usage

1
codeW.genomeSpecific(x, N, num.snp)

Arguments

x

integer matrix giving the genotypes of the individuals. Always two adjacent rows give the genotype of one individual, where the odd rows give genome 1 (from one of the parents) and even rows genome 2 (from the other parent). The presence of a SNP is coded as as.integer{1}, the absence as as.integer{0}.

N

The number of individuals, integer scalar. This must be equal to nrow(x)/2

num.snp

The number of SNP, integer scalar. This must be equal to ncol(x)

Value

An integer matrix ([W1,W2]) with N rows and num.snp * 2 columns.

Note

This is an untility function and not intended to be called directly by the user.

Author(s)

Frank Technow

See Also

hypredCode and hypredTpGenomeSpecific which use this function


timflutre/hypred documentation built on May 6, 2019, 10:51 a.m.