addpair                 package:qtl                 R Documentation

_S_c_a_n _f_o_r _a_n _a_d_d_i_t_i_o_n_a_l _p_a_i_r _o_f _Q_T_L _i_n _a _m_u_l_t_i_p_l_e-_Q_T_L _m_o_d_e_l

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

     Scan for an additional pair of QTL in the context of a multiple
     QTL model.

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

     addpair(cross, chr, pheno.col=1, qtl, covar=NULL, formula,
             method=c("imp","hk"), incl.markers=FALSE, verbose=TRUE)

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

   cross: An object of class 'cross'. See 'read.cross' for details.

     chr: Optional vector indicating the chromosomes to be scanned. If
          missing, all chromosomes are scanned. Refer to chromosomes by
          name. Refer to chromosomes with a preceding '-' to have all
          chromosomes but those considered.  A logical (TRUE/FALSE)
          vector may also be used.

pheno.col: Column number in the phenotype matrix to be used as the
          phenotype.  One may also give a character string matching a
          phenotype name. Finally, one may give a numeric vector of
          phenotypes, in which case it must have the length equal to
          the number of individuals in the cross, and there must be
          either non-integers or values < 1 or > no. phenotypes; this
          last case may be useful for studying transformations.

     qtl: An object of class 'qtl', as output from 'makeqtl'.

   covar: A matrix or data.frame of covariates.  These must be strictly
          numeric.

 formula: An object of class 'formula' indicating the model to be
          fitted.  (It can also be the character string representation
          of a formula.)  QTLs are referred to as 'Q1', 'Q2', etc. 
          Covariates are referred to by their names in the data frame
          'covar'.  If the new QTL are not included in the formula, a
          two-dimensional scan as in 'scantwo' is performed.

  method: Indicates whether to use multiple imputation or Haley-Knott
          regression.

incl.markers: If FALSE, do calculations only at points on an evenly
          spaced grid.  If 'calc.genoprob' or 'sim.geno' were run with
          'stepwidth="variable"', we force 'incl.markers=TRUE'.

 verbose: If TRUE, display information about the progress of
          calculations.  If 'verbose' is an integer > 1, further
          messages from 'scanqtl' are also displayed.

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

     The formula is used to specified the model to be fit. In the
     formula, use 'Q1', 'Q2', etc., or 'q1', 'q2', etc., to represent
     the QTLs, and the column names in the covariate data frame to
     represent the covariates.

     We enforce a hierarchical structure on the model formula: if a QTL
     or covariate is in involved in an interaction, its main effect
     must also be included.   

     If neither of the two new QTL are indicated in the 'formula', we
     perform a two-dimensional scan as in 'scantwo'.  That is, for each
     pair of QTL positions, we fit two models: two additive QTL added
     to the 'formula', and two interacting QTL added to the 'formula'.

     If the both of the new QTL are indicated in the 'formula', that
     particular model is fit, with the positions of the new QTL allowed
     to vary across the genome.  If just one of the QTL is indicated in
     the 'formula', a main effect for the other is added, and that
     particular model is fit, again with the positions of both QTL
     varying. Note that in this case the LOD scores are not analogous
     to those produced by 'scantwo'.  Thus, there slightly modified
     forms for the plots (produced by 'plot.scantwo') and summaries
     (produced by 'summary.scantwo' and 'max.scantwo').  In the plot,
     the x-axis is to be interpreted as the position of the first of
     the new QTL, and the y-axis is to be interpreted as the position
     of the second of the new QTL.  In the summaries, we give the
     single best pair of positions on each pair of chromosomes, and
     give LOD scores comparing that pair of positions to the base model
     (without each of these QTL), and to the base model plus one
     additional QTL on one or the other of the chromosomes.

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

     An object of class 'scantwo', as produced by 'scantwo'.

     If neither of the new QTL were indicated in the 'formula', the
     result is just as in 'scantwo', though with LOD scores relative to
     the base model (omitting the new QTL).

     Otherwise, the results are contained in what would ordinarily be
     in the full and additive LOD scores, with the additive LOD scores
     corresponding to the case that the first of the new QTL is to the
     left of the second of the new QTL, and the full LOD scores
     corresponding to the case that the first of the new QTL is to the
     right of the second of the new QTL.  Because the structure of the
     LOD scores in this case is different from those output by
     'scantwo', we include, in this case, an attribute
     '"addpair"=TRUE'.  (We also require results of single-dimensional
     scans, omitting each of the two new QTL from the formula, one at a
     time; these are included as attributes '"lod.minus1"' and
     '"lod.minus2"'.)  The results are then treated somewhat
     differently by 'summary.scantwo', 'max.scantwo', and
     'plot.scantwo'.  See the Details section.

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

     Karl W Broman, kbroman@biostat.wisc.edu

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

     Haley, C. S. and Knott, S. A. (1992) A simple regression method
     for mapping quantitative trait loci in line crosses using flanking
     markers. _Heredity_ *69*, 315-324.

     Sen, \'S. and Churchill, G. A. (2001) A statistical framework for
     quantitative trait mapping.  _Genetics_ *159*, 371-387.

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

     'addint', 'addqtl', 'fitqtl', 'makeqtl', 'scanqtl', 'refineqtl',
     'makeqtl', 'scantwo', 'addtoqtl'

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

     # A totally contrived example to show some of what you can do

     # simulate backcross data with 3 chromosomes (names "17", "18", "19")
     #   one QTL on chr 17 at 40 cM
     #   one QTL on chr 18 at 30 cM
     #   two QTL on chr 19, at 10 and 40 cM
     data(map10)
     model <- rbind(c(1,40,0), c(2,30,0), c(3,10,0), c(3,40,0))
     ## Not run: fakebc <- sim.cross(map10[17:19], model=model, type="bc", n.ind=250)


     # het at QTL on 17 and 1st QTL on 19 increases phenotype by 1 unit
     # het at QTL on 18 and 2nd QTL on 19 decreases phenotype by 1 unit
     qtlgeno <- fakebc$qtlgeno
     phe <- rnorm(nind(fakebc))
     w <- qtlgeno[,1]==2 & qtlgeno[,3]==2
     phe[w] <- phe[w] + 1
     w <- qtlgeno[,2]==2 & qtlgeno[,4]==2
     phe[w] <- phe[w] - 1
     fakebc$pheno[,1] <- phe

     fakebc <- calc.genoprob(fakebc, step=2, err=0.001)

     # base model has QTLs on chr 17 and 18
     qtl <- makeqtl(fakebc, chr=c("17", "18"), pos=c(40,30), what="prob")

     # scan for an additional pair of QTL, one interacting with the locus 
     #     on 17 and one interacting with the locus on 18
     out.ap <- addpair(fakebc, qtl=qtl, formula = y~Q1*Q3 + Q2*Q4, method="hk")

     max(out.ap)
     summary(out.ap)
     plot(out.ap)

