R/utilityFunctions.R
expGen2probGen.Rd
Convert genotype frequencies to genotypes encoded as triplets of probablities (p(AA), p(Aa), p(aa)).
expGen2probGen(geno)
geno | Vector [numeric] with genotypes |
---|
Numeric vector of length [length(geno)*3] with the genotype encoded as probabbilities (p(AA), p(Aa), p(aa)).
nrSamples <- 10 # Simulate binomial SNP with 0.2 allele frequency geno <- rbinom(nrSamples, 2, p=0.2) geno_prob<- expGen2probGen(geno)