expectedGenotypes          package:genetics          R Documentation

_C_o_n_s_t_r_u_c_t _e_x_p_e_c_t_e_d _g_e_n_o_t_y_p_e_s _a_c_c_o_r_d_i_n_g _t_o _k_n_o_w_n _a_l_l_e_l_e _v_a_r_i_a_n_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     '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.

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

       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.

_V_a_l_u_e:

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

_A_u_t_h_o_r(_s):

     Gregor GORJANC

_S_e_e _A_l_s_o:

     'allele.names', 'genotype'

_E_x_a_m_p_l_e_s:

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

