simgenotypes           package:MasterBayes           R Documentation

_G_e_n_o_t_y_p_e _a_n_d _G_e_n_o_t_y_p_i_n_g _E_r_r_o_r _S_i_m_u_l_a_t_i_o_n

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

     Simulates genotypes given a pedigree and allele frequencies. 
     Option exists to simulate observed genotypes given Wangs's (2004)
     model of genotyping error for codominat markers or an asymmetric
     allele based model for dominant markers (Hadfield, 2007).

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

     simgenotypes(A, E1 = 0, E2 = 0, pedigree, no_dup = 1, prop.missing=0, marker.type="MS", ...)

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

       A: list of allele frequencies at each locus

      E1: Allelic Dropout Rate for codominat markers. Probability of
          mis-scoring a dominat allele as recessive for dominant
          markers

      E2: Stochastic Error Rate for codominat markers. Probability of
          mis-scoring a recessive allele as dominant for dominant
          markers

pedigree: pedigree in 3 columns: id, dam, sire. Base individuals have
          NA as parents. All parents must be in id, and each indivdiual
          must either have both parents in id, or both parents as base.

  no_dup: integer: number of times genotypes are to be observed

prop.missing: proportion of observed genotypes that are missing

marker.type: "MS" or "AFLP" for codominant or dominant markers
          respectively

     ...: Further arguments to be passed

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

       G: list of genotype objects; true genotypes for each locus

     Gid: vector of id names indexing 'G'

    Gobs: list of genotype objects; observed genotypes for each locus

      id: vector of 'id' names indexing 'Gobs'

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

     Jarrod Hadfield j.hadfield@sheffield.ac.uk

_R_e_f_e_r_e_n_c_e_s:

     Wang J.L. 2004 Genetics 166 4 1963-1979 Hadfield J.D. 2007 _in
     prep_

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

     'genotype'

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

     pedigree<-cbind(1:10, rep(NA,10), rep(NA, 10))

     gen_data<-simgenotypes(A=list(loc_1=c(0.5, 0.2, 0.1, 0.075, 0.025)), 
      E1=0.1, E2=0.1, pedigree=pedigree, no_dup=1)

     summary(gen_data$G[[1]])
     summary(gen_data$Gobs[[1]])

