expGen2probGen: Rewrite expected genotypes into genotype probabilities.

Description Usage Arguments Value Examples

View source: R/utilityFunctions.R

Description

Convert genotype frequencies to genotypes encoded as triplets of probablities (p(AA), p(Aa), p(aa)).

Usage

1

Arguments

geno

Vector [numeric] with genotypes

Value

Numeric vector of length [length(geno)*3] with the genotype encoded as probabbilities (p(AA), p(Aa), p(aa)).

Examples

1
2
3
4
nrSamples <- 10
# Simulate binomial SNP with 0.2 allele frequency
geno <- rbinom(nrSamples, 2, p=0.2)
geno_prob<- expGen2probGen(geno)

Example output



PhenotypeSimulator documentation built on July 16, 2021, 5:06 p.m.