getAdditivelyCodedMatrix: Code additively the genotypes Sum the two columns per...

Description Usage Arguments Value Examples

View source: R/correlationMatrix.R

Description

Code additively the genotypes Sum the two columns per individual of the input matrix (each corresponding to one chromosome) to get the additive coding of the individual at the locus.

Usage

1
getAdditivelyCodedMatrix(genoMat, lind)

Arguments

genoMat

is the matrix of genotype with two colums per individual Rows are variants and columns are individuals

lind

is the list of individual in the genotype matrix

Value

The additively coded genotyped matrix

Examples

1
2
3
4
genoMat = matrix(rbinom(5*10,1,runif(10,0,1)),nrow=5,ncol=10)
lind = c("ind1","ind2","ind3","ind4","ind5")
colnames(genoMat) = rep(lind,each=2)
addCodedMat = getAdditivelyCodedMatrix(genoMat, lind)

vincela/VarExp documentation built on May 29, 2019, 12:42 p.m.