haplo.score.slide.w       package:GeneticsBase       R Documentation

_W_r_a_p_p_e_r _f_o_r _h_a_p_l_o._s_c_o_r_e._s_l_i_d_e _i_n _h_a_p_l_o._s_t_a_t_s _p_a_c_k_a_g_e, _w_h_i_c_h _i_s _u_s_e_d _t_o _i_d_e_n_t_i_f_y _s_u_b-_h_a_p_l_o_t_y_p_e_s _f_r_o_m _a _g_r_o_u_p _o_f _l_o_c_i

_D_e_s_c_r_i_p_t_i_o_n:

     Wrapper for 'haplo.score.slide', which is used to identify
     sub-haplotypes from a group of loci.  Run haplo.score on all
     contiguous subsets of size n.slide from the loci in a genotype
     matrix (geno).  From each call to haplo.score, report the global
     score statistic p-value. Can also report global and maximum score
     statistics simulated p-values.

_U_s_a_g_e:

     haplo.score.slide.w(geneSetObj, 
                         trait.type = "gaussian", 
                         n.slide = 2, 
                         offset = NA, 
                         x.adj = NA, 
                         skip.haplo = 5/(2 * nrow(geno)), 
                         locus.label = NA, 
                         miss.val = c(0, NA), 
                         simulate = FALSE, 
                         sim.control = score.sim.control(), 
                         em.control = haplo.em.control())

_A_r_g_u_m_e_n_t_s:

geneSetObj: A geneSet object

trait.type: Character string defining type of trait, with values of
          "gaussian", "binomial", "poisson", "ordinal".

 n.slide: Number of loci in each contiguous subset.  The first subset
          is the ordered loci numbered 1 to n.slide, the second subset
          is 2 through 'n.slide'+1 and so on.  If the total number of
          loci in geno is 'n.loci', then there are 'n.loci' - 'n.slide'
          + 1 total subsets. 

  offset: Vector of offset when trait.type = "poisson"

   x.adj: Matrix of non-genetic covariates used to adjust the score
          statistics.  Note that intercept should not be included,  as
          it will be added in this function. 

skip.haplo: Skip score statistics for haplotypes with frequencies <
          'skip.haplo'. The default is for an expected count of 5 out
          of the 2*N haplotype  occurrences.

locus.label: Vector of labels for loci.

miss.val: Vector of values that represent missing alleles in geno.

simulate: Logical:  if [F]alse, no empirical p-values are computed; if
          [T]rue, simulations are performed. Specific simulation
          parameters can be controlled in the sim.control parameter
          list. 

sim.control: list of control parameters to determine how simulations
          are performed for simulated p-values. The list is created by
          the function 'score.sim.control' and the default values of
          this function can be changed as desired. See
          'score.sim.control' for details.

em.control: A list of control parameters to determine how to perform
          the EM algorithm for estimating haplotype frequencies when
          phase is   unknown. The list is created by the function
          'haplo.em.control' - see this function for more details

_D_e_t_a_i_l_s:

     Please refer to 'haplo.score.slide' for more details.

_V_a_l_u_e:

     List with the following components:

      df: Data frame with start locus, global p-value, simulated global
          p-value, and simulated maximum-score p-value. 

  n.loci: Number of loci given in the genotype matrix. 

simulate: Same as parameter description above. 

 n.slide: Same as parameter description above. 

locus.label: Same as parameter description above. 

n.val.haplo: Vector containing the number of valid simulations used in
          the maximum-score statistic p-value simulation.  The number
          of valid simulations can be less than the number of
          simulations requested (by sim.control) if simulated data sets
          produce unstable variables of the score statistics.  

n.val.global: Vector containing the number of valid simulations used in
          the global score statistic p-value simulation.   

_N_o_t_e:

     ~~further notes~~

_A_u_t_h_o_r(_s):

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

_R_e_f_e_r_e_n_c_e_s:

     ~put references to the literature/web site here ~

_S_e_e _A_l_s_o:

     'haplo.em.w', 'haplo.scan.w', 'haplo.score.w'

_E_x_a_m_p_l_e_s:

     ##---- Should be DIRECTLY executable !! ----
     ##-- ==>  Define data, use random,
     ##--    or do  help(data=index)  for the standard data sets.

     ## The function is currently defined as
     "haplo.score.slide.w"

