convert_to_dosages: Convert matrix of genotype probabilities to dosages

Description Usage Arguments Details Value Examples

Description

Convert matrix of genotype probabilities to dosages

Usage

1
2
3
convert_to_dosages(aMatrix,
    model = c("additive", "recessive", "dominant"),
    in_terms_of_allele = c("B", "A"), transpose = FALSE)

Arguments

aMatrix

Numeric matrix of genotype probabilities.

model

Type of genetic model to be used.

in_terms_of_allele

Allele in terms of which dosages should be computed.

transpose

Should the resulting matrix should have individuals as rows and dosages as columns?

Details

Rows of the input matrix correspond to snps, consecutive triples of columns to individuals. Genotype probabilities are assumed to appear in the order AA, AB, BB. If ‘transpose’ is FALSE, the resulting matrix will have one row per snp and one column per individual. If ‘transpose’ is TRUE, the resulting matrix will have individuals in the rows and snps in the columns. Both snps and individuals will appear in the same order as in the input matrix.

Value

Matrix with dosages.

Examples

1

cbaumbach/genFun documentation built on May 13, 2019, 1:47 p.m.