hdesign                package:happy                R Documentation

_E_x_t_r_a_c_t _d_e_s_i_g_n _m_a_t_r_i_x _o_r _g_e_n_o_t_y_p_e_s _f_o_r _a _s_p_e_c_i_f_i_c _m_a_r_k_e_r _i_n_t_e_r_v_a_l _f_r_o_m _a _h_a_p_p_y
_o_b_j_e_c_t

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

     hdesign() will call C to extract the design matrix to fit a QTL to
     a marker interval. hprob() will call C to extract a raw
     probability matrix. hgenotype() will return the raw genotype data
     for a marker

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

     hdesign( h, marker, model='additive', mergematrix=NULL )
     hprob( h, marker=NULL )
     hgenotype ( h, marker, collapse=FALSE, sep="" )

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

       h: an object returned by a previous call to happy()

  marker: either a character string giving the name of the marker or
          the index of the marker in the array h$markers

   model: either 'additive' (default) or 'full'. The additive design
          matrix returns an array with S columns, where S is the number
          of founder strains in the HS. The full design matrix returns
          a matrix with S(S-1)/2 columns, one for each combination of
          strains

mergematrix: an object returned by mergematrices, used to define sets
          of strains that are to be merged together. This is
          accomplished by adding the corresponding columns in the
          original design matrix.

collapse: a boolean variable indicating whether to collapse the alleles
          into a single genotype.

     sep: the text to be used to separate the alleles if collapsed.

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

     hdesign() returns a design matrix d[i,j], in which the ith row
     corresponds to the subject i, and the jth column to the
     corresponding strain or combination of strains or merged strains.
     \hprob() returns a matrix i th row corresponds to the subject i,
     and the x=s*S+t th column contains the probability that the
     ancestral strains are s,t where S is the total number of strains.
     \hgenotype() returns a Nx2 matrix i th row corresponds to the
     subject i, and column 1 contains the first allele and column 2 the
     second allele at the marker specified, or (if 'collapse=TRUE') a
     vector of genotypes with the alleles pasted together.

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

     Richard Mott

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

     happy(), hfit()

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

     ## Not run: h <- happy( 'HS.data', 'HS.alleles', generations=200 )
     ## Not run: d <- hdesign( h, 1 ) ## the first marker interval
     ## Not run: d <- hdesign( h, 'D1MIT264') ## the marker interval with left-hand marker D1MIT264
     ## Not run: d <- hdesign( h, 'D1MIT264', model='full' ) ## ditto with full design matrix

