expectedGenotypes {genetics}R Documentation

Construct expected genotypes according to known allele variants

Description

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.

Usage

expectedGenotypes(x, alleles = allele.names(x), ploidy = 2)

Arguments

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.

Value

A character vector with genotype names as "alele1/alele2" for diploid example.

Author(s)

Gregor GORJANC

See Also

allele.names, genotype

Examples

  ## 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)
  

[Package genetics version 1.2.0 Index]