expectedGenotypes {genetics} | R Documentation |
expectedGenotypes
constructs expected genotypes according to
known allele variants, which can be quite tedious with large number of
allele variants. It can handle data with different level of ploidy.
expectedGenotypes(x, alleles = allele.names(x), ploidy = 2)
x |
genotype object, as genotype. |
alleles |
vector of allele names, as character. |
ploidy |
number of chromosome sets i.e. 2 for human autosomal genes, as integer. |
At least one of x
or alleles
must be given.
A character vector with genotype names as "alele1/alele2" for diploid example.
Gregor GORJANC
## Not run: Scrapie example scrapie <- c("ARQ/ARQ", "ARQ/ARQ", "ARR/ARQ", "AHQ/ARQ", "ARQ/ARQ") expectedGenotypes(as.genotype(scrapie)) expectedGenotypes(alleles=c("ARR", "AHQ", "ARH", "ARQ", "VRR", "VRQ")) scrapie <- genotype(scrapie, alleles=c("ARR", "AHQ", "ARH", "ARQ", "VRR", "VRQ"), reorder="yes") expectedGenotypes(scrapie)