This function can be used to extract the genotypes for all the MAGIC lines in a MagicGen or MagicGenPhen object. The genotypes can either be the SNP genotypes or the probability matrix of genotype ancestry for each MAGIC line.

getGenotypes(x, type = c("probability", "allele"))

# S4 method for MagicGen
getGenotypes(x, type = c("probability", "allele"))

Arguments

x

an object of class MagicGen

type

which type of genotype to retrieve.

Value

genotypes from MagicGenPhen object