pedHardyWeinberg            package:fbat            R Documentation

_T_e_s_t _H_a_r_d_y-_W_e_i_n_b_e_r_g _e_q_u_i_l_i_b_r_i_u_m _f_o_r _e_a_c_h _m_a_r_k_e_r _b_a_s_e_d _o_n _p_a_r_e_n_t_a_l _d_a_t_a

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

     Test Hardy-Weinberg equilibrium for each marker based on parental
     data.

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

     pedHardyWeinberg(geneSetObj, threshold=3, founderOnly=TRUE, quiet=FALSE)

     pedHardyWeinberg.default(ped, 
               columns=c("family","pid","father","mother","sex","affected"),
               threshold=3, founderOnly=TRUE, quiet=FALSE)

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

geneSetObj: a 'geneSet' object.

     ped: pedigree data frame whose first 6 columns are family
          (pedigree id), pid (patient id), father (father id), mother
          (mother id), sex, affected (affection status). The remaining
          columns are pairs of marker alleles. Each row corresponds to
          an individual.

 columns: names of the first 5 (or 6) columns of ped file. It should be
          either equal to 
          c("family","pid","father","mother","sex","affected") or equal
          to c("family","pid","father","mother","sex")

threshold: a threshold to check if expected frequencies of genotypes
          are too small.

founderOnly: indicates if using only founder info

   quiet: print intermediate results if 'quiet=FALSE'.

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

  resMat: A matrix records the following quantities for all markers
          (rows correspond to markers): 'nInfoInd' (number of
          informative individuals, i.e. individuals whose genotypes
          contain no missing alleles for the specified marker),
          'nGenotype' (number of possible genotypes), 'nHET' (number of
          heterozygous genotypes), 'nHOM' (number of homozygous
          genotypes), 'nAllele' (number of alleles), 'nMissing' (number
          of missing alleles), 'chi2' (chi square test statistic), 'df'
          (degree of freedom of the chi square test statistic under
          H0), 'p-value' (pvalue of the test).

genotype: A list of possible genotypes and their frequencies for all
          markers.

nGenotype.vec: A vector of numbers of possible genotypes for all
          markers.

   piVec: Allele frequencies for all markers.

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

     Weiliang Qiu stwxq@channing.harvard.edu, Ross Lazarus
     ross.lazarus@channing.harvard.edu

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

       data(CAMP)
       res<-pedHardyWeinberg(CAMP)
       viewHW(res, "m709")
       viewHW(res, "m654")
       viewHW(res, "m47")
       viewHW(res, "p46")
       viewHW(res, "p79")
       viewHW(res, "p252")
       viewHW(res, "p491")
       viewHW(res, "p523")

