hap                   package:gap                   R Documentation

_H_a_p_l_o_t_y_p_e _r_e_c_o_n_s_t_r_u_c_t_i_o_n

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

     Haplotype reconstruction using sorting and trimming algorithms

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

     hap(id,data,nloci,loci=rep(2,nloci),names=paste("loci",1:nloci,sep=""),
                   control=hap.control())

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

      id: a column of subject id

    data: genotype table

   nloci: number of loci

    loci: number of alleles at all loci

   names: locus names

 control: is a function with the following arguments,

        _m_b Maximum dynamic storage to be allocated, in Mb

        _p_r Prior (ie population) probability threshold

        _p_o Posterior probability threshold

        _t_o Log-likelihood convergence tolerance

        _t_h Posterior probability threshold for output

        _m_a_x_i_t Maximum EM iteration

        _n Force numeric allele coding (1/2) on output (off)

        _s_s Tab-delimited speadsheet file output (off)

        _r_s Random starting points for each EM iteration (off)

        _r_p Restart from random prior probabilities

        _r_o Loci added in random order (off)

        _r_v Loci added in reverse order (off)

        _s_d Set seed for random number generator (use date+time)

        _m_m Repeat final maximization multiple times

        _m_i Create multiple imputed datasets. If set >0

        _m_c Number of MCMC steps between samples

        _d_s Starting value of Dirichlet prior parameter

        _d_e Finishing value of Dirichlet prior parameter

        _q Quiet operation (off)

_D_e_t_a_i_l_s:

     The package can hanlde much larger number of multiallelic loci. 
     For large sample size with relatively small number of multiallelic
     loci, genecounting should be used.

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

     The returned value is a list containing:

      l1: log-likelihood assuming linkage disequilibrium

converge: convergence status, 0=failed, 1=succeeded

   niter: number of iterations

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

     Clayton DG (2001) SNPHAP. <URL:
     http://www-gene.cimr.cam.ac.uk/clayton/software>

     Zhao JH and W Qian (2003) Association analysis of unrelated
     individuals using polymorphic genetic markers. RSS 2003, Hassalt,
     Belgium

     Zhao JH (2004). 2LD, GENECOUNTING and HAP: Computer programs for
     linkage disequilibrium analysis. Bioinformatics 20: 1325-1326

_N_o_t_e:

     adapted from hap

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

     'genecounting'

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

     ## Not run: 
     # 4 SNP example, to generate hap.out and assign.out alone
     data(fsnps)
     hap(id=fsnps[,1],data=fsnps[,3:10],nloci=4)
     dir()
     file.show("hap.out")
     file.show("assign.out")

     # to generate results of imputations
     control <- hap.control(ss=1,mi=5)
     hap(id=fsnps[,1],data=fsnps[,3:10],nloci=4,control=control)
     dir()
     ## End(Not run)

