changeCoding: Change the coding of the variant if the reference allele...

Description Usage Arguments Value Examples

View source: R/correlationMatrix.R

Description

If reference alleles differs, new coding = 2 - old_coding Otherwise, no change

Usage

1

Arguments

x

is the matrix of additively coded genotypes Rows are variants and columns are individuals

v

is a vector of boolean indicating wether reference alleles differ or not

Value

The additively coded genotyped matrix with coded allele in the matrix corresponding to the reference allele in the reference panel

Examples

1
2
3
genoMat = matrix(rbinom(5*5,2,runif(5,0,1)),nrow=5,ncol=5)
sameRefAllele = rbinom(5,1,0.7)
newGenoMat = changeCoding(genoMat, sameRefAllele)

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