fix_allele_encoding: Fixes allele encoding so that the minor allele homozygote is...

Description Usage Arguments Details Value Author(s)

View source: R/fix_allele_encoding.R

Description

Fixes allele encoding so that the minor allele homozygote is always encoded as 2

Usage

1

Arguments

G

- goenotype matrix

Details

The genotype matrix G should be returning counts of minor allele. If the major allele is not the reference allele, one needs to fix encoding and this function takes care of this task. It counts reference and alternative allele and if the reference allele is the minor allele, it swaps encoding for homozygotes.

Value

genotype matrix G (row - ind, col - marker) with fixed encoding: 0 - major allele homozygote, 1 - heterozygote, 2 - minor allele homozygote being simply the count of the minor allele

Author(s)

Marcin Kierczak <marcin.kierczak__REPLACE_WITH_AT__scilifelab.se>


NBISweden/a_johansson_2020 documentation built on April 18, 2021, 1:09 a.m.